Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

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

Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
Reviewed-by: M Chetan Kumar <m.chetan.kumar@intel.com>
Link: https://lore.kernel.org/r/20220927023254.30342-1-shangxiaojing@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Shang XiaoJing and committed by
Jakub Kicinski
f45892f7 8278ddb1

+1 -1
+1 -1
drivers/net/wwan/iosm/iosm_ipc_imem_ops.c
··· 590 590 goto out; 591 591 } 592 592 593 - memcpy(skb_put(skb, count), buf, count); 593 + skb_put_data(skb, buf, count); 594 594 595 595 IPC_CB(skb)->op_type = UL_USR_OP_BLOCKED; 596 596