summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Kshevetskiy <[email protected]>2026-07-03 14:56:06 +0300
committerTom Rini <[email protected]>2026-07-08 13:29:18 -0600
commitcd36be5a4731fb1d640458101ae7327b3e450c73 (patch)
tree6aaee76cd671d8feb7d0186dadcfd16f07fe3da3
parent40db9d313be6f6700ae1530b245e48dd1f60d51b (diff)
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 <[email protected]>
-rw-r--r--drivers/net/hifemac.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/hifemac.c b/drivers/net/hifemac.c
index 62182f922f8..a64665c4023 100644
--- a/drivers/net/hifemac.c
+++ b/drivers/net/hifemac.c
@@ -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)