[SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}
To clearly state the intent of copying from 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@redhat.com>
This commit is contained in:
committed by
David S. Miller
parent
2a123b86e2
commit
d626f62b11
@@ -1025,7 +1025,7 @@ static int send_packet(struct net_device *dev, struct sk_buff *skb)
|
||||
adapter->current_dma.start_time = jiffies;
|
||||
|
||||
if ((unsigned long)(skb->data + nlen) >= MAX_DMA_ADDRESS || nlen != skb->len) {
|
||||
memcpy(adapter->dma_buffer, skb->data, nlen);
|
||||
skb_copy_from_linear_data(skb, adapter->dma_buffer, nlen);
|
||||
memset(adapter->dma_buffer+skb->len, 0, nlen-skb->len);
|
||||
target = isa_virt_to_bus(adapter->dma_buffer);
|
||||
}
|
||||
|
Reference in New Issue
Block a user