Message ID | 20220927023254.30342-1-shangxiaojing@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | f45892f750384433056cdb5601ef13ce9acbad76 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [-next] net: wwan: iosm: Use skb_put_data() instead of skb_put/memcpy pair | expand |
> -----Original Message----- > From: Shang XiaoJing <shangxiaojing@huawei.com> > Sent: Tuesday, September 27, 2022 8:03 AM > To: Kumar, M Chetan <m.chetan.kumar@intel.com>; linuxwwan > <linuxwwan@intel.com>; loic.poulain@linaro.org; ryazanov.s.a@gmail.com; > johannes@sipsolutions.net; davem@davemloft.net; > edumazet@google.com; kuba@kernel.org; pabeni@redhat.com; > netdev@vger.kernel.org > Cc: shangxiaojing@huawei.com > Subject: [PATCH -next] 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> > --- > drivers/net/wwan/iosm/iosm_ipc_imem_ops.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/wwan/iosm/iosm_ipc_imem_ops.c > b/drivers/net/wwan/iosm/iosm_ipc_imem_ops.c > index 57304a5adf68..b7f9237dedf7 100644 > --- a/drivers/net/wwan/iosm/iosm_ipc_imem_ops.c > +++ b/drivers/net/wwan/iosm/iosm_ipc_imem_ops.c > @@ -590,7 +590,7 @@ int ipc_imem_sys_devlink_write(struct iosm_devlink > *ipc_devlink, > goto out; > } > > - memcpy(skb_put(skb, count), buf, count); > + skb_put_data(skb, buf, count); > > IPC_CB(skb)->op_type = UL_USR_OP_BLOCKED; Reviewed-by: M Chetan Kumar <m.chetan.kumar@intel.com>
Hello: This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <kuba@kernel.org>: On Tue, 27 Sep 2022 10:32:54 +0800 you wrote: > Use skb_put_data() instead of skb_put() and memcpy(), which is clear. > > Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com> > --- > drivers/net/wwan/iosm/iosm_ipc_imem_ops.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Here is the summary with links: - [-next] net: wwan: iosm: Use skb_put_data() instead of skb_put/memcpy pair https://git.kernel.org/netdev/net-next/c/f45892f75038 You are awesome, thank you!
diff --git a/drivers/net/wwan/iosm/iosm_ipc_imem_ops.c b/drivers/net/wwan/iosm/iosm_ipc_imem_ops.c index 57304a5adf68..b7f9237dedf7 100644 --- a/drivers/net/wwan/iosm/iosm_ipc_imem_ops.c +++ b/drivers/net/wwan/iosm/iosm_ipc_imem_ops.c @@ -590,7 +590,7 @@ int ipc_imem_sys_devlink_write(struct iosm_devlink *ipc_devlink, goto out; } - memcpy(skb_put(skb, count), buf, count); + skb_put_data(skb, buf, count); IPC_CB(skb)->op_type = UL_USR_OP_BLOCKED;
Use skb_put_data() instead of skb_put() and memcpy(), which is clear. Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com> --- drivers/net/wwan/iosm/iosm_ipc_imem_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)