summaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/qeth_core.h
diff options
context:
space:
mode:
authorHans Wippel <hwippel@linux.vnet.ibm.com>2017-04-07 09:15:36 +0200
committerDavid S. Miller <davem@davemloft.net>2017-04-07 05:52:51 -0700
commit6bee4e26a39c51ffe698072ded1f5ab2062e4225 (patch)
treeafa529d2a93f414199c386cbf7e95ee5b6a84aff /drivers/s390/net/qeth_core.h
parentff581f82330af0c0b8c10fe2fc80c9317dfd3577 (diff)
downloadlinux-6bee4e26a39c51ffe698072ded1f5ab2062e4225.tar.bz2
s390/qeth: improve endianness handling
Avoid endianness warnings reported by sparse by (1) using endianness conversions for assigning and using network packet fields, and (2) removing unnecessary endianness conversions from qeth_l3_rebuild_skb. No functional changes. Signed-off-by: Hans Wippel <hwippel@linux.vnet.ibm.com> Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/qeth_core.h')
-rw-r--r--drivers/s390/net/qeth_core.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h
index 3277edad54bc..ed5b3582adba 100644
--- a/drivers/s390/net/qeth_core.h
+++ b/drivers/s390/net/qeth_core.h
@@ -844,9 +844,9 @@ static inline int qeth_get_ip_version(struct sk_buff *skb)
{
__be16 *p = &((struct ethhdr *)skb->data)->h_proto;
- if (*p == ETH_P_8021Q)
+ if (be16_to_cpu(*p) == ETH_P_8021Q)
p += 2;
- switch (*p) {
+ switch (be16_to_cpu(*p)) {
case ETH_P_IPV6:
return 6;
case ETH_P_IP: