]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
net: hifemac: #undef field_{get, prep}() before definition
authorMikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Fri, 3 Jul 2026 11:56:06 +0000 (14:56 +0300)
committerTom Rini <trini@konsulko.com>
Wed, 8 Jul 2026 19:29:18 +0000 (13:29 -0600)
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@iopsys.eu>
drivers/net/hifemac.c

index 62182f922f8cdf802f603fd0f8f7ff49c4e796a1..a64665c402312d6303ea1f10fc0713fb51b29ae8 100644 (file)
@@ -402,6 +402,7 @@ static void hisi_femac_get_strings(struct udevice *dev, u8 *data)
 }
 
 /* Non-constant mask variant of FIELD_GET/FIELD_PREP */
+#undef field_get
 #define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1))
 
 static void hisi_femac_get_stats(struct udevice *dev, u64 *data)