Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-10 Thread David Miller
From: Tim Hansen Date: Mon, 9 Oct 2017 11:37:59 -0400 > Fix BUG() calls to use BUG_ON(conditional) macros. > > This was found using make coccicheck M=net/core on linux next > tag next-2017092 > > Signed-off-by: Tim Hansen Althrough there were

Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-10 Thread David Miller
From: Tim Hansen Date: Mon, 9 Oct 2017 11:37:59 -0400 > Fix BUG() calls to use BUG_ON(conditional) macros. > > This was found using make coccicheck M=net/core on linux next > tag next-2017092 > > Signed-off-by: Tim Hansen Althrough there were objections raised, none of them technically stand

Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-09 Thread Levin, Alexander (Sasha Levin)
On Mon, Oct 09, 2017 at 04:23:57PM -0700, Alexei Starovoitov wrote: >On Mon, Oct 09, 2017 at 11:15:40PM +, Levin, Alexander (Sasha Levin) wrote: >> On Mon, Oct 09, 2017 at 04:06:20PM -0700, Alexei Starovoitov wrote: >> >On Mon, Oct 09, 2017 at 08:26:34PM +, Levin, Alexander (Sasha Levin)

Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-09 Thread Levin, Alexander (Sasha Levin)
On Mon, Oct 09, 2017 at 04:23:57PM -0700, Alexei Starovoitov wrote: >On Mon, Oct 09, 2017 at 11:15:40PM +, Levin, Alexander (Sasha Levin) wrote: >> On Mon, Oct 09, 2017 at 04:06:20PM -0700, Alexei Starovoitov wrote: >> >On Mon, Oct 09, 2017 at 08:26:34PM +, Levin, Alexander (Sasha Levin)

Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-09 Thread Alexei Starovoitov
On Mon, Oct 09, 2017 at 11:15:40PM +, Levin, Alexander (Sasha Levin) wrote: > On Mon, Oct 09, 2017 at 04:06:20PM -0700, Alexei Starovoitov wrote: > >On Mon, Oct 09, 2017 at 08:26:34PM +, Levin, Alexander (Sasha Levin) > >wrote: > >> On Mon, Oct 09, 2017 at 10:15:42AM -0700, Alexei

Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-09 Thread Alexei Starovoitov
On Mon, Oct 09, 2017 at 11:15:40PM +, Levin, Alexander (Sasha Levin) wrote: > On Mon, Oct 09, 2017 at 04:06:20PM -0700, Alexei Starovoitov wrote: > >On Mon, Oct 09, 2017 at 08:26:34PM +, Levin, Alexander (Sasha Levin) > >wrote: > >> On Mon, Oct 09, 2017 at 10:15:42AM -0700, Alexei

Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-09 Thread David Miller
From: Alexei Starovoitov Date: Mon, 9 Oct 2017 16:06:20 -0700 >> For these archs, wouldn't it then be more efficient to use BUG_ON >> rather than BUG()? > > why more efficient? any data to prove that? It can completely eliminate a branch. For example on powerpc

Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-09 Thread David Miller
From: Alexei Starovoitov Date: Mon, 9 Oct 2017 16:06:20 -0700 >> For these archs, wouldn't it then be more efficient to use BUG_ON >> rather than BUG()? > > why more efficient? any data to prove that? It can completely eliminate a branch. For example on powerpc if you use BUG() then the code

Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-09 Thread Levin, Alexander (Sasha Levin)
On Mon, Oct 09, 2017 at 04:06:20PM -0700, Alexei Starovoitov wrote: >On Mon, Oct 09, 2017 at 08:26:34PM +, Levin, Alexander (Sasha Levin) wrote: >> On Mon, Oct 09, 2017 at 10:15:42AM -0700, Alexei Starovoitov wrote: >> >On Mon, Oct 09, 2017 at 11:37:59AM -0400, Tim Hansen wrote: >> >> Fix

Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-09 Thread Levin, Alexander (Sasha Levin)
On Mon, Oct 09, 2017 at 04:06:20PM -0700, Alexei Starovoitov wrote: >On Mon, Oct 09, 2017 at 08:26:34PM +, Levin, Alexander (Sasha Levin) wrote: >> On Mon, Oct 09, 2017 at 10:15:42AM -0700, Alexei Starovoitov wrote: >> >On Mon, Oct 09, 2017 at 11:37:59AM -0400, Tim Hansen wrote: >> >> Fix

Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-09 Thread Alexei Starovoitov
On Mon, Oct 09, 2017 at 08:26:34PM +, Levin, Alexander (Sasha Levin) wrote: > On Mon, Oct 09, 2017 at 10:15:42AM -0700, Alexei Starovoitov wrote: > >On Mon, Oct 09, 2017 at 11:37:59AM -0400, Tim Hansen wrote: > >> Fix BUG() calls to use BUG_ON(conditional) macros. > >> > >> This was found

Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-09 Thread Alexei Starovoitov
On Mon, Oct 09, 2017 at 08:26:34PM +, Levin, Alexander (Sasha Levin) wrote: > On Mon, Oct 09, 2017 at 10:15:42AM -0700, Alexei Starovoitov wrote: > >On Mon, Oct 09, 2017 at 11:37:59AM -0400, Tim Hansen wrote: > >> Fix BUG() calls to use BUG_ON(conditional) macros. > >> > >> This was found

Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-09 Thread Levin, Alexander (Sasha Levin)
On Mon, Oct 09, 2017 at 10:15:42AM -0700, Alexei Starovoitov wrote: >On Mon, Oct 09, 2017 at 11:37:59AM -0400, Tim Hansen wrote: >> Fix BUG() calls to use BUG_ON(conditional) macros. >> >> This was found using make coccicheck M=net/core on linux next >> tag next-2017092 >> >> Signed-off-by: Tim

Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-09 Thread Levin, Alexander (Sasha Levin)
On Mon, Oct 09, 2017 at 10:15:42AM -0700, Alexei Starovoitov wrote: >On Mon, Oct 09, 2017 at 11:37:59AM -0400, Tim Hansen wrote: >> Fix BUG() calls to use BUG_ON(conditional) macros. >> >> This was found using make coccicheck M=net/core on linux next >> tag next-2017092 >> >> Signed-off-by: Tim

Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-09 Thread Alexei Starovoitov
On Mon, Oct 09, 2017 at 11:37:59AM -0400, Tim Hansen wrote: > Fix BUG() calls to use BUG_ON(conditional) macros. > > This was found using make coccicheck M=net/core on linux next > tag next-2017092 > > Signed-off-by: Tim Hansen > --- > net/core/skbuff.c | 15

Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-09 Thread Alexei Starovoitov
On Mon, Oct 09, 2017 at 11:37:59AM -0400, Tim Hansen wrote: > Fix BUG() calls to use BUG_ON(conditional) macros. > > This was found using make coccicheck M=net/core on linux next > tag next-2017092 > > Signed-off-by: Tim Hansen > --- > net/core/skbuff.c | 15 ++- > 1 file changed,

[PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-09 Thread Tim Hansen
Fix BUG() calls to use BUG_ON(conditional) macros. This was found using make coccicheck M=net/core on linux next tag next-2017092 Signed-off-by: Tim Hansen --- net/core/skbuff.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git

[PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-09 Thread Tim Hansen
Fix BUG() calls to use BUG_ON(conditional) macros. This was found using make coccicheck M=net/core on linux next tag next-2017092 Signed-off-by: Tim Hansen --- net/core/skbuff.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/net/core/skbuff.c

Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-08 Thread David Miller
From: Tim Hansen Date: Sun, 8 Oct 2017 16:03:38 -0400 > Mistakenly sent the patch previously with a missing semicolon. > Apologies. > > Fix BUG() calls to use BUG_ON(conditional) macros. > > This was found using make coccicheck M=net/core on linux next > tag

Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-08 Thread David Miller
From: Tim Hansen Date: Sun, 8 Oct 2017 16:03:38 -0400 > Mistakenly sent the patch previously with a missing semicolon. > Apologies. > > Fix BUG() calls to use BUG_ON(conditional) macros. > > This was found using make coccicheck M=net/core on linux next > tag next-20170929 > > Signed-off-by:

Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-08 Thread Tim Hansen
Mistakenly sent the patch previously with a missing semicolon. Apologies. Fix BUG() calls to use BUG_ON(conditional) macros. This was found using make coccicheck M=net/core on linux next tag next-20170929 Signed-off-by: Tim Hansen --- net/core/skbuff.c | 15

Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-08 Thread Tim Hansen
Mistakenly sent the patch previously with a missing semicolon. Apologies. Fix BUG() calls to use BUG_ON(conditional) macros. This was found using make coccicheck M=net/core on linux next tag next-20170929 Signed-off-by: Tim Hansen --- net/core/skbuff.c | 15 ++- 1 file changed, 6