Staging: fix operator precedence errors
authorRoel Kluin <roel.kluin@gmail.com>
Thu, 16 Apr 2009 20:22:40 +0000 (22:22 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 19 Jun 2009 18:00:36 +0000 (11:00 -0700)
`!' has a higher precedence than `&' and `|' has a higher precedence than `?'

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/comedi/drivers/pcl816.c
drivers/staging/pohmelfs/trans.c
drivers/staging/rt2870/tmp60
drivers/staging/rt2870/tmp61
drivers/staging/rt3070/sta_ioctl.c

index 353cdaf03ed30862d739bf8cc55c53faef552b82..19465c1b53c3a757e6f94bce5640676a91638574 100644 (file)
@@ -482,7 +482,7 @@ static int pcl816_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice
        if (!cmd->scan_begin_src || tmp != cmd->scan_begin_src)
                err++;
 
-       if (!cmd->convert_src & (TRIG_EXT | TRIG_TIMER))
+       if (!(cmd->convert_src & (TRIG_EXT | TRIG_TIMER)))
                err++;
 
        tmp = cmd->scan_end_src;
index fef5f9bd69200014d7d17ba48d13787f927ea3ea..2a4568d5801294575dfda72820f0515405b08af7 100644 (file)
@@ -101,7 +101,8 @@ static int netfs_trans_send_pages(struct netfs_trans *t, struct netfs_state *st)
                        goto err_out;
                }
 
-               msg.msg_flags = MSG_WAITALL|(attached_pages == 1)?0:MSG_MORE;
+               msg.msg_flags = MSG_WAITALL | (attached_pages == 1 ? 0 :
+                               MSG_MORE);
 
                err = kernel_sendpage(st->socket, page, 0, size, msg.msg_flags);
                if (err <= 0) {
index 975e4448437918524a61006d597636d708484016..eb502430b0000cbd14b1c94dae4bbbcce80c00da 100644 (file)
@@ -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;
                }
        }
index 975e4448437918524a61006d597636d708484016..eb502430b0000cbd14b1c94dae4bbbcce80c00da 100644 (file)
@@ -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;
                }
        }
index 30446a3f563cbde4f04e9e9cf85187fd3088a18d..229f2cd5960c4a054f12b7e1b1064fdfc87e1957 100644 (file)
@@ -1725,10 +1725,8 @@ 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;
-               }
        }
 
 done: