diff options
author | Hans Wippel <hwippel@linux.vnet.ibm.com> | 2017-04-07 09:15:36 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-04-07 05:52:51 -0700 |
commit | 6bee4e26a39c51ffe698072ded1f5ab2062e4225 (patch) | |
tree | afa529d2a93f414199c386cbf7e95ee5b6a84aff /drivers/s390/net/qeth_l3_sys.c | |
parent | ff581f82330af0c0b8c10fe2fc80c9317dfd3577 (diff) | |
download | linux-stable-6bee4e26a39c51ffe698072ded1f5ab2062e4225.tar.gz linux-stable-6bee4e26a39c51ffe698072ded1f5ab2062e4225.tar.bz2 linux-stable-6bee4e26a39c51ffe698072ded1f5ab2062e4225.zip |
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_l3_sys.c')
-rw-r--r-- | drivers/s390/net/qeth_l3_sys.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/s390/net/qeth_l3_sys.c b/drivers/s390/net/qeth_l3_sys.c index 05e9471e3d3f..ff29a4b416b4 100644 --- a/drivers/s390/net/qeth_l3_sys.c +++ b/drivers/s390/net/qeth_l3_sys.c @@ -286,7 +286,7 @@ static ssize_t qeth_l3_dev_hsuid_store(struct device *dev, if (!addr) return -ENOMEM; - addr->u.a6.addr.s6_addr32[0] = 0xfe800000; + addr->u.a6.addr.s6_addr32[0] = cpu_to_be32(0xfe800000); addr->u.a6.addr.s6_addr32[1] = 0x00000000; for (i = 8; i < 16; i++) addr->u.a6.addr.s6_addr[i] = @@ -320,7 +320,7 @@ static ssize_t qeth_l3_dev_hsuid_store(struct device *dev, addr = qeth_l3_get_addr_buffer(QETH_PROT_IPV6); if (addr != NULL) { - addr->u.a6.addr.s6_addr32[0] = 0xfe800000; + addr->u.a6.addr.s6_addr32[0] = cpu_to_be32(0xfe800000); addr->u.a6.addr.s6_addr32[1] = 0x00000000; for (i = 8; i < 16; i++) addr->u.a6.addr.s6_addr[i] = card->options.hsuid[i - 8]; |