diff mbox series

[-next] net: wwan: iosm: Use skb_put_data() instead of skb_put/memcpy pair

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

Checks

Context Check Description
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 10 of 10 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Shang XiaoJing Sept. 27, 2022, 2:32 a.m. UTC
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(-)

Comments

Kumar, M Chetan Sept. 27, 2022, 6:41 a.m. UTC | #1
> -----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>
patchwork-bot+netdevbpf@kernel.org Sept. 29, 2022, 2:50 a.m. UTC | #2
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 mbox series

Patch

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;