Commit 6c14378e authored by Cristina Opriceana's avatar Cristina Opriceana Committed by Greg Kroah-Hartman

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: default avatarCristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent acc6539f
...@@ -471,12 +471,10 @@ static bool HTIOTActIsDisableMCS15(struct ieee80211_device *ieee) ...@@ -471,12 +471,10 @@ static bool HTIOTActIsDisableMCS15(struct ieee80211_device *ieee)
static bool HTIOTActIsDisableMCSTwoSpatialStream(struct ieee80211_device *ieee, static bool HTIOTActIsDisableMCSTwoSpatialStream(struct ieee80211_device *ieee,
u8 *PeerMacAddr) u8 *PeerMacAddr)
{ {
bool retValue = false;
#ifdef TODO #ifdef TODO
// Apply for 819u only // Apply for 819u only
#endif #endif
return retValue; return false;
} }
/******************************************************************************************************************** /********************************************************************************************************************
...@@ -488,11 +486,8 @@ static bool HTIOTActIsDisableMCSTwoSpatialStream(struct ieee80211_device *ieee, ...@@ -488,11 +486,8 @@ static bool HTIOTActIsDisableMCSTwoSpatialStream(struct ieee80211_device *ieee,
* *****************************************************************************************************************/ * *****************************************************************************************************************/
static u8 HTIOTActIsDisableEDCATurbo(struct ieee80211_device *ieee, static u8 HTIOTActIsDisableEDCATurbo(struct ieee80211_device *ieee,
u8 *PeerMacAddr) u8 *PeerMacAddr)
{ { /* default enable EDCA Turbo mode. */
u8 retValue = false; // default enable EDCA Turbo mode. return false;
// Set specific EDCA parameter for different AP in DM handler.
return retValue;
} }
/******************************************************************************************************************** /********************************************************************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment