Skip to content

Commit

Permalink
staging: wilc1000: Handle_SetMulticastFilter(): fixes right shifting …
Browse files Browse the repository at this point in the history
…more than type allows

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>
  • Loading branch information
Leo Kim authored and Greg Kroah-Hartman committed Dec 18, 2015
1 parent 9edaa5f commit c8751ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/wilc1000/host_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c8751ad

Please sign in to comment.