[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20190320124519.15751-1-insafonov@gmail.com>
Date: Wed, 20 Mar 2019 15:45:19 +0300
From: Ivan Safonov <insafonov@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Bhagyashri Dighole <digholebhagyashri@...il.com>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
Wentao Cai <etsai042@...il.com>,
Alexander Duyck <alexander.h.duyck@...el.com>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
Ivan Safonov <insafonov@...il.com>
Subject: [PATCH] staging: netlogic: replace skb_put/pull pair with skb_reserve
The sequence
skb_put(skb);
skb_pull(skb);
leads to the same result as
skb_reserve(skb);
but second is a little shorter and clearer.
Signed-off-by: Ivan Safonov <insafonov@...il.com>
---
drivers/staging/netlogic/xlr_net.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c
index 10f14a5cf490..1897b711d66d 100644
--- a/drivers/staging/netlogic/xlr_net.c
+++ b/drivers/staging/netlogic/xlr_net.c
@@ -87,8 +87,7 @@ static inline unsigned char *xlr_alloc_skb(void)
if (!skb)
return NULL;
skb_data = skb->data;
- skb_put(skb, MAC_SKB_BACK_PTR_SIZE);
- skb_pull(skb, MAC_SKB_BACK_PTR_SIZE);
+ skb_reserve(skb, MAC_SKB_BACK_PTR_SIZE);
memcpy(skb_data, &skb, buf_len);
return skb->data;
--
2.19.2
Powered by blists - more mailing lists