From 5355d8cac2a036471c1e739ee5aa1514973ed114 Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Thu, 16 Apr 2009 22:22:40 +0200 Subject: [PATCH] Staging: fix operator precedence errors `!' has a higher precedence than `&' and `|' has a higher precedence than `?' Signed-off-by: Roel Kluin Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 2 +- drivers/staging/pohmelfs/trans.c | 3 ++- drivers/staging/rt2870/tmp60 | 2 +- drivers/staging/rt2870/tmp61 | 2 +- drivers/staging/rt3070/sta_ioctl.c | 4 +--- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl816.c b/drivers/staging/comedi/drivers/pcl816.c index 353cdaf03ed3..19465c1b53c3 100644 --- a/drivers/staging/comedi/drivers/pcl816.c +++ b/drivers/staging/comedi/drivers/pcl816.c @@ -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; diff --git a/drivers/staging/pohmelfs/trans.c b/drivers/staging/pohmelfs/trans.c index fef5f9bd6920..2a4568d58012 100644 --- a/drivers/staging/pohmelfs/trans.c +++ b/drivers/staging/pohmelfs/trans.c @@ -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) { diff --git a/drivers/staging/rt2870/tmp60 b/drivers/staging/rt2870/tmp60 index 975e44484379..eb502430b000 100644 --- a/drivers/staging/rt2870/tmp60 +++ b/drivers/staging/rt2870/tmp60 @@ -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; } } diff --git a/drivers/staging/rt2870/tmp61 b/drivers/staging/rt2870/tmp61 index 975e44484379..eb502430b000 100644 --- a/drivers/staging/rt2870/tmp61 +++ b/drivers/staging/rt2870/tmp61 @@ -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; } } diff --git a/drivers/staging/rt3070/sta_ioctl.c b/drivers/staging/rt3070/sta_ioctl.c index 30446a3f563c..229f2cd5960c 100644 --- a/drivers/staging/rt3070/sta_ioctl.c +++ b/drivers/staging/rt3070/sta_ioctl.c @@ -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: -- 2.34.1