projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a82750
)
usb: cdc-wdm: Use skb_put_data() instead of skb_put/memcpy pair
author
Shang XiaoJing
<shangxiaojing@huawei.com>
Tue, 27 Sep 2022 02:43:44 +0000
(10:43 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Tue, 27 Sep 2022 08:36:33 +0000
(10:36 +0200)
Use skb_put_data() instead of skb_put() and memcpy(), which is clear.
Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
Acked-by: Oliver Neukum <oneukum@suse.com>
Link:
https://lore.kernel.org/r/20220927024344.14352-1-shangxiaojing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/class/cdc-wdm.c
patch
|
blob
|
history
diff --git
a/drivers/usb/class/cdc-wdm.c
b/drivers/usb/class/cdc-wdm.c
index eebe782380fb9b55f1efb199615ea07524ca43f2..1f0951be15ab77b7097c321b71d940a739d108cf 100644
(file)
--- a/
drivers/usb/class/cdc-wdm.c
+++ b/
drivers/usb/class/cdc-wdm.c
@@
-958,7
+958,7
@@
static void wdm_wwan_rx(struct wdm_device *desc, int length)
if (!skb)
return;
-
memcpy(skb_put(skb, length)
, desc->inbuf, length);
+
skb_put_data(skb
, desc->inbuf, length);
wwan_port_rx(port, skb);
/* inbuf has been copied, it is safe to check for outstanding data */