[U-Boot] [U-Boot, 4/5] driver: net: Fix pointer conversion warnings for xilinx_zynqmp_ep
Tom Rini
trini at konsulko.com
Fri Nov 13 02:28:51 CET 2015
On Sun, Oct 25, 2015 at 01:18:54PM +0530, Prabhakar Kushwaha wrote:
> Fix below warnings happening for xilinx_zynqmp_ep_defconfig
>
> drivers/net/zynq_gem.c: In function ‘zynq_gem_init’:
> drivers/net/zynq_gem.c:330:7: warning: cast from pointer to integer
> of different size [-Wpointer-to-int-cast]
> ((u32)(priv->rxbuffers) +
> ^
> In file included from drivers/net/zynq_gem.c:19:0:
> drivers/net/zynq_gem.c:336:10: warning: cast from pointer to integer
> of different size [-Wpointer-to-int-cast]
> writel((u32)priv->rx_bd, ®s->rxqbase);
> ^
> ./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/net/zynq_gem.c: In function ‘zynq_gem_send’:
> drivers/net/zynq_gem.c:399:9: warning: cast from pointer to integer
> of different size [-Wpointer-to-int-cast]
> writel((u32)priv->tx_bd, ®s->txqbase);
> ^
> ./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/net/zynq_gem.c:404:22: warning: cast from pointer to integer
> of different size [-Wpointer-to-int-cast]
> priv->tx_bd->addr = (u32)ptr;
> ^
> drivers/net/zynq_gem.c:409:9: warning: cast from pointer to integer
> of different size [-Wpointer-to-int-cast]
> addr = (u32) ptr;
> ^
> drivers/net/zynq_gem.c:414:9: warning: cast from pointer to integer
> of different size [-Wpointer-to-int-cast]
> addr = (u32)priv->rxbuffers;
> ^
> drivers/net/zynq_gem.c: In function ‘zynq_gem_recv’:
> drivers/net/zynq_gem.c:454:31: warning: cast to pointer from integer
> of different size [-Wint-to-pointer-cast]
> net_process_received_packet((u8 *)addr, frame_len);
> ^
> drivers/net/zynq_gem.c: In function ‘zynq_gem_initialize’:
> drivers/net/zynq_gem.c:533:35: warning: cast from pointer to integer
> of different size [-Wpointer-to-int-cast]
> priv->rx_bd = (struct emac_bd *)((u32)bd_space + BD_SEPRN_SPACE);
> ^
> drivers/net/zynq_gem.c:533:16: warning: cast to pointer from integer
> of different size [-Wint-to-pointer-cast]
> priv->rx_bd = (struct emac_bd *)((u32)bd_space + BD_SEPRN_SPACE);
>
> Signed-off-by: Prabhakar Kushwaha <prabhakar at freescale.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151112/64cd2a6b/attachment.sig>
More information about the U-Boot
mailing list