[PATCH v6 07/26] pinctrl: ma35: #undef field_{get,prep}() before local definition
Geert Uytterhoeven
geert+renesas at glider.be
Fri Nov 7 00:33:55 AEDT 2025
Prepare for the advent of globally available common field_get() and
field_prep() macros by undefining the symbols before defining local
variants. This prevents redefinition warnings from the C preprocessor
when introducing the common macros later.
Suggested-by: Yury Norov <yury.norov at gmail.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas at glider.be>
Acked-by: Linus Walleij <linus.walleij at linaro.org>
---
v6:
- Add Acked-by,
v5:
- New.
---
drivers/pinctrl/nuvoton/pinctrl-ma35.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pinctrl/nuvoton/pinctrl-ma35.c b/drivers/pinctrl/nuvoton/pinctrl-ma35.c
index cdad01d68a37e365..925dd717c9deead5 100644
--- a/drivers/pinctrl/nuvoton/pinctrl-ma35.c
+++ b/drivers/pinctrl/nuvoton/pinctrl-ma35.c
@@ -82,7 +82,9 @@
#define MVOLT_3300 1
/* Non-constant mask variant of FIELD_GET() and FIELD_PREP() */
+#undef field_get
#define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1))
+#undef field_prep
#define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask))
static const char * const gpio_group_name[] = {
--
2.43.0
More information about the Linux-aspeed
mailing list