[PATCH v15 12/24] net: hifemac: Convert to common field_{get, prep}() helpers
Mikhail Kshevetskiy
mikhail.kshevetskiy at iopsys.eu
Fri Jul 3 13:56:15 CEST 2026
Drop the driver-specific field_get() and field_prep() macros, in favor
of the globally available variants from <linux/bitfield.h>.
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy at iopsys.eu>
---
drivers/net/hifemac.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/hifemac.c b/drivers/net/hifemac.c
index a64665c4023..7dda8cb8815 100644
--- a/drivers/net/hifemac.c
+++ b/drivers/net/hifemac.c
@@ -401,10 +401,6 @@ static void hisi_femac_get_strings(struct udevice *dev, u8 *data)
strcpy(data + i * ETH_GSTRING_LEN, hisi_femac_stats_table[i].name);
}
-/* 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)
{
int i;
--
2.53.0
More information about the U-Boot
mailing list