Staging: ft1000: Remove parentheses around right side an assignment
authorHaneen Mohammed <hamohammed.sa@gmail.com>
Fri, 13 Mar 2015 17:51:17 +0000 (20:51 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Mar 2015 15:24:19 +0000 (16:24 +0100)
Parentheses are not needed around the right hand side of an assignment.
This patch remove parenthese of such occurenses. Issue was detected and
solved using the following coccinelle script:

@rule1@
identifier x, y, z;
expression E1, E2;
@@

(
x = (y == z);
|
x = (E1 == E2);
|
 x =
-(
...
-)
 ;
)

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ft1000/ft1000-pcmcia/ft1000_dnld.c
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
drivers/staging/ft1000/ft1000-usb/ft1000_download.c

index cbf59abd1825de3ffb85f41f43a703b94794850f..ddb74665fae951e9b208753d25b98e5369005b79 100644 (file)
@@ -276,8 +276,8 @@ u16 hdr_checksum(struct pseudo_hdr *pHdr)
        u16 *usPtr = (u16 *)pHdr;
        u16 chksum;
 
-       chksum = ((((((usPtr[0] ^ usPtr[1]) ^ usPtr[2]) ^ usPtr[3]) ^
-                   usPtr[4]) ^ usPtr[5]) ^ usPtr[6]);
+       chksum = (((((usPtr[0] ^ usPtr[1]) ^ usPtr[2]) ^ usPtr[3]) ^
+                   usPtr[4]) ^ usPtr[5]) ^ usPtr[6];
 
        return chksum;
 }
index e5890dbcb98aa16bb814413beacf05761432eb3f..0afe37f1255db46d09bed1a1853cce0694abf9ba 100644 (file)
@@ -1295,9 +1295,9 @@ static int ft1000_parse_dpram_msg(struct net_device *dev)
                                          2) >> 8) & 0xff;
                        } else {
                                portid =
-                                       (ft1000_read_dpram_mag_16
+                                       ft1000_read_dpram_mag_16
                                         (dev, FT1000_MAG_PORT_ID,
-                                         FT1000_MAG_PORT_ID_INDX) & 0xff);
+                                         FT1000_MAG_PORT_ID_INDX) & 0xff;
                        }
                        pr_debug("DSP_QID = 0x%x\n", portid);
 
index b427825ce001d61d0ec1ccbc9318a2b06f2f3242..2d758fb26eac3c818f5e6adb91f08ec9171a7487 100644 (file)
@@ -301,7 +301,7 @@ static int ft1000_open(struct inode *inode, struct file *file)
        struct ft1000_usb *dev = (struct ft1000_usb *)inode->i_private;
        int i, num;
 
-       num = (MINOR(inode->i_rdev) & 0xf);
+       num = MINOR(inode->i_rdev) & 0xf;
        pr_debug("minor number=%d\n", num);
 
        info = file->private_data = netdev_priv(dev->net);
index 800450ff5222c3ae91e1372e951d3b1989f91799..5def347beb082df3bd442e9f8c9a47713c47feaf 100644 (file)
@@ -368,8 +368,8 @@ static u16 hdr_checksum(struct pseudo_hdr *pHdr)
        u16   chksum;
 
 
-       chksum = ((((((usPtr[0] ^ usPtr[1]) ^ usPtr[2]) ^ usPtr[3]) ^
-                   usPtr[4]) ^ usPtr[5]) ^ usPtr[6]);
+       chksum = (((((usPtr[0] ^ usPtr[1]) ^ usPtr[2]) ^ usPtr[3]) ^
+                   usPtr[4]) ^ usPtr[5]) ^ usPtr[6];
 
        return chksum;
 }