[<prev] [next>] [day] [month] [year] [list]
Message-ID: <49E79390.7070809@gmail.com>
Date: Thu, 16 Apr 2009 22:22:40 +0200
From: Roel Kluin <roel.kluin@...il.com>
To: Greg KH <gregkh@...e.de>
CC: lkml <linux-kernel@...r.kernel.org>
Subject: [PATCH] staging: operator precedence errors
`!' has a higher precedence than `&' and `|' has a higher precedence than `?'
Signed-off-by: Roel Kluin <roel.kluin@...il.com>
---
diff --git a/drivers/staging/comedi/drivers/pcl816.c b/drivers/staging/comedi/drivers/pcl816.c
index 515ba74..cf3bc49 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 bcb5942..6855224 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 975e444..eb50243 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 975e444..eb50243 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 0794548..9373ae8 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:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists