Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e623d0f3 authored by Cristina Opriceana's avatar Cristina Opriceana Committed by Greg Kroah-Hartman
Browse files

Staging: rtl8192e: Remove unnecessary variables



This patch removes unnecessary intermediary variables in return lines
and uses actual values.
Found by coccinelle using this semantic patch:

@@ type T; expression expr; identifier r; @@

-T r = expr;
... when != r
    when strict
-return r;
+return expr;

Signed-off-by: default avatarCristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8b9733c1
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -36,7 +36,6 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address,
			     u32 buffer_len)
			     u32 buffer_len)
{
{
	struct r8192_priv *priv = rtllib_priv(dev);
	struct r8192_priv *priv = rtllib_priv(dev);
	bool		    rt_status = true;
	u16		    frag_threshold;
	u16		    frag_threshold;
	u16		    frag_length, frag_offset = 0;
	u16		    frag_length, frag_offset = 0;
	int		    i;
	int		    i;
@@ -99,7 +98,7 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address,


	write_nic_byte(dev, TPPoll, TPPoll_CQ);
	write_nic_byte(dev, TPPoll, TPPoll_CQ);


	return rt_status;
	return true;
}
}


static bool CPUcheck_maincodeok_turnonCPU(struct net_device *dev)
static bool CPUcheck_maincodeok_turnonCPU(struct net_device *dev)
+1 −2
Original line number Original line Diff line number Diff line
@@ -3059,7 +3059,6 @@ bool NicIFEnableNIC(struct net_device *dev)
}
}
bool NicIFDisableNIC(struct net_device *dev)
bool NicIFDisableNIC(struct net_device *dev)
{
{
	bool	status = true;
	struct r8192_priv *priv = rtllib_priv(dev);
	struct r8192_priv *priv = rtllib_priv(dev);
	u8 tmp_state = 0;
	u8 tmp_state = 0;


@@ -3074,7 +3073,7 @@ bool NicIFDisableNIC(struct net_device *dev)
	priv->ops->stop_adapter(dev, false);
	priv->ops->stop_adapter(dev, false);
	RT_TRACE(COMP_PS, "<=========%s()\n", __func__);
	RT_TRACE(COMP_PS, "<=========%s()\n", __func__);


	return status;
	return true;
}
}


static int __init rtl8192_pci_module_init(void)
static int __init rtl8192_pci_module_init(void)
+1 −3
Original line number Original line Diff line number Diff line
@@ -232,9 +232,7 @@ static u8 HTIOTActIsDisableMCS14(struct rtllib_device *ieee, u8 *PeerMacAddr)


static bool HTIOTActIsDisableMCS15(struct rtllib_device *ieee)
static bool HTIOTActIsDisableMCS15(struct rtllib_device *ieee)
{
{
	bool retValue = false;
	return false;

	return retValue;
}
}


static bool HTIOTActIsDisableMCSTwoSpatialStream(struct rtllib_device *ieee)
static bool HTIOTActIsDisableMCSTwoSpatialStream(struct rtllib_device *ieee)