Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: iio: Remove parantheses around right hand side of assignment

Remove parantheses on the right hand side of assignments as they are not
needed. Coccinelle 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>

authored by

Janani Ravichandran and committed by
Greg Kroah-Hartman
8c79c49c fa882033

+5 -5
+2 -2
drivers/staging/iio/adc/ad7280a.c
··· 214 214 static int ad7280_write(struct ad7280_state *st, unsigned devaddr, 215 215 unsigned addr, bool all, unsigned val) 216 216 { 217 - unsigned reg = (devaddr << 27 | addr << 21 | 218 - (val & 0xFF) << 13 | all << 12); 217 + unsigned reg = devaddr << 27 | addr << 21 | 218 + (val & 0xFF) << 13 | all << 12; 219 219 220 220 reg |= ad7280_calc_crc8(st->crc_tab, reg >> 11) << 3 | 0x2; 221 221 st->buf[0] = cpu_to_be32(reg);
+3 -3
drivers/staging/iio/light/tsl2x7x_core.c
··· 687 687 688 688 /* Set the gain based on tsl2x7x_settings struct */ 689 689 chip->tsl2x7x_config[TSL2X7X_GAIN] = 690 - (chip->tsl2x7x_settings.als_gain | 690 + chip->tsl2x7x_settings.als_gain | 691 691 (TSL2X7X_mA100 | TSL2X7X_DIODE1) 692 - | ((chip->tsl2x7x_settings.prox_gain) << 2)); 692 + | ((chip->tsl2x7x_settings.prox_gain) << 2); 693 693 694 694 /* set chip struct re scaling and saturation */ 695 695 chip->als_saturation = als_count * 922; /* 90% of full scale */ ··· 983 983 984 984 result.fract /= 3; 985 985 chip->tsl2x7x_settings.als_time = 986 - (TSL2X7X_MAX_TIMER_CNT - (u8)result.fract); 986 + TSL2X7X_MAX_TIMER_CNT - (u8)result.fract; 987 987 988 988 dev_info(&chip->client->dev, "%s: als time = %d", 989 989 __func__, chip->tsl2x7x_settings.als_time);