net: hifemac: #undef field_{get, prep}() before definition

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>
This commit is contained in:
Mikhail Kshevetskiy
2026-07-08 13:29:18 -06:00
committed by Tom Rini
parent 40db9d313b
commit cd36be5a47
+1
View 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)