From e623d0f3f92960a826ae30dc861165f21752cdc8 Mon Sep 17 00:00:00 2001 From: Cristina Opriceana Date: Thu, 12 Mar 2015 04:22:38 +0200 Subject: [PATCH] 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: Cristina Opriceana Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c | 3 +-- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 3 +-- drivers/staging/rtl8192e/rtl819x_HTProc.c | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c index 6cb032660129..fa9c08101fff 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c @@ -36,7 +36,6 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, u32 buffer_len) { struct r8192_priv *priv = rtllib_priv(dev); - bool rt_status = true; u16 frag_threshold; u16 frag_length, frag_offset = 0; 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); - return rt_status; + return true; } static bool CPUcheck_maincodeok_turnonCPU(struct net_device *dev) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 90ed03a4476b..51c21da98f60 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -3059,7 +3059,6 @@ bool NicIFEnableNIC(struct net_device *dev) } bool NicIFDisableNIC(struct net_device *dev) { - bool status = true; struct r8192_priv *priv = rtllib_priv(dev); u8 tmp_state = 0; @@ -3074,7 +3073,7 @@ bool NicIFDisableNIC(struct net_device *dev) priv->ops->stop_adapter(dev, false); RT_TRACE(COMP_PS, "<=========%s()\n", __func__); - return status; + return true; } static int __init rtl8192_pci_module_init(void) diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c index 6157536e404a..1af4191feb4f 100644 --- a/drivers/staging/rtl8192e/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c @@ -232,9 +232,7 @@ static u8 HTIOTActIsDisableMCS14(struct rtllib_device *ieee, u8 *PeerMacAddr) static bool HTIOTActIsDisableMCS15(struct rtllib_device *ieee) { - bool retValue = false; - - return retValue; + return false; } static bool HTIOTActIsDisableMCSTwoSpatialStream(struct rtllib_device *ieee) -- 2.39.5