mtd: rawnand: atmel: Use uintptr_t casts instead of unsigned int
authorBoris Brezillon <boris.brezillon@bootlin.com>
Mon, 9 Jul 2018 20:09:22 +0000 (22:09 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 18 Jul 2018 08:10:15 +0000 (10:10 +0200)
When casting a pointer to an unsigned int, uintptr_t should be used to
cope with the pointer size differences between 32-bit and 64-bit
architectures.

This is needed if we want to allow compilation of 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/atmel/nand-controller.c

index e686fe73159e3c6ba72db6f7a318085877038274..e8f7549d035468cc5345423c641bee0b704b5173 100644 (file)
@@ -2050,7 +2050,7 @@ atmel_smc_nand_controller_init(struct atmel_smc_nand_controller *nc)
                return ret;
        }
 
-       nc->ebi_csa_offs = (unsigned int)match->data;
+       nc->ebi_csa_offs = (uintptr_t)match->data;
 
        /*
         * The at91sam9263 has 2 EBIs, if the NAND controller is under EBI1