Skip to content

Commit 8ab2847

Browse files
Boris Brezillonambarus
authored andcommitted
mtd: nand: 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 <sfr@canb.auug.org.au> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> [tudor.ambarus@microchip.com: backport the patch] Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
1 parent 0739224 commit 8ab2847

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/mtd/nand/atmel/nand-controller.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2042,7 +2042,7 @@ atmel_smc_nand_controller_init(struct atmel_smc_nand_controller *nc)
20422042
return ret;
20432043
}
20442044

2045-
nc->ebi_csa_offs = (unsigned int)match->data;
2045+
nc->ebi_csa_offs = (uintptr_t)match->data;
20462046

20472047
/*
20482048
* The at91sam9263 has 2 EBIs, if the NAND controller is under EBI1

0 commit comments

Comments
 (0)