From: Aya Mahfouz Date: Thu, 26 Feb 2015 09:42:42 +0000 (+0200) Subject: staging: rtl8188eu: rewrite the right hand side of an assignment X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=74ff87997fe28b58ddeca7b9294a868b1ea66668;p=linux-beck.git staging: rtl8188eu: rewrite the right hand side of an assignment This patch rewrites the right hand side of an assignment for expressions of the form: a = (a b); to be: a = b; where = << | >>. This issue was detected and resolved using the following coccinelle script: @@ identifier i; expression e; @@ -i = (i >> e); +i >>= e; @@ identifier i; expression e; @@ -i = (i << e); +i <<= e; Signed-off-by: Aya Mahfouz Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c b/drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c index 2c23aa92e696..8d63c83afee4 100644 --- a/drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c +++ b/drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c @@ -487,7 +487,7 @@ static void odm_PTDecision_8188E(struct odm_ra_info *pRaInfo) break; } - j = j >> 1; + j >>= 1; temp_stage = (pRaInfo->PTStage + 1) >> 1; if (temp_stage > j) stage_id = temp_stage-j;