usb: cdc-wdm: Use skb_put_data() instead of skb_put/memcpy pair
PATCH 1/1 usb: cdc-wdm: 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 <[email protected]>
--- drivers/usb/class/cdc-wdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/class/cdc-wdm.c +1 -1
@@ -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 */
Signature · 1 line
2.17.1
Quoted 3 lines · Shang XiaoJing
Use
skb_put_data()instead ofskb_put()andmemcpy(), which is clear.Signed-off-by Shang XiaoJing <[email protected]>
Acked-by Oliver Neukum <[email protected]>