[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1497451240-4182-1-git-send-email-cugyly@163.com>
Date: Wed, 14 Jun 2017 22:40:40 +0800
From: yuan linyu <cugyly@....com>
To: netdev@...r.kernel.org
Cc: "David S . Miller" <davem@...emloft.net>,
yuan linyu <Linyu.Yuan@...atel-sbell.com.cn>
Subject: [PATCH net-next 04/11] dsa: skb_put_zero() used to optimize code
From: yuan linyu <Linyu.Yuan@...atel-sbell.com.cn>
Signed-off-by: yuan linyu <Linyu.Yuan@...atel-sbell.com.cn>
---
net/dsa/tag_trailer.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/dsa/tag_trailer.c b/net/dsa/tag_trailer.c
index 172f131..b09e562 100644
--- a/net/dsa/tag_trailer.c
+++ b/net/dsa/tag_trailer.c
@@ -43,8 +43,7 @@ static struct sk_buff *trailer_xmit(struct sk_buff *skb, struct net_device *dev)
kfree_skb(skb);
if (padlen) {
- u8 *pad = skb_put(nskb, padlen);
- memset(pad, 0, padlen);
+ skb_put_zero(nskb, padlen);
}
trailer = skb_put(nskb, 4);
--
2.7.4
Powered by blists - more mailing lists