diff options
author | Ivan Safonov <insafonov@gmail.com> | 2019-03-20 15:45:19 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-03-21 08:25:00 +0100 |
commit | b17b6823419aa698aff5650b6cabc6ab03d76729 (patch) | |
tree | 620cf76cadf0ffe9cd75d0ecb2914c19dd292191 /drivers/staging/netlogic | |
parent | 40a3483b194ea793e3909b0256f536b430b14532 (diff) | |
download | lwn-b17b6823419aa698aff5650b6cabc6ab03d76729.tar.gz lwn-b17b6823419aa698aff5650b6cabc6ab03d76729.zip |
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@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/netlogic')
-rw-r--r-- | drivers/staging/netlogic/xlr_net.c | 3 |
1 files changed, 1 insertions, 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; |