From: Pali Rohár Date: Fri, 19 Aug 2022 09:20:01 +0000 (+0200) Subject: mtd: rawnand: fsl_elbc: Fix reading address pointer from DT X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=ac30d240dbb520d0980f0687630feb702a14f51a;p=u-boot.git mtd: rawnand: fsl_elbc: Fix reading address pointer from DT 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 --- 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[] = {