Fix pointer from interget warning when compiling for ARM64
When compiling for arm64, we get this error:
error: passing argument 2 of ‘__memcpy_fromio’ makes pointer from
integer without a cast [-Wint-conversion]
Fix that with a cast to (void *)(uintptr_t)
Signed-off-by: Richard Genoud <[email protected]>
---
drivers/mtd/nand/raw/sunxi_nand_spl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/raw/sunxi_nand_spl.c
b/drivers/mtd/nand/raw/sunxi_nand_spl.c
index 4f1e2d9a5775..19091ece632b 100644
--- a/drivers/mtd/nand/raw/sunxi_nand_spl.c
+++ b/drivers/mtd/nand/raw/sunxi_nand_spl.c
@@ -310,7 +310,8 @@ static int nand_read_page(const struct nfc_config *conf,
u32 offs,
return 1;
/* Retrieve the data from SRAM */
- memcpy_fromio(data, SUNXI_NFC_BASE + NFC_RAM0_BASE,
+ memcpy_fromio(data,
+ (void *)(uintptr_t)SUNXI_NFC_BASE + NFC_RAM0_BASE,
conf->ecc_size);
/* Stop the ECC engine */