[PATCH v15 01/24] watchdog: renesas_wwdt: #undef field_{get, prep}() before definition

Mikhail Kshevetskiy mikhail.kshevetskiy at iopsys.eu
Fri Jul 3 13:56:04 CEST 2026


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.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy at iopsys.eu>
---
 drivers/watchdog/renesas_wwdt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/watchdog/renesas_wwdt.c b/drivers/watchdog/renesas_wwdt.c
index f6f508c95c2..92e639a91bb 100644
--- a/drivers/watchdog/renesas_wwdt.c
+++ b/drivers/watchdog/renesas_wwdt.c
@@ -13,6 +13,7 @@
 #include <syscon.h>
 #include <wdt.h>
 
+#undef field_prep
 #define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask))
 
 #define RSIP_CTL_CFG4		0xc0
-- 
2.53.0



More information about the U-Boot mailing list