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 <pali@kernel.org>
Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
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[] = {