From: Boris Brezillon Date: Mon, 9 Jul 2018 20:09:22 +0000 (+0200) Subject: mtd: rawnand: atmel: Use uintptr_t casts instead of unsigned int X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=e6848511d06189cd28f83e5aef580510699fb2b4;p=openwrt%2Fstaging%2Fblogic.git mtd: rawnand: atmel: Use uintptr_t casts instead of unsigned int 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 Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal --- diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c index e686fe73159e..e8f7549d0354 100644 --- a/drivers/mtd/nand/raw/atmel/nand-controller.c +++ b/drivers/mtd/nand/raw/atmel/nand-controller.c @@ -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