staging:rtl8187se: Fix sparse warning in right shift
authorHimangi Saraogi <himangi774@gmail.com>
Wed, 12 Mar 2014 19:25:20 +0000 (00:55 +0530)
committerPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Fri, 14 Mar 2014 00:33:01 +0000 (17:33 -0700)
This patch fixes the following sparse warning:
drivers/staging/rtl8187se/r8180_core.c:1328:40: warning: right shift by bigger than source value
by adding parenthesis.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
drivers/staging/rtl8187se/r8180_core.c

index 7938ad8d495788c7120c3b006b2fb799958896a8..79ec26317598306b4e660de410392a60c41c8b34 100644 (file)
@@ -1324,8 +1324,8 @@ static void rtl8180_rx(struct net_device *dev)
                        priv->rx_skb_complete = 1;
                }
 
-               signal = (unsigned char)(*(priv->rxringtail + 3) &
-                       0x00ff0000) >> 16;
+               signal = (unsigned char)((*(priv->rxringtail + 3) &
+                       0x00ff0000) >> 16);
                signal = (signal & 0xfe) >> 1;
 
                quality = (unsigned char)((*(priv->rxringtail+3)) & (0xff));