From: Md Shofiqul Islam <shofiqtest@gmail.com>
To: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: jic23@kernel.org, mike.looijmans@topic.nl, dlechner@baylibre.com,
nuno.sa@analog.com, andy@kernel.org, andriy.shevchenko@intel.com,
Md Shofiqul Islam <shofiqtest@gmail.com>
Subject: [PATCH v4 1/3] iio: adc: ti-ads1298: Add parentheses around macro parameter
Date: Sat, 9 May 2026 18:19:57 +0300 [thread overview]
Message-ID: <20260509151959.3475-2-shofiqtest@gmail.com> (raw)
In-Reply-To: <20260509151959.3475-1-shofiqtest@gmail.com>
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>
---
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
next prev parent reply other threads:[~2026-05-09 15:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-09 15:19 [PATCH v4 0/3] iio: adc: ti-ads1298: Minor driver cleanups Md Shofiqul Islam
2026-05-09 15:19 ` Md Shofiqul Islam [this message]
2026-05-09 11:38 ` [PATCH v4 1/3] iio: adc: ti-ads1298: Add parentheses around macro parameter Stepan Ionichev
2026-05-11 16:05 ` Jonathan Cameron
2026-05-09 15:19 ` [PATCH v4 2/3] iio: adc: ti-ads1298: Fix incorrect timeout comment Md Shofiqul Islam
2026-05-09 20:27 ` David Lechner
2026-05-10 6:59 ` Andy Shevchenko
2026-05-11 5:20 ` mike.looijmans
2026-05-11 10:14 ` Andy Shevchenko
2026-05-09 15:19 ` [PATCH v4 3/3] iio: adc: ti-ads1298: Remove unnecessary CONFIG2 write during init Md Shofiqul Islam
2026-05-09 20:36 ` David Lechner
2026-05-11 16:06 ` Jonathan Cameron
2026-05-11 17:59 ` mike.looijmans
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260509151959.3475-2-shofiqtest@gmail.com \
--to=shofiqtest@gmail.com \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.looijmans@topic.nl \
--cc=nuno.sa@analog.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox