[U-Boot] [Patch V2 1/4] spi: fsl_qspi: fix compile warning for 64-bit platform
Jagan Teki
jteki at openedev.com
Tue Dec 15 17:54:52 CET 2015
On 15 December 2015 at 15:59, Gong Qianyu <Qianyu.Gong at freescale.com> wrote:
> 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>
> ---
> V2:
> - No change.
>
> 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 ed39114..9f296c1 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;
What about using fdtdec_get_addr instead of typecasting long?
thanks!
--
Jagan.
More information about the U-Boot
mailing list