staging: wilc1000: Handle_SetMulticastFilter(): fixes right shifting more than type...
authorLeo Kim <leo.kim@atmel.com>
Wed, 25 Nov 2015 02:59:49 +0000 (11:59 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Dec 2015 22:40:57 +0000 (14:40 -0800)
This patch fixes the warning reported by smatch.
 - Handle_SetMulticastFilter() warn: right shifting more than type allows

That is unnecessary action of boolean type. just assign 0.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c

index 2408858c8a4c1c6bd2f07e487310310f7d9c876c..772d524bc2b40e7fd744420fd7881c52e1a56a28 100644 (file)
@@ -2711,9 +2711,9 @@ static void Handle_SetMulticastFilter(struct host_if_drv *hif_drv,
 
        pu8CurrByte = wid.val;
        *pu8CurrByte++ = (strHostIfSetMulti->enabled & 0xFF);
-       *pu8CurrByte++ = ((strHostIfSetMulti->enabled >> 8) & 0xFF);
-       *pu8CurrByte++ = ((strHostIfSetMulti->enabled >> 16) & 0xFF);
-       *pu8CurrByte++ = ((strHostIfSetMulti->enabled >> 24) & 0xFF);
+       *pu8CurrByte++ = 0;
+       *pu8CurrByte++ = 0;
+       *pu8CurrByte++ = 0;
 
        *pu8CurrByte++ = (strHostIfSetMulti->cnt & 0xFF);
        *pu8CurrByte++ = ((strHostIfSetMulti->cnt >> 8) & 0xFF);