Skip to content

Commit

Permalink
net: skbuff.h: remove unnecessary unlikely()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yangtao Li authored and David S. Miller committed Nov 6, 2018
1 parent a8d6219 commit 5e1abdc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions include/linux/skbuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 5e1abdc

Please sign in to comment.