Commit b17b6823 authored by Ivan Safonov's avatar Ivan Safonov Committed by Greg Kroah-Hartman

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: default avatarIvan Safonov <insafonov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 40a3483b
...@@ -87,8 +87,7 @@ static inline unsigned char *xlr_alloc_skb(void) ...@@ -87,8 +87,7 @@ static inline unsigned char *xlr_alloc_skb(void)
if (!skb) if (!skb)
return NULL; return NULL;
skb_data = skb->data; skb_data = skb->data;
skb_put(skb, MAC_SKB_BACK_PTR_SIZE); skb_reserve(skb, MAC_SKB_BACK_PTR_SIZE);
skb_pull(skb, MAC_SKB_BACK_PTR_SIZE);
memcpy(skb_data, &skb, buf_len); memcpy(skb_data, &skb, buf_len);
return skb->data; return skb->data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment