Re: [PATCH] BUILD_BUG_ON_ZERO -> BUILD_BUG_OR_ZERO

2007-03-12 Thread Rusty Russell
On Mon, 2007-03-12 at 15:14 +0100, Stefan Richter wrote: > Robert P. J. Day wrote: > > On Mon, 12 Mar 2007, Stefan Richter wrote: > >> Rusty Russell wrote: > >> > OTOH, BUILD_BUG_OR_ZERO says what happens: either it's a build bug, or > >> > it's zero. > >> > >> What about

Re: [PATCH] BUILD_BUG_ON_ZERO -> BUILD_BUG_OR_ZERO

2007-03-12 Thread Stefan Richter
Robert P. J. Day wrote: > On Mon, 12 Mar 2007, Stefan Richter wrote: >> Rusty Russell wrote: >> > OTOH, BUILD_BUG_OR_ZERO says what happens: either it's a build bug, or >> > it's zero. >> >> What about ZERO_UNLESS_BUILD_BUG_ON(e)? It's long though... > > how often is this going to be used? it's

Re: [PATCH] BUILD_BUG_ON_ZERO -> BUILD_BUG_OR_ZERO

2007-03-12 Thread Robert P. J. Day
On Mon, 12 Mar 2007, Stefan Richter wrote: > Rusty Russell wrote: > > On Mon, 2007-03-12 at 08:23 +, Jan Beulich wrote: > >> I have to admit that I don't see the point here - I can't seem to make > >> any sense of the OR... Jan > > > > At least one other person thought that: > > > >

Re: [PATCH] BUILD_BUG_ON_ZERO -> BUILD_BUG_OR_ZERO

2007-03-12 Thread Stefan Richter
Rusty Russell wrote: > On Mon, 2007-03-12 at 08:23 +, Jan Beulich wrote: >> I have to admit that I don't see the point here - I can't seem to make >> any sense of the OR... Jan > > At least one other person thought that: > > #define BUILD_BUG_ON_ZERO(e) BUILD_BUG_ON((e) == 0) > >

Re: [PATCH] BUILD_BUG_ON_ZERO -> BUILD_BUG_OR_ZERO

2007-03-12 Thread Andi Kleen
On Mon, Mar 12, 2007 at 10:28:13AM +1100, Rusty Russell wrote: > BUILD_BUG_ON_ZERO is named perfectly wrong, and BUILD_BUG_ON_RETURN_ZERO > is too long. Flip three bits, and the name is much more suitable. Ok for me. -Andi - To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH] BUILD_BUG_ON_ZERO -> BUILD_BUG_OR_ZERO

2007-03-12 Thread Rusty Russell
On Mon, 2007-03-12 at 08:23 +, Jan Beulich wrote: > I have to admit that I don't see the point here - I can't seem to make > any sense of the OR... Jan At least one other person thought that: #define BUILD_BUG_ON_ZERO(e) BUILD_BUG_ON((e) == 0) OTOH, BUILD_BUG_OR_ZERO says what

Re: [PATCH] BUILD_BUG_ON_ZERO -> BUILD_BUG_OR_ZERO

2007-03-12 Thread Jan Engelhardt
On Mar 12 2007 08:23, Jan Beulich wrote: > >I have to admit that I don't see the point here - I can't seem to make any >sense of the OR... Jan BUILD_BUG_OR_ZERO will either (a) result in a build bug or (b) the number zero, suitable for arithmetic. Rusty Russell <[EMAIL PROTECTED]> 12.03.07

Re: [PATCH] BUILD_BUG_ON_ZERO -> BUILD_BUG_OR_ZERO

2007-03-12 Thread Jan Beulich
I have to admit that I don't see the point here - I can't seem to make any sense of the OR... Jan >>> Rusty Russell <[EMAIL PROTECTED]> 12.03.07 00:28 >>> BUILD_BUG_ON_ZERO is named perfectly wrong, and BUILD_BUG_ON_RETURN_ZERO is too long. Flip three bits, and the name is much more suitable.

Re: [PATCH] BUILD_BUG_ON_ZERO - BUILD_BUG_OR_ZERO

2007-03-12 Thread Jan Beulich
I have to admit that I don't see the point here - I can't seem to make any sense of the OR... Jan Rusty Russell [EMAIL PROTECTED] 12.03.07 00:28 BUILD_BUG_ON_ZERO is named perfectly wrong, and BUILD_BUG_ON_RETURN_ZERO is too long. Flip three bits, and the name is much more suitable.

