OSDN Git Service

net: netsec: use dma_addr_t for storing dma address
authorArnd Bergmann <arnd@arndb.de>
Sat, 13 Jan 2018 21:13:44 +0000 (22:13 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 14 Jan 2018 17:00:23 +0000 (12:00 -0500)
commit54f7bf7230520ef6f0c79ac507fef46e5d7aa7fb
treec36c1a1d7ec78f9d82030e62a928c02e3e3408e2
parent6bd39bc3da0f4a301fae69c4a32db2768f5118be
net: netsec: use dma_addr_t for storing dma address

On targets that have different sizes for phys_addr_t and dma_addr_t,
we get a type mismatch error:

drivers/net/ethernet/socionext/netsec.c: In function 'netsec_alloc_dring':
drivers/net/ethernet/socionext/netsec.c:970:9: error: passing argument 3 of 'dma_zalloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types]

The code is otherwise correct, as the address is never actually used as a
physical address but only passed into a DMA register.  For consistently,
I'm changing the variable name as well, to clarify that this is a DMA
address.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/socionext/netsec.c