staging: correct dubious use of !x & y
authorHarvey Harrison <harvey.harrison@gmail.com>
Wed, 22 Oct 2008 03:27:16 +0000 (20:27 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 6 Jan 2009 21:51:38 +0000 (13:51 -0800)
Noticed by sparse:
drivers/staging/me4000/me4000.c:1213:43: warning: dubious: !x & y
drivers/staging/wlan-ng/p80211wext.c:1583:21: warning: dubious: !x & y

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/me4000/me4000.c
drivers/staging/wlan-ng/p80211wext.c

index 0394e2709278cae3c00ad94e3daa21ca5d21b309..0ac04b7f34bb62b07872560e8c0d261c99838775 100644 (file)
@@ -1180,7 +1180,7 @@ static int me4000_xilinx_download(struct me4000_info *info)
 
        /* Wait until /INIT pin is set */
        udelay(20);
-       if (!inl(info->plx_regbase + PLX_INTCSR) & 0x20) {
+       if (!(inl(info->plx_regbase + PLX_INTCSR) & 0x20)) {
                printk(KERN_ERR "%s:Can't init Xilinx\n", __func__);
                return -EIO;
        }
index b2c9ea25fa425a3558bff9ab5b1c96da01de841c..338028ae289bbb0a5e87cf0e8f30406619013b9e 100644 (file)
@@ -1580,7 +1580,7 @@ static int p80211wext_set_encodeext(struct net_device *dev,
 
 
   if ( ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY ) {
-    if ( ! ext->alg & IW_ENCODE_ALG_WEP) {
+    if (!(ext->alg & IW_ENCODE_ALG_WEP)) {
       WLAN_LOG_DEBUG(1,"asked to set a non wep key :(");
       return -EINVAL;
     }