Re: [PATCH] BUILD_BUG_ON_ZERO - BUILD_BUG_OR_ZERO

2007-03-12 Thread Jan Engelhardt
On Mar 12 2007 08:23, Jan Beulich wrote: I have to admit that I don't see the point here - I can't seem to make any sense of the OR... Jan BUILD_BUG_OR_ZERO will either (a) result in a build bug or (b) the number zero, suitable for arithmetic. Rusty Russell [EMAIL PROTECTED] 12.03.07 00:28

Re: [PATCH] BUILD_BUG_ON_ZERO - BUILD_BUG_OR_ZERO

2007-03-12 Thread Rusty Russell
On Mon, 2007-03-12 at 08:23 +, Jan Beulich wrote: I have to admit that I don't see the point here - I can't seem to make any sense of the OR... Jan At least one other person thought that: #define BUILD_BUG_ON_ZERO(e) BUILD_BUG_ON((e) == 0) OTOH, BUILD_BUG_OR_ZERO says what

Re: [PATCH] BUILD_BUG_ON_ZERO - BUILD_BUG_OR_ZERO

2007-03-12 Thread Andi Kleen
On Mon, Mar 12, 2007 at 10:28:13AM +1100, Rusty Russell wrote: BUILD_BUG_ON_ZERO is named perfectly wrong, and BUILD_BUG_ON_RETURN_ZERO is too long. Flip three bits, and the name is much more suitable. Ok for me. -Andi - To unsubscribe from this list: send the line unsubscribe linux-kernel in

Re: [PATCH] BUILD_BUG_ON_ZERO - BUILD_BUG_OR_ZERO

2007-03-12 Thread Stefan Richter
Rusty Russell wrote: On Mon, 2007-03-12 at 08:23 +, Jan Beulich wrote: I have to admit that I don't see the point here - I can't seem to make any sense of the OR... Jan At least one other person thought that: #define BUILD_BUG_ON_ZERO(e) BUILD_BUG_ON((e) == 0) OTOH,

Re: [PATCH] BUILD_BUG_ON_ZERO - BUILD_BUG_OR_ZERO

2007-03-12 Thread Robert P. J. Day
On Mon, 12 Mar 2007, Stefan Richter wrote: Rusty Russell wrote: On Mon, 2007-03-12 at 08:23 +, Jan Beulich wrote: I have to admit that I don't see the point here - I can't seem to make any sense of the OR... Jan At least one other person thought that: #define

Re: [PATCH] BUILD_BUG_ON_ZERO - BUILD_BUG_OR_ZERO

2007-03-12 Thread Stefan Richter
Robert P. J. Day wrote: On Mon, 12 Mar 2007, Stefan Richter wrote: Rusty Russell wrote: OTOH, BUILD_BUG_OR_ZERO says what happens: either it's a build bug, or it's zero. What about ZERO_UNLESS_BUILD_BUG_ON(e)? It's long though... how often is this going to be used? it's not like the

Re: [PATCH] BUILD_BUG_ON_ZERO - BUILD_BUG_OR_ZERO

2007-03-12 Thread Rusty Russell
On Mon, 2007-03-12 at 15:14 +0100, Stefan Richter wrote: Robert P. J. Day wrote: On Mon, 12 Mar 2007, Stefan Richter wrote: Rusty Russell wrote: OTOH, BUILD_BUG_OR_ZERO says what happens: either it's a build bug, or it's zero. What about ZERO_UNLESS_BUILD_BUG_ON(e)? It's long

[PATCH] BUILD_BUG_ON_ZERO -> BUILD_BUG_OR_ZERO

2007-03-11 Thread Rusty Russell
BUILD_BUG_ON_ZERO is named perfectly wrong, and BUILD_BUG_ON_RETURN_ZERO is too long. Flip three bits, and the name is much more suitable. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> diff -r 6fb745a5bb51 include/linux/compiler-gcc.h --- a/include/linux/compiler-gcc.h Mon Mar 12

[PATCH] BUILD_BUG_ON_ZERO - BUILD_BUG_OR_ZERO

2007-03-11 Thread Rusty Russell
BUILD_BUG_ON_ZERO is named perfectly wrong, and BUILD_BUG_ON_RETURN_ZERO is too long. Flip three bits, and the name is much more suitable. Signed-off-by: Rusty Russell [EMAIL PROTECTED] diff -r 6fb745a5bb51 include/linux/compiler-gcc.h --- a/include/linux/compiler-gcc.h Mon Mar 12 09:12:20