Skip to content

Commit f0dff42

Browse files
haneensagregkh
authored andcommitted
Staging: comedi: Remove parentheses around right side assignment
Parentheses are not needed around the right hand side of an assignment. This patch remove parenthese of such occurences. 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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 81906c3 commit f0dff42

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

drivers/staging/comedi/drivers/addi_apci_3501.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ static irqreturn_t apci3501_interrupt(int irq, void *d)
270270

271271
/* Disable Interrupt */
272272
ul_Command1 = inl(dev->iobase + APCI3501_TIMER_CTRL_REG);
273-
ul_Command1 = (ul_Command1 & 0xFFFFF9FDul);
273+
ul_Command1 = ul_Command1 & 0xFFFFF9FDul;
274274
outl(ul_Command1, dev->iobase + APCI3501_TIMER_CTRL_REG);
275275

276276
ui_Timer_AOWatchdog = inl(dev->iobase + APCI3501_TIMER_IRQ_REG) & 0x1;
@@ -282,7 +282,7 @@ static irqreturn_t apci3501_interrupt(int irq, void *d)
282282
/* Enable Interrupt Send a signal to from kernel to user space */
283283
send_sig(SIGIO, devpriv->tsk_Current, 0);
284284
ul_Command1 = inl(dev->iobase + APCI3501_TIMER_CTRL_REG);
285-
ul_Command1 = ((ul_Command1 & 0xFFFFF9FDul) | 1 << 1);
285+
ul_Command1 = (ul_Command1 & 0xFFFFF9FDul) | 1 << 1;
286286
outl(ul_Command1, dev->iobase + APCI3501_TIMER_CTRL_REG);
287287
inl(dev->iobase + APCI3501_TIMER_STATUS_REG);
288288

drivers/staging/comedi/drivers/ni_mio_common.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,7 @@ static void get_last_sample_611x(struct comedi_device *dev)
13601360
/* Check if there's a single sample stuck in the FIFO */
13611361
if (ni_readb(dev, XXX_Status) & 0x80) {
13621362
dl = ni_readl(dev, ADC_FIFO_Data_611x);
1363-
data = (dl & 0xffff);
1363+
data = dl & 0xffff;
13641364
comedi_buf_write_samples(s, &data, 1);
13651365
}
13661366
}
@@ -1871,7 +1871,7 @@ static void ni_m_series_load_channelgain_list(struct comedi_device *dev,
18711871
chan = CR_CHAN(list[0]);
18721872
range = CR_RANGE(list[0]);
18731873
range_code = ni_gainlkup[board->gainlkup][range];
1874-
dither = ((list[0] & CR_ALT_FILTER) != 0);
1874+
dither = (list[0] & CR_ALT_FILTER) != 0;
18751875
bypass_bits = MSeries_AI_Bypass_Config_FIFO_Bit;
18761876
bypass_bits |= chan;
18771877
bypass_bits |=
@@ -1895,7 +1895,7 @@ static void ni_m_series_load_channelgain_list(struct comedi_device *dev,
18951895
chan = CR_CHAN(list[i]);
18961896
aref = CR_AREF(list[i]);
18971897
range = CR_RANGE(list[i]);
1898-
dither = ((list[i] & CR_ALT_FILTER) != 0);
1898+
dither = (list[i] & CR_ALT_FILTER) != 0;
18991899

19001900
range_code = ni_gainlkup[board->gainlkup][range];
19011901
devpriv->ai_offset[i] = 0;
@@ -2021,7 +2021,7 @@ static void ni_load_channelgain_list(struct comedi_device *dev,
20212021
chan = CR_CHAN(list[i]);
20222022
aref = CR_AREF(list[i]);
20232023
range = CR_RANGE(list[i]);
2024-
dither = ((list[i] & CR_ALT_FILTER) != 0);
2024+
dither = (list[i] & CR_ALT_FILTER) != 0;
20252025

20262026
/* fix the external/internal range differences */
20272027
range = ni_gainlkup[board->gainlkup][range];

drivers/staging/comedi/drivers/serial2002.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ static void serial2002_tty_read_poll_wait(struct file *f, int timeout)
143143
break;
144144
}
145145
do_gettimeofday(&now);
146-
elapsed = (1000000 * (now.tv_sec - start.tv_sec) +
147-
now.tv_usec - start.tv_usec);
146+
elapsed = 1000000 * (now.tv_sec - start.tv_sec) +
147+
now.tv_usec - start.tv_usec;
148148
if (elapsed > timeout)
149149
break;
150150
set_current_state(TASK_INTERRUPTIBLE);

0 commit comments

Comments
 (0)