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>
This commit is contained in:
parent
3bfd058363
commit
d86d3a0101
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue