Skip to contentSkip to conversation

net: stmmac: selftests: Two fixes

PATCH In review Jose Abreu 2 participants 4 messages May 29, 2019 – May 30, 2019

Subsystems (4)
lore
Share & tools
lore
author
#1 lore raw

PATCH 1/2 net: stmmac: selftests: Fix sparse warning

In reply to Jose Abreu

Variable shall be __be16. Fix it.

Fixes 091810dbded9 ("net: stmmac: Introduce selftests support")
Cc Joao Pinto <[email protected]>
Cc David S. Miller <[email protected]>
Cc Giuseppe Cavallaro <[email protected]>
Cc Alexandre Torgue <[email protected]>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c +1 -1
index 33dc37c7e1c1..9d9bad5d31bf 100644
@@ -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;
Signature · 1 line
2.7.4

Jose Abreu

author
#0 lore raw

cover net: stmmac: selftests: Two fixes

Two fixes reported by kbuild.

Cc Joao Pinto <[email protected]>
Cc David S. Miller <[email protected]>
Cc Giuseppe Cavallaro <[email protected]>
Cc Alexandre Torgue <[email protected]>

Jose Abreu (2):
net: stmmac: selftests: Fix sparse warning
net: stmmac: selftests: Use kfree_skb() instead of kfree()

 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.7.4
author
#2 lore raw

PATCH 2/2 net: stmmac: selftests: Use kfree_skb() instead of kfree()

kfree_skb() shall be used instead of kfree(). Fix it.

Fixes 091810dbded9 ("net: stmmac: Introduce selftests support")
Cc Joao Pinto <[email protected]>
Cc David S. Miller <[email protected]>
Cc Giuseppe Cavallaro <[email protected]>
Cc Alexandre Torgue <[email protected]>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c +1 -1
index 9d9bad5d31bf..a97b1ea76438 100644
@@ -617,7 +617,7 @@ static int stmmac_test_flowctrl_validate(struct sk_buff *skb,
 	tpriv->ok = true;
 	complete(&tpriv->comp);
 out:
-	kfree(skb);
+	kfree_skb(skb);
 	return 0;
 }
 
Signature · 1 line
2.7.4