From 945f0185610dbad16b6741b55cad86cc72fb559d Mon Sep 17 00:00:00 2001 From: Aya Mahfouz Date: Thu, 26 Feb 2015 11:41:51 +0200 Subject: [PATCH] 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 --- drivers/staging/rtl8188eu/hal/usb_halinit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */ -- 2.30.2