Skip to contentSkip to conversation

net: ax88796c: Use skb_put_data() instead of skb_put/memcpy pair

PATCH Applied Shang XiaoJing 2 participants 2 messages Sep 27, 2022 – Sep 29, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: ax88796c: Use skb_put_data() instead of skb_put/memcpy pair

Use skb_put_data() instead of skb_put() and memcpy(), which is clear.

---
 drivers/net/ethernet/asix/ax88796c_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/asix/ax88796c_main.c +1 -1
index f1d610efd69e..8b7cdf015a16 100644
@@ -293,7 +293,7 @@ ax88796c_tx_fixup(struct net_device *ndev, struct sk_buff_head *q)
 	skb_put(skb, padlen);
 
 	/* EOP header */
-	memcpy(skb_put(skb, TX_EOP_SIZE), &info.eop, TX_EOP_SIZE);
+	skb_put_data(skb, &info.eop, TX_EOP_SIZE);
 
 	skb_unlink(skb, q);
 
Signature · 1 line
2.17.1
#1 lore raw
This patch was applied to netdev/net-next.git (master) by Paolo Abeni <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by Paolo Abeni <[email protected]>:

Quoted 6 lines · On Tue, 27 Sep 2022 10:30:43 +0800 you wrote:

Use skb_put_data() instead of skb_put() and memcpy(), which is clear.

---
 drivers/net/ethernet/asix/ax88796c_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
- [-next] net: ax88796c: Use skb_put_data() instead of skb_put/memcpy pair

    https://git.kernel.org/netdev/net-next/c/85e69a7dd693

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html