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: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
if (val & ADIS16240_ERROR_ACTIVE)
adis_check_status(st);
- val = ((s16)(val << shift) >> shift);
+ val = (s16)(val << shift) >> shift;
return sprintf(buf, "%d\n", val);
}
return lux_val;
}
- gain_trim_val = (((chip->tsl2x7x_settings.als_cal_target)
- * chip->tsl2x7x_settings.als_gain_trim) / lux_val);
+ gain_trim_val = ((chip->tsl2x7x_settings.als_cal_target)
+ * chip->tsl2x7x_settings.als_gain_trim) / lux_val;
if ((gain_trim_val < 250) || (gain_trim_val > 4000))
return -ERANGE;
mutex_lock(&indio_dev->mlock);
- t = (27900 / val);
+ t = 27900 / val;
if (t > 0)
t--;
mutex_lock(&indio_dev->mlock);
- t = (26000 / val);
+ t = 26000 / val;
if (t > 0)
t--;
mutex_lock(&indio_dev->mlock);
- t = (27900 / val);
+ t = 27900 / val;
if (t > 0)
t--;