diff options
author | Cristina Opriceana <cristina.opriceana@gmail.com> | 2015-03-12 02:21:29 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-16 14:54:13 (GMT) |
commit | 6c14378eca6f2f66438799e76845c3f2bbdafb57 (patch) | |
tree | ba3e29dafc72efc2879a876be3cc17a5b5252a20 | |
parent | acc6539fe6293373ded751162e77c10f532336c6 (diff) | |
download | linux-6c14378eca6f2f66438799e76845c3f2bbdafb57.tar.xz |
Staging: rtl8192u: Remove unnecessary variable
This patch detects the cases in which a variable is not modified through
the code and it is used as a return value. The variable is detected and
removed by coccinelle using the following semantic patch:
@@ type T; expression expr; identifier r; constant c; @@
-T r = expr;
... when != r
when strict
-return r;
+return expr;
Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index c322881..69b0e30 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c @@ -471,12 +471,10 @@ static bool HTIOTActIsDisableMCS15(struct ieee80211_device *ieee) static bool HTIOTActIsDisableMCSTwoSpatialStream(struct ieee80211_device *ieee, u8 *PeerMacAddr) { - bool retValue = false; - #ifdef TODO // Apply for 819u only #endif - return retValue; + return false; } /******************************************************************************************************************** @@ -488,11 +486,8 @@ static bool HTIOTActIsDisableMCSTwoSpatialStream(struct ieee80211_device *ieee, * *****************************************************************************************************************/ static u8 HTIOTActIsDisableEDCATurbo(struct ieee80211_device *ieee, u8 *PeerMacAddr) -{ - u8 retValue = false; // default enable EDCA Turbo mode. - // Set specific EDCA parameter for different AP in DM handler. - - return retValue; +{ /* default enable EDCA Turbo mode. */ + return false; } /******************************************************************************************************************** |