summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2025-11-06 14:33:59 +0100
committerMiquel Raynal <miquel.raynal@bootlin.com>2025-11-27 18:24:01 +0100
commitc67c7ee7d5a522d7d38cbc0102315f07322c7c82 (patch)
treebdc37a3f45314b0bc7f79de53632620230ce516e
parentb98994cb9bc24f5c7575c86650f96c384576fdfa (diff)
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 <yury.norov@gmail.com> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-rw-r--r--drivers/mtd/nand/raw/sunxi_nand.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c
index 031ab651c5a8..9dcdc93734cb 100644
--- a/drivers/mtd/nand/raw/sunxi_nand.c
+++ b/drivers/mtd/nand/raw/sunxi_nand.c
@@ -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