]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: adc: ti-ads1298: Add parentheses around macro parameter
authorMd Shofiqul Islam <shofiqtest@gmail.com>
Sat, 9 May 2026 15:19:57 +0000 (18:19 +0300)
committerJonathan Cameron <jic23@kernel.org>
Sun, 31 May 2026 09:59:38 +0000 (10:59 +0100)
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>
drivers/iio/adc/ti-ads1298.c

index 25261163d3e25e5650c31391749af27d33bf1db1..69911b0cde84e772dde8930a3675a322961ae92b 100644 (file)
@@ -66,7 +66,7 @@
 #define ADS1298_MASK_CONFIG3_VREF_4V           BIT(5)
 
 #define ADS1298_REG_LOFF       0x04
-#define ADS1298_REG_CHnSET(n)  (0x05 + n)
+#define ADS1298_REG_CHnSET(n)  (0x05 + (n))
 #define ADS1298_MASK_CH_PD             BIT(7)
 #define ADS1298_MASK_CH_PGA            GENMASK(6, 4)
 #define ADS1298_MASK_CH_MUX            GENMASK(2, 0)