]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: use %pad format string for dma_addr_t
authorArnd Bergmann <arnd@arndb.de>
Thu, 8 Dec 2016 21:57:03 +0000 (22:57 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Dec 2016 02:30:54 +0000 (21:30 -0500)
commit736d892096935396c1fe1cfe6ba5956051bc17d1
tree263446b9496ba5ed93cd0f8208f312079f1c717c
parent666bfcf3498b9f3a644fd88924672330a17ff5be
net/mlx5e: use %pad format string for dma_addr_t

On 32-bit ARM with 64-bit dma_addr_t I get this warning about an
incorrect format string:

In file included from /git/arm-soc/drivers/net/ethernet/mellanox/mlx5/core/alloc.c:42:0:
drivers/net/ethernet/mellanox/mlx5/core/alloc.c: In function ‘mlx5_frag_buf_alloc_node’:
drivers/net/ethernet/mellanox/mlx5/core/alloc.c:134:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]

We have the special %pad format for printing dma_addr_t, so use that
to print the correct address and avoid the warning.

Fixes: b8a1a17cf42b ("net/mlx5e: Implement Fragmented Work Queue (WQ)")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/alloc.c