net: ax88796c: Use skb_put_data() instead of skb_put/memcpy pair
authorShang XiaoJing <shangxiaojing@huawei.com>
Tue, 27 Sep 2022 02:30:43 +0000 (10:30 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 29 Sep 2022 07:37:29 +0000 (09:37 +0200)
Use skb_put_data() instead of skb_put() and memcpy(), which is clear.

Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
Link: https://lore.kernel.org/r/20220927023043.17769-1-shangxiaojing@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/asix/ax88796c_main.c

index f1d610efd69ee2c59861d2173346736cb2abccf0..8b7cdf015a16ee4700a05db36482f5585769bbda 100644 (file)
@@ -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);