diff options
author | Arnaldo Carvalho de Melo <acme@ghostprotocols.net> | 2007-03-31 16:55:19 +0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 07:28:29 +0200 |
commit | 27d7ff46a3498d3debc6ba68fb8014c702b81170 (patch) | |
tree | b5a0c617cf8339524d3b1f1633e08eae7b94cf86 /drivers/net/macb.c | |
parent | [NET]: Fix warnings in 3c523.c and ni52.c (diff) | |
download | linux-27d7ff46a3498d3debc6ba68fb8014c702b81170.tar.xz linux-27d7ff46a3498d3debc6ba68fb8014c702b81170.zip |
[SK_BUFF]: Introduce skb_copy_to_linear_data{_offset}
To clearly state the intent of copying to linear sk_buffs, _offset being a
overly long variant but interesting for the sake of saving some bytes.
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Diffstat (limited to 'drivers/net/macb.c')
-rw-r--r-- | drivers/net/macb.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 9e233f8216a7..0e04f7ac3f2e 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -367,9 +367,10 @@ static int macb_rx_frame(struct macb *bp, unsigned int first_frag, BUG_ON(frag != last_frag); frag_len = len - offset; } - memcpy(skb->data + offset, - bp->rx_buffers + (RX_BUFFER_SIZE * frag), - frag_len); + skb_copy_to_linear_data_offset(skb, offset, + (bp->rx_buffers + + (RX_BUFFER_SIZE * frag)), + frag_len); offset += RX_BUFFER_SIZE; bp->rx_ring[frag].addr &= ~MACB_BIT(RX_USED); wmb(); |