* [PATCH] net: skbuff.h: remove unnecessary unlikely()
@ 2018-11-04 13:14 Yangtao Li
2018-11-05 0:51 ` David Miller
2018-11-05 13:21 ` Frank Lee
0 siblings, 2 replies; 7+ messages in thread
From: Yangtao Li @ 2018-11-04 13:14 UTC (permalink / raw)
To: davem, edumazet, willemb, dja, ast, sbrivio, pabeni
Cc: linux-kernel, Yangtao Li
WARN_ON() already contains an unlikely(), so it's not necessary to use
unlikely.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
include/linux/skbuff.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 0ba687454267..7dcfb5591dc3 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] net: skbuff.h: remove unnecessary unlikely()
2018-11-04 13:14 [PATCH] net: skbuff.h: remove unnecessary unlikely() Yangtao Li
@ 2018-11-05 0:51 ` David Miller
2018-11-05 13:21 ` Frank Lee
1 sibling, 0 replies; 7+ messages in thread
From: David Miller @ 2018-11-05 0:51 UTC (permalink / raw)
To: tiny.windzz; +Cc: edumazet, willemb, dja, ast, sbrivio, pabeni, linux-kernel
Networking patches must be submitted to netdev@vger.kernel.org
Thank you.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: skbuff.h: remove unnecessary unlikely()
2018-11-04 13:14 [PATCH] net: skbuff.h: remove unnecessary unlikely() Yangtao Li
2018-11-05 0:51 ` David Miller
@ 2018-11-05 13:21 ` Frank Lee
2018-11-05 16:02 ` Frank Lee
2018-11-05 18:09 ` David Miller
1 sibling, 2 replies; 7+ messages in thread
From: Frank Lee @ 2018-11-05 13:21 UTC (permalink / raw)
To: davem, Eric Dumazet, Willem de Bruijn, dja, ast, sbrivio, pabeni
Cc: linux-kernel, netdev
add netdev@vger.kernel.org
-- Yangtao
On Sun, Nov 4, 2018 at 9:14 PM Yangtao Li <tiny.windzz@gmail.com> wrote:
>
> WARN_ON() already contains an unlikely(), so it's not necessary to use
> unlikely.
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---
> include/linux/skbuff.h | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
> index 0ba687454267..7dcfb5591dc3 100644
> --- a/include/linux/skbuff.h
> +++ b/include/linux/skbuff.h
> @@ -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
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: skbuff.h: remove unnecessary unlikely()
2018-11-05 13:21 ` Frank Lee
@ 2018-11-05 16:02 ` Frank Lee
2018-11-05 18:09 ` David Miller
1 sibling, 0 replies; 7+ messages in thread
From: Frank Lee @ 2018-11-05 16:02 UTC (permalink / raw)
To: davem, Eric Dumazet, Willem de Bruijn, dja, ast, sbrivio, pabeni
Cc: linux-kernel, netdev, Yangtao Li
add myself.
-Yangtao
On Mon, Nov 5, 2018 at 9:21 PM Frank Lee <tiny.windzz@gmail.com> wrote:
>
> add netdev@vger.kernel.org
> -- Yangtao
> On Sun, Nov 4, 2018 at 9:14 PM Yangtao Li <tiny.windzz@gmail.com> wrote:
> >
> > WARN_ON() already contains an unlikely(), so it's not necessary to use
> > unlikely.
> >
> > Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> > ---
> > include/linux/skbuff.h | 4 +---
> > 1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
> > index 0ba687454267..7dcfb5591dc3 100644
> > --- a/include/linux/skbuff.h
> > +++ b/include/linux/skbuff.h
> > @@ -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
> >
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: skbuff.h: remove unnecessary unlikely()
2018-11-05 13:21 ` Frank Lee
2018-11-05 16:02 ` Frank Lee
@ 2018-11-05 18:09 ` David Miller
1 sibling, 0 replies; 7+ messages in thread
From: David Miller @ 2018-11-05 18:09 UTC (permalink / raw)
To: tiny.windzz
Cc: edumazet, willemb, dja, ast, sbrivio, pabeni, linux-kernel, netdev
From: Frank Lee <tiny.windzz@gmail.com>
Date: Mon, 5 Nov 2018 21:21:50 +0800
> add netdev@vger.kernel.org
> -- Yangtao
Sorry, you can't do it like that.
You have to make a formal, fresh, posting to netdev with your patch.
Thank you.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: skbuff.h: remove unnecessary unlikely()
2018-11-06 15:45 Yangtao Li
@ 2018-11-06 19:22 ` David Miller
0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2018-11-06 19:22 UTC (permalink / raw)
To: tiny.windzz
Cc: edumazet, dja, willemb, ast, sbrivio, posk, pabeni, borisp,
linux-kernel, netdev
From: Yangtao Li <tiny.windzz@gmail.com>
Date: Tue, 6 Nov 2018 10:45:36 -0500
> WARN_ON() already contains an unlikely(), so it's not necessary to use
> unlikely.
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] net: skbuff.h: remove unnecessary unlikely()
@ 2018-11-06 15:45 Yangtao Li
2018-11-06 19:22 ` David Miller
0 siblings, 1 reply; 7+ messages in thread
From: Yangtao Li @ 2018-11-06 15:45 UTC (permalink / raw)
To: davem, edumazet, dja, willemb, ast, sbrivio, posk, pabeni, borisp
Cc: linux-kernel, netdev, Yangtao Li
WARN_ON() already contains an unlikely(), so it's not necessary to use
unlikely.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
include/linux/skbuff.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 0ba687454267..7dcfb5591dc3 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -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
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-11-06 19:22 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-04 13:14 [PATCH] net: skbuff.h: remove unnecessary unlikely() Yangtao Li
2018-11-05 0:51 ` David Miller
2018-11-05 13:21 ` Frank Lee
2018-11-05 16:02 ` Frank Lee
2018-11-05 18:09 ` David Miller
2018-11-06 15:45 Yangtao Li
2018-11-06 19:22 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).