]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Staging: irda: Remove parentheses on the right of assignment
authorSrishti Sharma <srishtishar@gmail.com>
Fri, 15 Sep 2017 21:06:16 +0000 (02:36 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Sep 2017 09:53:16 +0000 (11:53 +0200)
Parentheses are not needed on the right hand side of assignment
statement in most cases. Done using the following semantic
patch by coccinelle.

@@
identifier E,F,G,f;
expression e,r;
@@

(
E = (G == F);
|
E = (e == r);
|
E =
-(
...
-)
;
)

Signed-off-by: Srishti Sharma <srishtishar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/irda/drivers/mcs7780.c
drivers/staging/irda/net/irqueue.c

index 2b674d56c5defb8ba0866180f23c18d2628726bf..d52e9f4b9770da0aabf9dd74dadc333297fbaf3e 100644 (file)
@@ -605,7 +605,7 @@ static int mcs_speed_change(struct mcs_cb *mcs)
        if (mcs->new_speed <= 115200) {
                rval &= ~MCS_FIR;
 
-               rst = (mcs->speed > 115200);
+               rst = mcs->speed > 115200;
                if (rst)
                        mcs_set_reg(mcs, MCS_MINRXPW_REG, 0);
 
@@ -619,7 +619,7 @@ static int mcs_speed_change(struct mcs_cb *mcs)
        } else {
                rval |= MCS_FIR;
 
-               rst = (mcs->speed != 4000000);
+               rst = mcs->speed != 4000000;
                if (rst)
                        mcs_set_reg(mcs, MCS_MINRXPW_REG, 5);
 
index 5aab07259ac78d7b8637e02df52ae25bc1d3e5a1..14291cbc4097fd5865f0e8b62a0582c20089548a 100644 (file)
@@ -217,7 +217,7 @@ static __u32 hash( const char* name)
 
        while(*name) {
                h = (h<<4) + *name++;
-               g = (h & 0xf0000000);
+               g = h & 0xf0000000;
                if (g)
                        h ^=g>>24;
                h &=~g;