staging: dgnc: delete parentheses around right hand side of assignment
PATCH 1/1 staging: dgnc: delete parentheses around right hand side of assignment
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 <[email protected]>
--- drivers/staging/dgnc/dgnc_cls.c | 2 +- drivers/staging/dgnc/dgnc_mgmt.c | 2 +- drivers/staging/dgnc/dgnc_neo.c | 2 +- drivers/staging/dgnc/dgnc_tty.c | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/dgnc/dgnc_cls.c +1 -1
@@ -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 ;
drivers/staging/dgnc/dgnc_mgmt.c +1 -1
@@ -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 ;
drivers/staging/dgnc/dgnc_neo.c +1 -1
@@ -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 ;
drivers/staging/dgnc/dgnc_tty.c +3 -3
@@ -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);
Signature · 1 line
1.9.1