Skip to content

Commit 5d7b3df

Browse files
shofiqtestjic23
authored andcommitted
iio: adc: ti-ads1298: Add parentheses around macro parameter
ADS1298_REG_CHnSET() is missing parentheses around the parameter 'n'. Add them to follow kernel macro coding style and prevent potential operator precedence issues if the argument is an expression. Signed-off-by: Md Shofiqul Islam <shofiqtest@gmail.com> Reviewed-by: Stepan Ionichev <sozdayvek@gmail.com> Acked-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
1 parent d0f23d8 commit 5d7b3df

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/iio/adc/ti-ads1298.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
#define ADS1298_MASK_CONFIG3_VREF_4V BIT(5)
6767

6868
#define ADS1298_REG_LOFF 0x04
69-
#define ADS1298_REG_CHnSET(n) (0x05 + n)
69+
#define ADS1298_REG_CHnSET(n) (0x05 + (n))
7070
#define ADS1298_MASK_CH_PD BIT(7)
7171
#define ADS1298_MASK_CH_PGA GENMASK(6, 4)
7272
#define ADS1298_MASK_CH_MUX GENMASK(2, 0)

0 commit comments

Comments
 (0)