From: Julia Lawall Date: Wed, 24 Dec 2008 15:24:05 +0000 (+0100) Subject: Staging: rt2860,rt2870: Correct use of ! and & X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7034ca4dda60f213d2d428da690710da6ea9a8df;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git Staging: rt2860,rt2870: Correct use of ! and & IW_ENCODE_MODE is 0xF000 and thus !erq->flags & IW_ENCODE_MODE is always 0. I assume that !(erq->flags & IW_ENCODE_MODE) was intended. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // @@ expression E; constant C; @@ ( !E & !C | - !E & C + !(E & C) ) // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rt2860/sta_ioctl.c b/drivers/staging/rt2860/sta_ioctl.c index 3ea2b2c4ab0e..a9a33e64d8fd 100644 --- a/drivers/staging/rt2860/sta_ioctl.c +++ b/drivers/staging/rt2860/sta_ioctl.c @@ -1756,7 +1756,7 @@ int rt_ioctl_siwencode(struct net_device *dev, } else /* Don't complain if only change the mode */ - if(!erq->flags & IW_ENCODE_MODE) { + if (!(erq->flags & IW_ENCODE_MODE)) { return -EINVAL; } } diff --git a/drivers/staging/rt2870/sta_ioctl.c b/drivers/staging/rt2870/sta_ioctl.c index 91f0fab11313..4b432ce4442e 100644 --- a/drivers/staging/rt2870/sta_ioctl.c +++ b/drivers/staging/rt2870/sta_ioctl.c @@ -1776,7 +1776,7 @@ int rt_ioctl_siwencode(struct net_device *dev, } else /* Don't complain if only change the mode */ - if(!erq->flags & IW_ENCODE_MODE) { + if (!(erq->flags & IW_ENCODE_MODE)) { return -EINVAL; } }