aboutsummaryrefslogtreecommitdiffstats
path: root/net/atm/lec.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2007-03-31 10:55:19 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:28:29 -0400
commit27d7ff46a3498d3debc6ba68fb8014c702b81170 (patch)
treeb5a0c617cf8339524d3b1f1633e08eae7b94cf86 /net/atm/lec.c
parent3dbad80ac7632f243b824d469301abb97ec634a1 (diff)
[SK_BUFF]: Introduce skb_copy_to_linear_data{_offset}
To clearly state the intent of copying to 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@ghostprotocols.net>
Diffstat (limited to 'net/atm/lec.c')
-rw-r--r--net/atm/lec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/atm/lec.c b/net/atm/lec.c
index 4b3e72f31b3b..6d63afa5764d 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -576,8 +576,8 @@ static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb)
576 break; 576 break;
577 } 577 }
578 skb2->len = sizeof(struct atmlec_msg); 578 skb2->len = sizeof(struct atmlec_msg);
579 memcpy(skb2->data, mesg, 579 skb_copy_to_linear_data(skb2, mesg,
580 sizeof(struct atmlec_msg)); 580 sizeof(*mesg));
581 atm_force_charge(priv->lecd, skb2->truesize); 581 atm_force_charge(priv->lecd, skb2->truesize);
582 sk = sk_atm(priv->lecd); 582 sk = sk_atm(priv->lecd);
583 skb_queue_tail(&sk->sk_receive_queue, skb2); 583 skb_queue_tail(&sk->sk_receive_queue, skb2);
@@ -1337,7 +1337,7 @@ static int lane2_resolve(struct net_device *dev, u8 *dst_mac, int force,
1337 if (skb == NULL) 1337 if (skb == NULL)
1338 return -1; 1338 return -1;
1339 skb->len = *sizeoftlvs; 1339 skb->len = *sizeoftlvs;
1340 memcpy(skb->data, *tlvs, *sizeoftlvs); 1340 skb_copy_to_linear_data(skb, *tlvs, *sizeoftlvs);
1341 retval = send_to_lecd(priv, l_arp_xmt, dst_mac, NULL, skb); 1341 retval = send_to_lecd(priv, l_arp_xmt, dst_mac, NULL, skb);
1342 } 1342 }
1343 return retval; 1343 return retval;
@@ -1371,7 +1371,7 @@ static int lane2_associate_req(struct net_device *dev, u8 *lan_dst,
1371 if (skb == NULL) 1371 if (skb == NULL)
1372 return 0; 1372 return 0;
1373 skb->len = sizeoftlvs; 1373 skb->len = sizeoftlvs;
1374 memcpy(skb->data, tlvs, sizeoftlvs); 1374 skb_copy_to_linear_data(skb, tlvs, sizeoftlvs);
1375 retval = send_to_lecd(priv, l_associate_req, NULL, NULL, skb); 1375 retval = send_to_lecd(priv, l_associate_req, NULL, NULL, skb);
1376 if (retval != 0) 1376 if (retval != 0)
1377 printk("lec.c: lane2_associate_req() failed\n"); 1377 printk("lec.c: lane2_associate_req() failed\n");