[U-Boot] [PATCH] spi: zynq: Use variable to remove u32 to u64 conversions
Jagan Teki
jagannadh.teki at gmail.com
Sun Sep 4 15:55:07 CEST 2016
On Thu, Sep 1, 2016 at 7:38 PM, Michal Simek <michal.simek at xilinx.com> wrote:
> Current code generates warning when it is compiled for arm64:
> Warnings:
> In file included from drivers/spi/zynq_spi.c:14:0:
> drivers/spi/zynq_spi.c: In function ‘zynq_spi_init_hw’:
> drivers/spi/zynq_spi.c:95:9: warning: large integer implicitly truncated
> to unsigned type [-Woverflow]
> writel(~ZYNQ_SPI_ENR_SPI_EN_MASK, ®s->enr);
> ^
> ./arch/arm/include/asm/io.h:146:34: note: in definition of macro
> ‘writel’
> #define writel(v,c) ({ u32 __v = v; __iowmb(); __arch_putl(__v,c); __v;
> })
> ^
> drivers/spi/zynq_spi.c: In function ‘zynq_spi_release_bus’:
> drivers/spi/zynq_spi.c:177:9: warning: large integer implicitly
> truncated to unsigned type [-Woverflow]
> writel(~ZYNQ_SPI_ENR_SPI_EN_MASK, ®s->enr);
> ^
> ./arch/arm/include/asm/io.h:146:34: note: in definition of macro
> ‘writel’
> #define writel(v,c) ({ u32 __v = v; __iowmb(); __arch_putl(__v,c); __v;
> })
> ^
> This patch is using one variable to do conversion via u32 variable.
>
> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
Reviewed-by: Jagan Teki <jteki at openedev.com>
thanks!
--
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
More information about the U-Boot
mailing list