From ac30d240dbb520d0980f0687630feb702a14f51a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pali=20Roh=C3=A1r?= Date: Fri, 19 Aug 2022 11:20:01 +0200 Subject: [PATCH] mtd: rawnand: fsl_elbc: Fix reading address pointer from DT MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit During compilation gcc throws warning: drivers/mtd/nand/raw/fsl_elbc_nand.c: In function ‘fsl_elbc_nand_probe’: drivers/mtd/nand/raw/fsl_elbc_nand.c:841:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] return fsl_elbc_chip_init(0, (void *)dev_read_addr(dev), dev); ^ Fix it by using dev_read_addr_ptr() function which returns pointer instead of dev_read_addr() which returns integer type. Signed-off-by: Pali Rohár Reviewed-by: Dario Binacchi Signed-off-by: Dario Binacchi --- drivers/mtd/nand/raw/fsl_elbc_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/raw/fsl_elbc_nand.c b/drivers/mtd/nand/raw/fsl_elbc_nand.c index e28670a472..4f0acd7c89 100644 --- a/drivers/mtd/nand/raw/fsl_elbc_nand.c +++ b/drivers/mtd/nand/raw/fsl_elbc_nand.c @@ -838,7 +838,7 @@ void board_nand_init(void) static int fsl_elbc_nand_probe(struct udevice *dev) { - return fsl_elbc_chip_init(0, (void *)dev_read_addr(dev), dev); + return fsl_elbc_chip_init(0, dev_read_addr_ptr(dev), dev); } static const struct udevice_id fsl_elbc_nand_dt_ids[] = { -- 2.39.5