Linux IIO development
 help / color / mirror / Atom feed
* [PATCH v3 1/3] iio: adc: ti-ads1298: Add parentheses around macro parameter
@ 2026-05-07 19:11 Md Shofiqul Islam
  2026-05-07 19:11 ` [PATCH v3 2/3] iio: adc: ti-ads1298: Fix timeout comment and value Md Shofiqul Islam
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Md Shofiqul Islam @ 2026-05-07 19:11 UTC (permalink / raw)
  To: jic23, mike.looijmans
  Cc: linux-iio, linux-kernel, dlechner, nuno.sa, andy,
	Md Shofiqul Islam

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.

Acked-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Md Shofiqul Islam <shofiqtest@gmail.com>
---
 drivers/iio/adc/ti-ads1298.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/ti-ads1298.c b/drivers/iio/adc/ti-ads1298.c
index ae30b47e45..cf5f954206 100644
--- a/drivers/iio/adc/ti-ads1298.c
+++ b/drivers/iio/adc/ti-ads1298.c
@@ -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)
--
2.54.0.windows.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-05-09 14:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-07 19:11 [PATCH v3 1/3] iio: adc: ti-ads1298: Add parentheses around macro parameter Md Shofiqul Islam
2026-05-07 19:11 ` [PATCH v3 2/3] iio: adc: ti-ads1298: Fix timeout comment and value Md Shofiqul Islam
2026-05-07 19:11 ` [PATCH v3 3/3] iio: adc: ti-ads1298: Remove unnecessary CONFIG2 write during init Md Shofiqul Islam
2026-05-09 14:56 ` [PATCH v3 1/3] iio: adc: ti-ads1298: Add parentheses around macro parameter Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox