Commit 8a67aa86 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller

r8169: use skb_copy_to_linear_data in rtl8169_try_rx_copy

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: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1cbbf01c
...@@ -7359,7 +7359,7 @@ static struct sk_buff *rtl8169_try_rx_copy(void *data, ...@@ -7359,7 +7359,7 @@ static struct sk_buff *rtl8169_try_rx_copy(void *data,
prefetch(data); prefetch(data);
skb = napi_alloc_skb(&tp->napi, pkt_size); skb = napi_alloc_skb(&tp->napi, pkt_size);
if (skb) 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); dma_sync_single_for_device(d, addr, pkt_size, DMA_FROM_DEVICE);
return skb; return skb;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment