From: Geert Uytterhoeven Date: Thu, 6 Nov 2025 13:33:59 +0000 (+0100) Subject: mtd: rawnand: sunxi: #undef field_{get,prep}() before local definition X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c67c7ee7d5a522d7d38cbc0102315f07322c7c82;p=thirdparty%2Flinux.git mtd: rawnand: sunxi: #undef field_{get,prep}() before local 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. Suggested-by: Yury Norov Signed-off-by: Geert Uytterhoeven --- diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c index 031ab651c5a83..9dcdc93734cbf 100644 --- a/drivers/mtd/nand/raw/sunxi_nand.c +++ b/drivers/mtd/nand/raw/sunxi_nand.c @@ -30,7 +30,9 @@ #include /* non compile-time field get/prep */ +#undef field_get #define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1)) +#undef field_prep #define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask)) #define NFC_REG_CTL 0x0000