staging: iio: Remove parentheses on the right hand side of assignment
authorJanani Ravichandran <janani.rvchndrn@gmail.com>
Thu, 11 Feb 2016 20:41:55 +0000 (15:41 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Feb 2016 03:37:15 +0000 (19:37 -0800)
Remove parentheses on the right hand side of assignment as they are not
needed. Semantic patch used:

@@
expression a, b, c, d;
@@

(
  a = (c == d)
|
  a =
- (
  b
- )
)
Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/iio/accel/lis3l02dq_core.c
drivers/staging/iio/cdc/ad7746.c

index 7939ae6378d7876efc1bd162a7185878fb365616..7a6fed3f2d3f1074ebbe3d9987fe5d5ac347128b 100644 (file)
@@ -567,7 +567,7 @@ static int lis3l02dq_read_event_config(struct iio_dev *indio_dev,
 {
        u8 val;
        int ret;
-       u8 mask = (1 << (chan->channel2 * 2 + (dir == IIO_EV_DIR_RISING)));
+       u8 mask = 1 << (chan->channel2 * 2 + (dir == IIO_EV_DIR_RISING));
 
        ret = lis3l02dq_spi_read_reg_8(indio_dev,
                                       LIS3L02DQ_REG_WAKE_UP_CFG_ADDR,
@@ -622,7 +622,7 @@ static int lis3l02dq_write_event_config(struct iio_dev *indio_dev,
        u8 val, control;
        u8 currentlyset;
        bool changed = false;
-       u8 mask = (1 << (chan->channel2 * 2 + (dir == IIO_EV_DIR_RISING)));
+       u8 mask = 1 << (chan->channel2 * 2 + (dir == IIO_EV_DIR_RISING));
 
        mutex_lock(&indio_dev->mlock);
        /* read current control */
index 2c5d27784ed300dfa5f090de08f487846bd59079..5771d4ee8ef106755b84a82cf8bbc7bc350b53f2 100644 (file)
@@ -529,8 +529,8 @@ static int ad7746_write_raw(struct iio_dev *indio_dev,
 
                val /= 338646;
 
-               chip->capdac[chan->channel][chan->differential] = (val > 0 ?
-                       AD7746_CAPDAC_DACP(val) | AD7746_CAPDAC_DACEN : 0);
+               chip->capdac[chan->channel][chan->differential] = val > 0 ?
+                       AD7746_CAPDAC_DACP(val) | AD7746_CAPDAC_DACEN : 0;
 
                ret = i2c_smbus_write_byte_data(chip->client,
                        AD7746_REG_CAPDACA,