From: Haneen Mohammed Date: Fri, 13 Mar 2015 11:29:30 +0000 (+0300) Subject: Staging: comedi: Remove parentheses around right side assignment X-Git-Tag: v4.1-rc1~152^2~138^2~424 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f0dff42124d3d312c236c5b934edeac477c818f7;p=karo-tx-linux.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/addi_apci_3501.c b/drivers/staging/comedi/drivers/addi_apci_3501.c index b8f336681788..babbdffefa88 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3501.c +++ b/drivers/staging/comedi/drivers/addi_apci_3501.c @@ -270,7 +270,7 @@ static irqreturn_t apci3501_interrupt(int irq, void *d) /* Disable Interrupt */ ul_Command1 = inl(dev->iobase + APCI3501_TIMER_CTRL_REG); - ul_Command1 = (ul_Command1 & 0xFFFFF9FDul); + ul_Command1 = ul_Command1 & 0xFFFFF9FDul; outl(ul_Command1, dev->iobase + APCI3501_TIMER_CTRL_REG); ui_Timer_AOWatchdog = inl(dev->iobase + APCI3501_TIMER_IRQ_REG) & 0x1; @@ -282,7 +282,7 @@ static irqreturn_t apci3501_interrupt(int irq, void *d) /* Enable Interrupt Send a signal to from kernel to user space */ send_sig(SIGIO, devpriv->tsk_Current, 0); ul_Command1 = inl(dev->iobase + APCI3501_TIMER_CTRL_REG); - ul_Command1 = ((ul_Command1 & 0xFFFFF9FDul) | 1 << 1); + ul_Command1 = (ul_Command1 & 0xFFFFF9FDul) | 1 << 1; outl(ul_Command1, dev->iobase + APCI3501_TIMER_CTRL_REG); inl(dev->iobase + APCI3501_TIMER_STATUS_REG); diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index 42fdedd6943c..ecfd0544cf40 100644 --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -1360,7 +1360,7 @@ static void get_last_sample_611x(struct comedi_device *dev) /* Check if there's a single sample stuck in the FIFO */ if (ni_readb(dev, XXX_Status) & 0x80) { dl = ni_readl(dev, ADC_FIFO_Data_611x); - data = (dl & 0xffff); + data = dl & 0xffff; comedi_buf_write_samples(s, &data, 1); } } @@ -1871,7 +1871,7 @@ static void ni_m_series_load_channelgain_list(struct comedi_device *dev, chan = CR_CHAN(list[0]); range = CR_RANGE(list[0]); range_code = ni_gainlkup[board->gainlkup][range]; - dither = ((list[0] & CR_ALT_FILTER) != 0); + dither = (list[0] & CR_ALT_FILTER) != 0; bypass_bits = MSeries_AI_Bypass_Config_FIFO_Bit; bypass_bits |= chan; bypass_bits |= @@ -1895,7 +1895,7 @@ static void ni_m_series_load_channelgain_list(struct comedi_device *dev, chan = CR_CHAN(list[i]); aref = CR_AREF(list[i]); range = CR_RANGE(list[i]); - dither = ((list[i] & CR_ALT_FILTER) != 0); + dither = (list[i] & CR_ALT_FILTER) != 0; range_code = ni_gainlkup[board->gainlkup][range]; devpriv->ai_offset[i] = 0; @@ -2021,7 +2021,7 @@ static void ni_load_channelgain_list(struct comedi_device *dev, chan = CR_CHAN(list[i]); aref = CR_AREF(list[i]); range = CR_RANGE(list[i]); - dither = ((list[i] & CR_ALT_FILTER) != 0); + dither = (list[i] & CR_ALT_FILTER) != 0; /* fix the external/internal range differences */ range = ni_gainlkup[board->gainlkup][range]; diff --git a/drivers/staging/comedi/drivers/serial2002.c b/drivers/staging/comedi/drivers/serial2002.c index 482a2a8a4a57..ad35ed6e93f0 100644 --- a/drivers/staging/comedi/drivers/serial2002.c +++ b/drivers/staging/comedi/drivers/serial2002.c @@ -143,8 +143,8 @@ static void serial2002_tty_read_poll_wait(struct file *f, int timeout) break; } do_gettimeofday(&now); - elapsed = (1000000 * (now.tv_sec - start.tv_sec) + - now.tv_usec - start.tv_usec); + elapsed = 1000000 * (now.tv_sec - start.tv_sec) + + now.tv_usec - start.tv_usec; if (elapsed > timeout) break; set_current_state(TASK_INTERRUPTIBLE);