diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-03-27 17:55:52 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:28:23 -0400 |
commit | d626f62b11e00c16e81e4308ab93d3f13551812a (patch) | |
tree | fac4af6ced853755e12fc709d55f0c2bec51265d /drivers/s390/net/netiucv.c | |
parent | 2a123b86e2b242a4a6db990d2851d45e192f88e5 (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/netiucv.c')
-rw-r--r-- | drivers/s390/net/netiucv.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index cd42bd54988c..e10e85e85c84 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c | |||
@@ -645,7 +645,8 @@ static void netiucv_unpack_skb(struct iucv_connection *conn, | |||
645 | privptr->stats.rx_dropped++; | 645 | privptr->stats.rx_dropped++; |
646 | return; | 646 | return; |
647 | } | 647 | } |
648 | memcpy(skb_put(skb, pskb->len), pskb->data, pskb->len); | 648 | skb_copy_from_linear_data(pskb, skb_put(skb, pskb->len), |
649 | pskb->len); | ||
649 | skb_reset_mac_header(skb); | 650 | skb_reset_mac_header(skb); |
650 | skb->dev = pskb->dev; | 651 | skb->dev = pskb->dev; |
651 | skb->protocol = pskb->protocol; | 652 | skb->protocol = pskb->protocol; |
@@ -744,7 +745,9 @@ static void conn_action_txdone(fsm_instance *fi, int event, void *arg) | |||
744 | header.next = conn->tx_buff->len + skb->len + NETIUCV_HDRLEN; | 745 | header.next = conn->tx_buff->len + skb->len + NETIUCV_HDRLEN; |
745 | memcpy(skb_put(conn->tx_buff, NETIUCV_HDRLEN), &header, | 746 | memcpy(skb_put(conn->tx_buff, NETIUCV_HDRLEN), &header, |
746 | NETIUCV_HDRLEN); | 747 | NETIUCV_HDRLEN); |
747 | memcpy(skb_put(conn->tx_buff, skb->len), skb->data, skb->len); | 748 | skb_copy_from_linear_data(skb, |
749 | skb_put(conn->tx_buff, skb->len), | ||
750 | skb->len); | ||
748 | txbytes += skb->len; | 751 | txbytes += skb->len; |
749 | txpackets++; | 752 | txpackets++; |
750 | stat_maxcq++; | 753 | stat_maxcq++; |