net/iucv: improve endianness handling
authorHans Wippel <hwippel@linux.vnet.ibm.com>
Fri, 23 Jun 2017 17:32:27 +0000 (19:32 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 25 Jun 2017 15:42:58 +0000 (11:42 -0400)
Use proper endianness conversion for an skb protocol assignment. Given
that IUCV is only available on big endian systems (s390), this simply
avoids an endianness warning reported by sparse.

Signed-off-by: Hans Wippel <hwippel@linux.vnet.ibm.com>
Reviewed-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Reviewed-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/iucv/af_iucv.c

index 2cf9d59f1b7271a60a478d849ee159a4279c8880..05112094d76b4b65ac6997ab20ba9d45f374e856 100644 (file)
@@ -362,7 +362,7 @@ static int afiucv_hs_send(struct iucv_message *imsg, struct sock *sock,
                else
                        skb_trim(skb, skb->dev->mtu);
        }
-       skb->protocol = ETH_P_AF_IUCV;
+       skb->protocol = cpu_to_be16(ETH_P_AF_IUCV);
        nskb = skb_clone(skb, GFP_ATOMIC);
        if (!nskb)
                return -ENOMEM;