Commit 280f669b authored by Shang XiaoJing's avatar Shang XiaoJing Committed by Greg Kroah-Hartman

staging: rtl8192e: cmdpkt: Use skb_put_data() instead of skb_put/memcpy pair

Use skb_put_data() instead of skb_put() and memcpy(), which is shorter
and clear.
Signed-off-by: default avatarShang XiaoJing <shangxiaojing@huawei.com>
Link: https://lore.kernel.org/r/20220927024220.14044-1-shangxiaojing@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a6e7f8a4
......@@ -59,8 +59,7 @@ bool rtl92e_send_cmd_pkt(struct net_device *dev, u32 type, const void *data,
tcb_desc->txbuf_size = frag_length;
}
seg_ptr = skb_put(skb, frag_length);
memcpy(seg_ptr, data, (u32)frag_length);
skb_put_data(skb, data, frag_length);
if (type == DESC_PACKET_TYPE_INIT &&
(!priv->rtllib->check_nic_enough_desc(dev, TXCMD_QUEUE) ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment