Hi Herbert,
Quoting Herbert Xu :
On Wed, Oct 25, 2017 at 07:38:35PM -0500, Gustavo A. R. Silva wrote:
I don't think we want something like:
bool err;
err = build_spdinfo(r_skb, net, sportid, seq, *flags) < 0 ? true : false;
BUG_ON(err);
How about
int err;
err = build_spd
On Wed, Oct 25, 2017 at 07:38:35PM -0500, Gustavo A. R. Silva wrote:
>
> I don't think we want something like:
>
> bool err;
>
> err = build_spdinfo(r_skb, net, sportid, seq, *flags) < 0 ? true : false;
> BUG_ON(err);
How about
int err;
err = build_spdinfo(r_skb, net, sportid,
Quoting "Gustavo A. R. Silva" :
Hi all,
Quoting Steffen Klassert :
On Wed, Oct 25, 2017 at 01:22:22PM +0900, David Miller wrote:
From: Herbert Xu
Date: Wed, 25 Oct 2017 12:05:41 +0800
On Tue, Oct 24, 2017 at 05:48:42PM +0900, David Miller wrote:
This discussion has happened before.
Bu
Hi all,
Quoting Steffen Klassert :
On Wed, Oct 25, 2017 at 01:22:22PM +0900, David Miller wrote:
From: Herbert Xu
Date: Wed, 25 Oct 2017 12:05:41 +0800
> On Tue, Oct 24, 2017 at 05:48:42PM +0900, David Miller wrote:
>>
>> This discussion has happened before.
>>
>> But I'll explain the conclu
On Wed, Oct 25, 2017 at 01:22:22PM +0900, David Miller wrote:
> From: Herbert Xu
> Date: Wed, 25 Oct 2017 12:05:41 +0800
>
> > On Tue, Oct 24, 2017 at 05:48:42PM +0900, David Miller wrote:
> >>
> >> This discussion has happened before.
> >>
> >> But I'll explain the conclusion here for your ben
From: Herbert Xu
Date: Wed, 25 Oct 2017 12:05:41 +0800
> On Tue, Oct 24, 2017 at 05:48:42PM +0900, David Miller wrote:
>>
>> This discussion has happened before.
>>
>> But I'll explain the conclusion here for your benefit.
>>
>> BUG_ON() is a statement and everything inside of it will
>> alway
On Tue, Oct 24, 2017 at 05:48:42PM +0900, David Miller wrote:
>
> This discussion has happened before.
>
> But I'll explain the conclusion here for your benefit.
>
> BUG_ON() is a statement and everything inside of it will
> always execute.
>
> BUG_ON() is always preferred because it allows arc
From: Herbert Xu
Date: Tue, 24 Oct 2017 11:25:08 +0800
> On Mon, Oct 23, 2017 at 01:18:57PM -0500, Gustavo A. R. Silva wrote:
>> Use BUG_ON instead of if condition followed by BUG.
>>
>> This issue was detected with the help of Coccinelle.
>>
>> Signed-off-by: Gustavo A. R. Silva
>
> I think
From: Herbert Xu
Date: Tue, 24 Oct 2017 11:53:20 +0800
> No your patch makes it worse. The original construct makes it
> clear that the conditional is real code and not just some debugging
> aid.
>
> With your patch, real code is now inside BUG_ON.
This discussion has happened before.
But I'l
On Mon, Oct 23, 2017 at 09:01:46PM -0700, Alexei Starovoitov wrote:
>
> fwiw I had the same argument earlier:
> https://lkml.org/lkml/2017/10/9/1139
Fair point on eliminating a branch. But I'd prefer something like
bool cond;
cond = code_that_does_something();
BUG_ON(con
Quoting Herbert Xu :
On Mon, Oct 23, 2017 at 10:50:43PM -0500, Gustavo A. R. Silva wrote:
Quoting Herbert Xu :
>On Mon, Oct 23, 2017 at 01:18:57PM -0500, Gustavo A. R. Silva wrote:
>>Use BUG_ON instead of if condition followed by BUG.
>>
>>This issue was detected with the help of Coccinelle.
On Tue, Oct 24, 2017 at 11:53:20AM +0800, Herbert Xu wrote:
> On Mon, Oct 23, 2017 at 10:50:43PM -0500, Gustavo A. R. Silva wrote:
> >
> > Quoting Herbert Xu :
> >
> > >On Mon, Oct 23, 2017 at 01:18:57PM -0500, Gustavo A. R. Silva wrote:
> > >>Use BUG_ON instead of if condition followed by BUG.
>
On Mon, Oct 23, 2017 at 10:50:43PM -0500, Gustavo A. R. Silva wrote:
>
> Quoting Herbert Xu :
>
> >On Mon, Oct 23, 2017 at 01:18:57PM -0500, Gustavo A. R. Silva wrote:
> >>Use BUG_ON instead of if condition followed by BUG.
> >>
> >>This issue was detected with the help of Coccinelle.
> >>
> >>Si
Quoting Herbert Xu :
On Mon, Oct 23, 2017 at 01:18:57PM -0500, Gustavo A. R. Silva wrote:
Use BUG_ON instead of if condition followed by BUG.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
I think this patch is terrible. Why on earth is Coccinelle
On Mon, Oct 23, 2017 at 01:18:57PM -0500, Gustavo A. R. Silva wrote:
> Use BUG_ON instead of if condition followed by BUG.
>
> This issue was detected with the help of Coccinelle.
>
> Signed-off-by: Gustavo A. R. Silva
I think this patch is terrible. Why on earth is Coccinelle even
warning abo
Use BUG_ON instead of if condition followed by BUG.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
---
net/xfrm/xfrm_user.c | 28 ++--
1 file changed, 10 insertions(+), 18 deletions(-)
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm
16 matches
Mail list logo