[U-Boot] [PATCH 2/3] spi: fsl_qspi: fix compile warning for 64-bit platform

Gong Qianyu Qianyu.Gong at freescale.com
Mon Dec 14 11:32:27 CET 2015


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;
               ^
Signed-off-by: Gong Qianyu <Qianyu.Gong at freescale.com>

Signed-off-by: Gong Qianyu <Qianyu.Gong at freescale.com>
---
 drivers/spi/fsl_qspi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c
index d8d37cd..755cc27 100644
--- a/drivers/spi/fsl_qspi.c
+++ b/drivers/spi/fsl_qspi.c
@@ -931,7 +931,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 *)(unsigned long)plat->reg_base;
 	priv->flags = plat->flags;
 
 	priv->speed_hz = plat->speed_hz;
-- 
2.1.0.27.g96db324



More information about the U-Boot mailing list