diff options
author | Arnd Bergmann <arnd@arndb.de> | 2015-12-08 15:28:59 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-09 03:58:01 (GMT) |
commit | b0a8d1a0b6e569b7dd14322ca2df4d576f325908 (patch) | |
tree | 8a0e9840b1e7436db34fb5726d8351d66dbe0a9c /include/net/x25.h | |
parent | 8cde3e4425df26331dac4d0f1f7114c031728a3c (diff) | |
download | linux-b0a8d1a0b6e569b7dd14322ca2df4d576f325908.tar.xz |
net: ezchip: fix address space confusion in nps_enet.c
The nps_enet driver happily mixes virtual, physical and __iomem
addresses, which are all different depending on the architecture
and configuration. That causes a warning when building the code
on ARM with LPAE mode enabled:
drivers/net/ethernet/ezchip/nps_enet.c: In function 'nps_enet_send_frame':
drivers/net/ethernet/ezchip/nps_enet.c:370:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
but will also fail to work for other reasons.
In this patch, I'm trying to change the code to use only normal
kernel pointers, which I assume is what the author actually meant:
* For reading or writing a 32-bit word that may be unaligned when
an SKB contains unaligned data, I'm using get_unaligned/put_unaligned()
rather than memcpy_fromio/toio.
* For converting a u8 pointer to a u32 pointer, I use a cast rather
than the incorrect virt_to_phys.
* For copying a couple of bytes from one place to another while respecting
alignment, I use memcpy instead of memcpy_toio.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/x25.h')
0 files changed, 0 insertions, 0 deletions