From: Aya Mahfouz Date: Thu, 26 Feb 2015 09:41:51 +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=945f0185610dbad16b6741b55cad86cc72fb559d;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/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c index 14650e91c78a..122e9b37aa79 100644 --- a/drivers/staging/rtl8188eu/hal/usb_halinit.c +++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c @@ -1352,7 +1352,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val) /* Set RTS initial rate */ while (BrateCfg > 0x1) { - BrateCfg = (BrateCfg >> 1); + BrateCfg >>= 1; RateIndex++; } /* Ziv - Check */