net: Use __skb_pagelen() directly in skb_cow_data()
authorMiaohe Lin <linmiaohe@huawei.com>
Sat, 1 Aug 2020 09:30:23 +0000 (17:30 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Aug 2020 22:38:31 +0000 (15:38 -0700)
commitc15fc199b3757496325c4855662fad89bd1efdad
treeacdefdaa5afa66f613617cb362fd6fe6a23753c7
parent8340303670d895407ab02885f1fc5a38cc7b044f
net: Use __skb_pagelen() directly in skb_cow_data()

In fact, skb_pagelen() - skb_headlen() is equal to __skb_pagelen(), use it
directly to avoid unnecessary skb_headlen() call.

Also fix the CHECK note of checkpatch.pl:
    Comparison to NULL could be written "!__pskb_pull_tail"

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c