From: Gong Qianyu Date: Tue, 26 Jan 2016 07:06:39 +0000 (+0800) Subject: spi: fsl_qspi: fix compile warning for 64-bit platform X-Git-Tag: v2016.03-rc1~45^2~6 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c2a4cb17b4ff194e905df76b9f7c1b5a00b99b25;p=oweals%2Fu-boot.git spi: fsl_qspi: fix compile warning for 64-bit platform This patch fixes the following compile warning: drivers/spi/fsl_qspi.c: In function 'fsl_qspi_probe': drivers/spi/fsl_qspi.c:937:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] priv->regs = (struct fsl_qspi_regs *)plat->reg_base; ^ Just make the cast explicit. Signed-off-by: Gong Qianyu Reviewed-by: York Sun --- diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c index 542b6cfe35..38e5900dba 100644 --- a/drivers/spi/fsl_qspi.c +++ b/drivers/spi/fsl_qspi.c @@ -936,7 +936,7 @@ static int fsl_qspi_probe(struct udevice *bus) dm_spi_bus->max_hz = plat->speed_hz; - priv->regs = (struct fsl_qspi_regs *)plat->reg_base; + priv->regs = (struct fsl_qspi_regs *)(uintptr_t)plat->reg_base; priv->flags = plat->flags; priv->speed_hz = plat->speed_hz;