diff options
author | Arnd Bergmann <arnd@arndb.de> | 2015-12-08 18:32:59 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-12 03:34:39 +0300 |
commit | 9dd2d6c5c9755b160fe0111bcdad9491676feea8 (patch) | |
tree | 940c9a8977560f48741af4a1145a09113be0e7fc /drivers/net/ethernet/ti/netcp.h | |
parent | 899077791403ff7a2d8cfaa87bd1a82d729463e2 (diff) | |
download | linux-9dd2d6c5c9755b160fe0111bcdad9491676feea8.tar.xz |
netcp: add more __le32 annotations
The handling of epib and psdata remains a bit unclear in the driver,
as we access the same fields both as CPU-endian and through DMA
from the device.
Sparse warns about this:
ti/netcp_core.c:1147:21: warning: incorrect type in assignment (different base types)
ti/netcp_core.c:1147:21: expected unsigned int [usertype] *[assigned] epib
ti/netcp_core.c:1147:21: got restricted __le32 *<noident>
This uses __le32 types in a few places and uses __force where the code
looks fishy. The previous patch should really have produced the correct
behavior, but this second patch is needed to shut up the warnings about
it. Ideally it would be slightly rewritten to not need those casts,
but I don't dare do that without access to the hardware for proper
testing.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti/netcp.h')
-rw-r--r-- | drivers/net/ethernet/ti/netcp.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ti/netcp.h b/drivers/net/ethernet/ti/netcp.h index bb1bb72121c0..17a26a429b71 100644 --- a/drivers/net/ethernet/ti/netcp.h +++ b/drivers/net/ethernet/ti/netcp.h @@ -113,7 +113,7 @@ struct netcp_intf { #define NETCP_PSDATA_LEN KNAV_DMA_NUM_PS_WORDS struct netcp_packet { struct sk_buff *skb; - u32 *epib; + __le32 *epib; u32 *psdata; unsigned int psdata_len; struct netcp_intf *netcp; |