summaryrefslogtreecommitdiffstats
path: root/drivers/atm/nicstar.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-27 18:55:52 -0300
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-25 22:28:23 -0700
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 26f4b703349..14ced85b3f5 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)
skb->destructor = ns_lb_destructor;
#endif /* NS_USE_DESTRUCTORS */
skb_push(skb, NS_SMBUFSIZE);
- memcpy(skb->data, sb->data, NS_SMBUFSIZE);
+ skb_copy_from_linear_data(sb, skb->data, NS_SMBUFSIZE);
skb_put(skb, len - NS_SMBUFSIZE);
ATM_SKB(skb)->vcc = vcc;
__net_timestamp(skb);
@@ -2479,7 +2479,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe)
{
/* Copy the small buffer to the huge buffer */
sb = (struct sk_buff *) iov->iov_base;
- memcpy(hb->data, sb->data, iov->iov_len);
+ skb_copy_from_linear_data(sb, hb->data, iov->iov_len);
skb_put(hb, iov->iov_len);
remaining = len - iov->iov_len;
iov++;
@@ -2491,7 +2491,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe)
{
lb = (struct sk_buff *) iov->iov_base;
tocopy = min_t(int, remaining, iov->iov_len);
- memcpy(skb_tail_pointer(hb), lb->data, tocopy);
+ skb_copy_from_linear_data(lb, skb_tail_pointer(hb), tocopy);
skb_put(hb, tocopy);
iov++;
remaining -= tocopy;