OSDN Git Service

staging: dgnc: delete parentheses around right hand side of assignment
authorEva Rachel Retuya <eraretuya@gmail.com>
Tue, 23 Feb 2016 16:34:56 +0000 (00:34 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
Eliminate unneeded parentheses around the right hand side of an
assignment. Coccinelle semantic patch used:
@@
expression e1, e2;
identifier v;
@@

(
 v = (e1 == e2)
|
 v = (e1 != e2)
|
 v = (e1 <= e2)
|
 v = (e1 >= e2)
|
 v =
- (
e1
- )
)

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgnc/dgnc_cls.c
drivers/staging/dgnc/dgnc_mgmt.c
drivers/staging/dgnc/dgnc_neo.c
drivers/staging/dgnc/dgnc_tty.c

index 72f0aaa..0ff3139 100644 (file)
@@ -823,7 +823,7 @@ static void cls_copy_data_from_uart_to_queue(struct channel_t *ch)
        tail = ch->ch_r_tail;
 
        /* Store how much space we have left in the queue */
-       qleft = (tail - head - 1);
+       qleft = tail - head - 1;
        if (qleft < 0)
                qleft += RQUEUEMASK + 1;
 
index 518fbd5..ba29a8d 100644 (file)
@@ -192,7 +192,7 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 
                spin_lock_irqsave(&ch->ch_lock, flags);
 
-               mstat = (ch->ch_mostat | ch->ch_mistat);
+               mstat = ch->ch_mostat | ch->ch_mistat;
 
                if (mstat & UART_MCR_DTR) {
                        ni.mstat |= TIOCM_DTR;
index ee3155b..31ac437 100644 (file)
@@ -1735,7 +1735,7 @@ static unsigned int neo_read_eeprom(unsigned char __iomem *base, unsigned int ad
        /* enable chip select */
        writeb(NEO_EECS, base + NEO_EEREG);
        /* READ */
-       enable = (address | 0x180);
+       enable = address | 0x180;
 
        for (bits = 9; bits--; ) {
                databit = (enable & (1 << bits)) ? NEO_EEDI : 0;
index b79eab0..f4dfc13 100644 (file)
@@ -796,7 +796,7 @@ static void dgnc_set_custom_speed(struct channel_t *ch, uint newrate)
         *  And of course, rates above the dividend won't fly.
         */
        if (newrate && newrate < ((ch->ch_bd->bd_dividend / 0xFFFF) + 1))
-               newrate = ((ch->ch_bd->bd_dividend / 0xFFFF) + 1);
+               newrate = (ch->ch_bd->bd_dividend / 0xFFFF) + 1;
 
        if (newrate && newrate > ch->ch_bd->bd_dividend)
                newrate = ch->ch_bd->bd_dividend;
@@ -1848,7 +1848,7 @@ static int dgnc_tty_tiocmget(struct tty_struct *tty)
 
        spin_lock_irqsave(&ch->ch_lock, flags);
 
-       mstat = (ch->ch_mostat | ch->ch_mistat);
+       mstat = ch->ch_mostat | ch->ch_mistat;
 
        spin_unlock_irqrestore(&ch->ch_lock, flags);
 
@@ -2048,7 +2048,7 @@ static inline int dgnc_get_mstat(struct channel_t *ch)
 
        spin_lock_irqsave(&ch->ch_lock, flags);
 
-       mstat = (ch->ch_mostat | ch->ch_mistat);
+       mstat = ch->ch_mostat | ch->ch_mistat;
 
        spin_unlock_irqrestore(&ch->ch_lock, flags);