summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2008-12-24 16:23:10 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-03 14:53:40 -0700
commitd86d3a0101d958988a715abb7ea4687690f0b52f (patch)
treeb6c5788468614c1cb17e2d25a9e8a6d31d989817
parent3bfd0583639a292da151fba7321d6fe5bd40f50d (diff)
downloadlinux-3.10-d86d3a0101d958988a715abb7ea4687690f0b52f.tar.gz
linux-3.10-d86d3a0101d958988a715abb7ea4687690f0b52f.tar.bz2
linux-3.10-d86d3a0101d958988a715abb7ea4687690f0b52f.zip
Staging: comedi: Correct use of ! and &
0x20 has 0 as its rightmost bit and thus !inl(info->plx_regbase + PLX_INTCSR) & 0x20 is always 0. I assume that !(!inl(info->plx_regbase + PLX_INTCSR) & 0x20) was intended. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ expression E; constant C; @@ ( !E & !C | - !E & C + !(E & C) ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/comedi/drivers/me4000.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers/me4000.c
index b432aa7d764..cc29315ecad 100644
--- a/drivers/staging/comedi/drivers/me4000.c
+++ b/drivers/staging/comedi/drivers/me4000.c
@@ -782,7 +782,7 @@ static int xilinx_download(comedi_device * dev)
/* 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
"comedi%d: me4000: xilinx_download(): Can't init Xilinx\n",
dev->minor);