]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mtd: rawnand: sunxi: #undef field_{get,prep}() before local definition
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 6 Nov 2025 13:33:59 +0000 (14:33 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 27 Nov 2025 17:24:01 +0000 (18:24 +0100)
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 <yury.norov@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/mtd/nand/raw/sunxi_nand.c

index 031ab651c5a83b74c5c03d5cd5e61c4bc9ef6fc8..9dcdc93734cbff394a9356e5e07796a8ffcb187e 100644 (file)
@@ -30,7 +30,9 @@
 #include <linux/reset.h>
 
 /* 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