Commit 5db4851d authored by Haneen Mohammed's avatar Haneen Mohammed Committed by Greg Kroah-Hartman

Staging: iio: Remove parentheses around right side an assignment

Parentheses are not needed around the right hand side of an assignment.
This patch remove parenthese of such occurenses. 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: default avatarHaneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6fe9092d
...@@ -46,7 +46,7 @@ static ssize_t adis16240_spi_read_signed(struct device *dev, ...@@ -46,7 +46,7 @@ static ssize_t adis16240_spi_read_signed(struct device *dev,
if (val & ADIS16240_ERROR_ACTIVE) if (val & ADIS16240_ERROR_ACTIVE)
adis_check_status(st); adis_check_status(st);
val = ((s16)(val << shift) >> shift); val = (s16)(val << shift) >> shift;
return sprintf(buf, "%d\n", val); return sprintf(buf, "%d\n", val);
} }
......
...@@ -613,8 +613,8 @@ static int tsl2x7x_als_calibrate(struct iio_dev *indio_dev) ...@@ -613,8 +613,8 @@ static int tsl2x7x_als_calibrate(struct iio_dev *indio_dev)
return lux_val; return lux_val;
} }
gain_trim_val = (((chip->tsl2x7x_settings.als_cal_target) gain_trim_val = ((chip->tsl2x7x_settings.als_cal_target)
* chip->tsl2x7x_settings.als_gain_trim) / lux_val); * chip->tsl2x7x_settings.als_gain_trim) / lux_val;
if ((gain_trim_val < 250) || (gain_trim_val > 4000)) if ((gain_trim_val < 250) || (gain_trim_val > 4000))
return -ERANGE; return -ERANGE;
......
...@@ -411,7 +411,7 @@ static ssize_t ade7753_write_frequency(struct device *dev, ...@@ -411,7 +411,7 @@ static ssize_t ade7753_write_frequency(struct device *dev,
mutex_lock(&indio_dev->mlock); mutex_lock(&indio_dev->mlock);
t = (27900 / val); t = 27900 / val;
if (t > 0) if (t > 0)
t--; t--;
......
...@@ -432,7 +432,7 @@ static ssize_t ade7754_write_frequency(struct device *dev, ...@@ -432,7 +432,7 @@ static ssize_t ade7754_write_frequency(struct device *dev,
mutex_lock(&indio_dev->mlock); mutex_lock(&indio_dev->mlock);
t = (26000 / val); t = 26000 / val;
if (t > 0) if (t > 0)
t--; t--;
......
...@@ -371,7 +371,7 @@ static ssize_t ade7759_write_frequency(struct device *dev, ...@@ -371,7 +371,7 @@ static ssize_t ade7759_write_frequency(struct device *dev,
mutex_lock(&indio_dev->mlock); mutex_lock(&indio_dev->mlock);
t = (27900 / val); t = 27900 / val;
if (t > 0) if (t > 0)
t--; t--;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment