aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/atm/nicstar.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-27 17:55:52 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:28:23 -0400
commitd626f62b11e00c16e81e4308ab93d3f13551812a (patch)
treefac4af6ced853755e12fc709d55f0c2bec51265d /drivers/atm/nicstar.c
parent2a123b86e2b242a4a6db990d2851d45e192f88e5 (diff)
[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>
Diffstat (limited to 'drivers/atm/nicstar.c')
-rw-r--r--drivers/atm/nicstar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c
index 26f4b7033494..14ced85b3f54 100644
--- a/drivers/atm/nicstar.c
+++ b/drivers/atm/nicstar.c
@@ -2395,7 +2395,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe)
2395 skb->destructor = ns_lb_destructor; 2395 skb->destructor = ns_lb_destructor;
2396#endif /* NS_USE_DESTRUCTORS */ 2396#endif /* NS_USE_DESTRUCTORS */
2397 skb_push(skb, NS_SMBUFSIZE); 2397 skb_push(skb, NS_SMBUFSIZE);
2398 memcpy(skb->data, sb->data, NS_SMBUFSIZE); 2398 skb_copy_from_linear_data(sb, skb->data, NS_SMBUFSIZE);
2399 skb_put(skb, len - NS_SMBUFSIZE); 2399 skb_put(skb, len - NS_SMBUFSIZE);
2400 ATM_SKB(skb)->vcc = vcc; 2400 ATM_SKB(skb)->vcc = vcc;
2401 __net_timestamp(skb); 2401 __net_timestamp(skb);
@@ -2479,7 +2479,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe)
2479 { 2479 {
2480 /* Copy the small buffer to the huge buffer */ 2480 /* Copy the small buffer to the huge buffer */
2481 sb = (struct sk_buff *) iov->iov_base; 2481 sb = (struct sk_buff *) iov->iov_base;
2482 memcpy(hb->data, sb->data, iov->iov_len); 2482 skb_copy_from_linear_data(sb, hb->data, iov->iov_len);
2483 skb_put(hb, iov->iov_len); 2483 skb_put(hb, iov->iov_len);
2484 remaining = len - iov->iov_len; 2484 remaining = len - iov->iov_len;
2485 iov++; 2485 iov++;
@@ -2491,7 +2491,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe)
2491 { 2491 {
2492 lb = (struct sk_buff *) iov->iov_base; 2492 lb = (struct sk_buff *) iov->iov_base;
2493 tocopy = min_t(int, remaining, iov->iov_len); 2493 tocopy = min_t(int, remaining, iov->iov_len);
2494 memcpy(skb_tail_pointer(hb), lb->data, tocopy); 2494 skb_copy_from_linear_data(lb, skb_tail_pointer(hb), tocopy);
2495 skb_put(hb, tocopy); 2495 skb_put(hb, tocopy);
2496 iov++; 2496 iov++;
2497 remaining -= tocopy; 2497 remaining -= tocopy;