projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1cbbf01
)
r8169: use skb_copy_to_linear_data in rtl8169_try_rx_copy
author
Heiner Kallweit
<hkallweit1@gmail.com>
Tue, 17 Apr 2018 21:19:07 +0000
(23:19 +0200)
committer
David S. Miller
<davem@davemloft.net>
Thu, 19 Apr 2018 01:11:58 +0000
(21:11 -0400)
Not a giant leap for mankind, but let's avoid the open-coded memcpy
and use standard helper skb_copy_to_linear_data instead.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethernet/realtek/r8169.c
index 14f494a9318afccba9726c85be2837c47dc08162..8c303617cc37897c4b4c807a1db4074c6e1093ef 100644
(file)
--- a/
drivers/net/ethernet/realtek/r8169.c
+++ b/
drivers/net/ethernet/realtek/r8169.c
@@
-7359,7
+7359,7
@@
static struct sk_buff *rtl8169_try_rx_copy(void *data,
prefetch(data);
skb = napi_alloc_skb(&tp->napi, pkt_size);
if (skb)
-
memcpy(skb->data
, data, pkt_size);
+
skb_copy_to_linear_data(skb
, data, pkt_size);
dma_sync_single_for_device(d, addr, pkt_size, DMA_FROM_DEVICE);
return skb;