summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-10-10 15:05:48 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-18 16:42:28 +0200
commitbc7d21ca2c150ecb0153a901fa99733f960ea461 (patch)
tree900f319a66edd8d3abee4f1c3717cf8c6240494a
parent2d10b8570416fd079c23f9d62fb7b88131938013 (diff)
downloadlinux-bc7d21ca2c150ecb0153a901fa99733f960ea461.tar.gz
linux-bc7d21ca2c150ecb0153a901fa99733f960ea461.tar.bz2
linux-bc7d21ca2c150ecb0153a901fa99733f960ea461.zip
staging: wilc1000: replace redundant computations with 0
Shifting and masking strHostIfSetMulti->enabled is redundant since enabled is a bool and so all the shifted and masked values will be zero. Replace them with zero to simplify the code. Detected by CoverityScan, CID#1339458 ("Bad shift operation") and CID#1339506 ("Operands don't affect result"). Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/wilc1000/host_interface.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index c16f96308a97..5b4e9dd16b77 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -2420,9 +2420,9 @@ static void Handle_SetMulticastFilter(struct wilc_vif *vif,
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);