* [PATCH] staging: correct dubious use of !x & y
@ 2008-10-22 3:27 Harvey Harrison
2008-10-27 19:44 ` patch staging-correct-dubious-use-of-x-y.patch added to gregkh-2.6 tree gregkh
0 siblings, 1 reply; 2+ messages in thread
From: Harvey Harrison @ 2008-10-22 3:27 UTC (permalink / raw)
To: Greg KH; +Cc: LKML
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>
---
drivers/staging/me4000/me4000.c | 2 +-
drivers/staging/wlan-ng/p80211wext.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/me4000/me4000.c b/drivers/staging/me4000/me4000.c
index 862dd7f..182c057 100644
--- a/drivers/staging/me4000/me4000.c
+++ b/drivers/staging/me4000/me4000.c
@@ -1210,7 +1210,7 @@ static int me4000_xilinx_download(me4000_info_t * 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 "me4000_xilinx_download():Can't init Xilinx\n");
return -EIO;
}
diff --git a/drivers/staging/wlan-ng/p80211wext.c b/drivers/staging/wlan-ng/p80211wext.c
index 906ba43..c42cd7f 100644
--- a/drivers/staging/wlan-ng/p80211wext.c
+++ b/drivers/staging/wlan-ng/p80211wext.c
@@ -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;
}
--
1.6.0.2.824.geb4d2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* patch staging-correct-dubious-use-of-x-y.patch added to gregkh-2.6 tree
2008-10-22 3:27 [PATCH] staging: correct dubious use of !x & y Harvey Harrison
@ 2008-10-27 19:44 ` gregkh
0 siblings, 0 replies; 2+ messages in thread
From: gregkh @ 2008-10-27 19:44 UTC (permalink / raw)
To: harvey.harrison, gregkh, greg, linux-kernel
This is a note to let you know that I've just added the patch titled
Subject: staging: correct dubious use of !x & y
to my gregkh-2.6 tree. Its filename is
staging-correct-dubious-use-of-x-y.patch
This tree can be found at
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/
>From harvey.harrison@gmail.com Mon Oct 27 11:24:51 2008
From: Harvey Harrison <harvey.harrison@gmail.com>
Date: Tue, 21 Oct 2008 20:27:16 -0700
Subject: staging: correct dubious use of !x & y
To: Greg KH <greg@kroah.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Message-ID: <1224646036.5768.8.camel@brick>
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 | 2 +-
drivers/staging/wlan-ng/p80211wext.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/staging/me4000/me4000.c
+++ b/drivers/staging/me4000/me4000.c
@@ -1181,7 +1181,7 @@ static int me4000_xilinx_download(struct
/* 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;
}
--- a/drivers/staging/wlan-ng/p80211wext.c
+++ b/drivers/staging/wlan-ng/p80211wext.c
@@ -1580,7 +1580,7 @@ static int p80211wext_set_encodeext(stru
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;
}
Patches currently in gregkh-2.6 which might be from harvey.harrison@gmail.com are
staging/staging-correct-dubious-use-of-x-y.patch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-10-27 19:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-22 3:27 [PATCH] staging: correct dubious use of !x & y Harvey Harrison
2008-10-27 19:44 ` patch staging-correct-dubious-use-of-x-y.patch added to gregkh-2.6 tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).