]> git.karo-electronics.de Git - linux-beck.git/commitdiff
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 72f0aaa6911f562383a6c403b430c88d8d28fa0f..0ff3139e52b689221e12cc1bf0fd3c88bbead752 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 518fbd5e2d0e20159ba4b548b92e418b67c36858..ba29a8d913f20f83a14ca65498167d81d73cbe06 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 ee3155bcc6d21677c575dfee322543e1505c3b61..31ac437cb4a47b9bdab109c8c13a0876bfd24381 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 b79eab084c023864389dc283aec9e703b72177e0..f4dfc137cd1cf1ade4e3546b7898dae4d93f9831 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);