Skip to contentSkip to conversation

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

PATCH Applied Shang XiaoJing 3 participants 3 messages Sep 27, 2022 – Sep 29, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/wwan/iosm/iosm_ipc_imem_ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wwan/iosm/iosm_ipc_imem_ops.c +1 -1
index 57304a5adf68..b7f9237dedf7 100644
@@ -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;
 
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 25 lines

-----Original Message-----
From: Shang XiaoJing <[email protected]>
Sent: Tuesday, September 27, 2022 8:03 AM
To: Kumar, M Chetan <[email protected]>; linuxwwan <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]
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.

---
 drivers/net/wwan/iosm/iosm_ipc_imem_ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wwan/iosm/iosm_ipc_imem_ops.c +0 -0
index 57304a5adf68..b7f9237dedf7 100644

drivers/net/wwan/iosm/iosm_ipc_imem_ops.c int ipc_imem_sys_devlink_write(struct iosm_devlink · line 596

Quoted 8 lines
drivers/net/wwan/iosm/iosm_ipc_imem_ops.c +1 -1
@@ -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;
#2 lore raw
In reply to Shang XiaoJing
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Quoted 6 lines · On Tue, 27 Sep 2022 10:32:54 +0800 you wrote:

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

---
 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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html