USB: isp1362: Correct use of ! and &
authorJulia Lawall <julia@diku.dk>
Wed, 12 Aug 2009 14:51:09 +0000 (16:51 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 23 Sep 2009 13:46:33 +0000 (06:46 -0700)
Correct priority problem in the use of ! and &.

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)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/isp1362-hcd.c

index 16ba1eadf9715ea01d95e442914e3e3db771e834..e35d82808bab3be9aa32e1c0b340fd1c80c72458 100644 (file)
@@ -1075,8 +1075,10 @@ static irqreturn_t isp1362_irq(struct usb_hcd *hcd)
                isp1362_clr_mask16(isp1362_hcd, HCBUFSTAT, HCBUFSTAT_ISTL0_FULL);
                DBG(1, "%s: ISTL0\n", __func__);
                WARN_ON((int)!!isp1362_hcd->istl_flip);
-               WARN_ON(isp1362_read_reg16(isp1362_hcd, HCBUFSTAT) & HCBUFSTAT_ISTL0_ACTIVE);
-               WARN_ON(!isp1362_read_reg16(isp1362_hcd, HCBUFSTAT) & HCBUFSTAT_ISTL0_DONE);
+               WARN_ON(isp1362_read_reg16(isp1362_hcd, HCBUFSTAT) &
+                       HCBUFSTAT_ISTL0_ACTIVE);
+               WARN_ON(!(isp1362_read_reg16(isp1362_hcd, HCBUFSTAT) &
+                       HCBUFSTAT_ISTL0_DONE));
                isp1362_hcd->irqenb &= ~HCuPINT_ISTL0;
        }
 
@@ -1087,8 +1089,10 @@ static irqreturn_t isp1362_irq(struct usb_hcd *hcd)
                isp1362_clr_mask16(isp1362_hcd, HCBUFSTAT, HCBUFSTAT_ISTL1_FULL);
                DBG(1, "%s: ISTL1\n", __func__);
                WARN_ON(!(int)isp1362_hcd->istl_flip);
-               WARN_ON(isp1362_read_reg16(isp1362_hcd, HCBUFSTAT) & HCBUFSTAT_ISTL1_ACTIVE);
-               WARN_ON(!isp1362_read_reg16(isp1362_hcd, HCBUFSTAT) & HCBUFSTAT_ISTL1_DONE);
+               WARN_ON(isp1362_read_reg16(isp1362_hcd, HCBUFSTAT) &
+                       HCBUFSTAT_ISTL1_ACTIVE);
+               WARN_ON(!(isp1362_read_reg16(isp1362_hcd, HCBUFSTAT) &
+                       HCBUFSTAT_ISTL1_DONE));
                isp1362_hcd->irqenb &= ~HCuPINT_ISTL1;
        }