]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
net: skbuff.h: remove unnecessary unlikely()
authorYangtao Li <tiny.windzz@gmail.com>
Tue, 6 Nov 2018 15:45:36 +0000 (10:45 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Nov 2018 19:21:49 +0000 (11:21 -0800)
WARN_ON() already contains an unlikely(), so it's not necessary to use
unlikely.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/skbuff.h

index 0ba687454267fdac6f69d8fea69ffaa94c1bb205..7dcfb5591dc33ae74ffc2fb5f88e2f141e982db6 100644 (file)
@@ -2508,10 +2508,8 @@ int ___pskb_trim(struct sk_buff *skb, unsigned int len);
 
 static inline void __skb_set_length(struct sk_buff *skb, unsigned int len)
 {
-       if (unlikely(skb_is_nonlinear(skb))) {
-               WARN_ON(1);
+       if (WARN_ON(skb_is_nonlinear(skb)))
                return;
-       }
        skb->len = len;
        skb_set_tail_pointer(skb, len);
 }