diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2018-04-18 00:19:07 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-04-19 04:11:58 +0300 |
commit | 8a67aa868c7a3e6ef92b4e355abd7a2836573aa9 (patch) | |
tree | e5d557323753fd42469c8c67dff4b9fa99e681c3 /drivers | |
parent | 1cbbf01cfe251447d232ccd6b031252bc5fa4b80 (diff) | |
download | linux-8a67aa868c7a3e6ef92b4e355abd7a2836573aa9.tar.xz |
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: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/realtek/r8169.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 14f494a9318a..8c303617cc37 100644 --- 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; |