net: skbuff.h: remove unnecessary unlikely()
Subsystems (2)
PATCH 1/1 net: skbuff.h: remove unnecessary unlikely()
WARN_ON() already contains an unlikely(), so it's not necessary to use unlikely.
Signed-off-by Yangtao Li <[email protected]>
--- include/linux/skbuff.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
include/linux/skbuff.h +1 -3
@@ -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); }
Signature · 1 line
2.17.0
David Miller
maintainerNetworking patches must be submitted to [email protected]
Thank you.
add [email protected]
-- Yangtao
Quoted 28 lines · Yangtao Li
WARN_ON()already contains anunlikely(), so it's not necessary to use unlikely.Signed-off-by Yangtao Li <[email protected]>--- include/linux/skbuff.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)include/linux/skbuff.h +1
-4@@ -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); } --2.17.0
add myself.
-Yangtao
Quoted 32 lines · Frank Lee
add [email protected]
-- YangtaoQuoted 28 lines · Yangtao Li
WARN_ON()already contains anunlikely(), so it's not necessary to use unlikely.Signed-off-by Yangtao Li <[email protected]>--- include/linux/skbuff.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)include/linux/skbuff.h +1
-4@@ -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); } --2.17.0
David Miller
maintainerFrom: Frank Lee <[email protected]>
Date: Mon, 5 Nov 2018 21:21:50 +0800
Quoted 2 lines
add [email protected]
-- Yangtao
Sorry, you can't do it like that.
You have to make a formal, fresh, posting to netdev with your patch.
Thank you.