[PATCH v5 05/23] iio: dac: ad3530r: #undef field_prep() before local definition
Geert Uytterhoeven
geert+renesas at glider.be
Tue Oct 28 05:41:39 AEDT 2025
Prepare for the advent of a globally available common field_prep() macro
by undefining the symbol before defining a local variant. This prevents
redefinition warnings from the C preprocessor when introducing the common
macro later.
Suggested-by: Yury Norov <yury.norov at gmail.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas at glider.be>
--
v5:
- New.
---
drivers/iio/dac/ad3530r.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iio/dac/ad3530r.c b/drivers/iio/dac/ad3530r.c
index 6134613777b8e1d4..5684d11137f29948 100644
--- a/drivers/iio/dac/ad3530r.c
+++ b/drivers/iio/dac/ad3530r.c
@@ -54,6 +54,7 @@
#define AD3531R_MAX_CHANNELS 4
/* Non-constant mask variant of FIELD_PREP() */
+#undef field_prep
#define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask))
enum ad3530r_mode {
--
2.43.0
More information about the Linux-aspeed
mailing list