Skip to content

Commit c67c7ee

Browse files
geertumiquelraynal
authored andcommitted
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>
1 parent b98994c commit c67c7ee

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/mtd/nand/raw/sunxi_nand.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
#include <linux/reset.h>
3131

3232
/* non compile-time field get/prep */
33+
#undef field_get
3334
#define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1))
35+
#undef field_prep
3436
#define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask))
3537

3638
#define NFC_REG_CTL 0x0000

0 commit comments

Comments
 (0)