OSDN Git Service

net: stmmac: selftests: Fix sparse warning
authorJose Abreu <Jose.Abreu@synopsys.com>
Wed, 29 May 2019 08:30:25 +0000 (10:30 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 May 2019 19:58:54 +0000 (12:58 -0700)
Variable shall be __be16. Fix it.

Fixes: 091810dbded9 ("net: stmmac: Introduce selftests support")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Cc: Joao Pinto <jpinto@synopsys.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c

index 33dc37c..9d9bad5 100644 (file)
@@ -114,7 +114,7 @@ static struct sk_buff *stmmac_test_get_udp_skb(struct stmmac_priv *priv,
        }
 
        if (attr->vlan) {
-               u16 *tag, *proto;
+               __be16 *tag, *proto;
 
                if (!attr->remove_sa) {
                        tag = (void *)ehdr + ETH_HLEN;