mtd: rawnand: sunxi: Add an U suffix to NFC_PAGE_OP definition
authorBoris Brezillon <boris.brezillon@bootlin.com>
Mon, 9 Jul 2018 20:09:31 +0000 (22:09 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 18 Jul 2018 08:10:19 +0000 (10:10 +0200)
Fixes the "warning: large integer implicitly truncated to unsigned type
[-Woverflow]" warning when compiled for x86.

This is needed in order to allow compiling this driver when
COMPILE_TEST=y.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/sunxi_nand.c

index d831a14..99043c3 100644 (file)
 #define NFC_CMD_TYPE_MSK       GENMASK(31, 30)
 #define NFC_NORMAL_OP          (0 << 30)
 #define NFC_ECC_OP             (1 << 30)
-#define NFC_PAGE_OP            (2 << 30)
+#define NFC_PAGE_OP            (2U << 30)
 
 /* define bit use in NFC_RCMD_SET */
 #define NFC_READ_CMD_MSK       GENMASK(7, 0)