From: Roel Kluin <roel.kluin@gmail.com>
To: Greg KH <gregkh@suse.de>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH] staging: operator precedence errors
Date: Thu, 16 Apr 2009 22:22:40 +0200 [thread overview]
Message-ID: <49E79390.7070809@gmail.com> (raw)
`!' has a higher precedence than `&' and `|' has a higher precedence than `?'
Signed-off-by: Roel Kluin <roel.kluin@gmail.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:
reply other threads:[~2009-04-16 20:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49E79390.7070809@gmail.com \
--to=roel.kluin@gmail.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox