aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/ctcmain.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/s390/net/ctcmain.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/s390/net/ctcmain.c')
-rw-r--r--drivers/s390/net/ctcmain.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c
index 54e3f806cd52..b0f813e6f48e 100644
--- a/drivers/s390/net/ctcmain.c
+++ b/drivers/s390/net/ctcmain.c
@@ -472,7 +472,8 @@ ctc_unpack_skb(struct channel *ch, struct sk_buff *pskb)
472 privptr->stats.rx_dropped++; 472 privptr->stats.rx_dropped++;
473 return; 473 return;
474 } 474 }
475 memcpy(skb_put(skb, pskb->len), pskb->data, pskb->len); 475 skb_copy_from_linear_data(pskb, skb_put(skb, pskb->len),
476 pskb->len);
476 skb_reset_mac_header(skb); 477 skb_reset_mac_header(skb);
477 skb->dev = pskb->dev; 478 skb->dev = pskb->dev;
478 skb->protocol = pskb->protocol; 479 skb->protocol = pskb->protocol;
@@ -716,8 +717,9 @@ ch_action_txdone(fsm_instance * fi, int event, void *arg)
716 *((__u16 *) skb_put(ch->trans_skb, 2)) = ch->collect_len + 2; 717 *((__u16 *) skb_put(ch->trans_skb, 2)) = ch->collect_len + 2;
717 i = 0; 718 i = 0;
718 while ((skb = skb_dequeue(&ch->collect_queue))) { 719 while ((skb = skb_dequeue(&ch->collect_queue))) {
719 memcpy(skb_put(ch->trans_skb, skb->len), skb->data, 720 skb_copy_from_linear_data(skb, skb_put(ch->trans_skb,
720 skb->len); 721 skb->len),
722 skb->len);
721 privptr->stats.tx_packets++; 723 privptr->stats.tx_packets++;
722 privptr->stats.tx_bytes += skb->len - LL_HEADER_LENGTH; 724 privptr->stats.tx_bytes += skb->len - LL_HEADER_LENGTH;
723 atomic_dec(&skb->users); 725 atomic_dec(&skb->users);
@@ -2268,8 +2270,9 @@ transmit_skb(struct channel *ch, struct sk_buff *skb)
2268 skb_reset_tail_pointer(ch->trans_skb); 2270 skb_reset_tail_pointer(ch->trans_skb);
2269 ch->trans_skb->len = 0; 2271 ch->trans_skb->len = 0;
2270 ch->ccw[1].count = skb->len; 2272 ch->ccw[1].count = skb->len;
2271 memcpy(skb_put(ch->trans_skb, skb->len), skb->data, 2273 skb_copy_from_linear_data(skb, skb_put(ch->trans_skb,
2272 skb->len); 2274 skb->len),
2275 skb->len);
2273 atomic_dec(&skb->users); 2276 atomic_dec(&skb->users);
2274 dev_kfree_skb_irq(skb); 2277 dev_kfree_skb_irq(skb);
2275 ccw_idx = 0; 2278 ccw_idx = 0;