2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 06:34:11 +08:00

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>
This commit is contained in:
Ivan Safonov 2019-03-20 15:45:19 +03:00 committed by Greg Kroah-Hartman
parent 40a3483b19
commit b17b682341

View File

@ -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;