Re: Fix empty macros in acpi.

2007-07-21 Thread Len Brown
On Tuesday 03 July 2007 01:44, Dave Jones wrote: > On Tue, Jul 03, 2007 at 01:22:47AM -0400, Len Brown wrote: > > > whelp, it seems that the reason for this patch is this: > > > > #define DBG() > > > > if(...) > >DBG(); > > next_c_statement > > > > which turns into > > if(...) ; >

Re: Fix empty macros in acpi.

2007-07-02 Thread Dave Jones
On Tue, Jul 03, 2007 at 01:22:47AM -0400, Len Brown wrote: > whelp, it seems that the reason for this patch is this: > > #define DBG() > > if(...) > DBG(); > next_c_statement > > which turns into > if(...) ; > next_c_statement > > But since there is an intervening ';', this c

Re: Fix empty macros in acpi.

2007-07-02 Thread Len Brown
On Tuesday 12 June 2007 20:26, Al Viro wrote: > On Tue, Jun 12, 2007 at 08:21:15PM -0400, Dave Jones wrote: > > On Wed, Jun 13, 2007 at 01:00:29AM +0100, Al Viro wrote: > > > On Tue, Jun 12, 2007 at 07:33:09PM -0400, Dave Jones wrote: > > > > +#define DBG(x...) do { } while(0) > > > > > > Eh..

Re: Fix empty macros in acpi.

2007-06-12 Thread Al Viro
On Tue, Jun 12, 2007 at 08:21:15PM -0400, Dave Jones wrote: > On Wed, Jun 13, 2007 at 01:00:29AM +0100, Al Viro wrote: > > On Tue, Jun 12, 2007 at 07:33:09PM -0400, Dave Jones wrote: > > > +#define DBG(x...) do { } while(0) > > > > Eh... Please, stop it - if you want a function-call-like no-o

Re: Fix empty macros in acpi.

2007-06-12 Thread Dave Jones
On Wed, Jun 13, 2007 at 01:00:29AM +0100, Al Viro wrote: > On Tue, Jun 12, 2007 at 07:33:09PM -0400, Dave Jones wrote: > > +#define DBG(x...) do { } while(0) > > Eh... Please, stop it - if you want a function-call-like no-op returning > void, > use ((void)0). At least that way one can say

Re: Fix empty macros in acpi.

2007-06-12 Thread Al Viro
On Tue, Jun 12, 2007 at 07:33:09PM -0400, Dave Jones wrote: > +#define DBG(x...) do { } while(0) Eh... Please, stop it - if you want a function-call-like no-op returning void, use ((void)0). At least that way one can say DBG(),foo(), etc. - To unsubscribe from this list: send the line "unsu

Fix empty macros in acpi.

2007-06-12 Thread Dave Jones
ACPI has a ton of macros which make a bunch of empty if's when configured in non-debug mode. Signed-off-by: Dave Jones <[EMAIL PROTECTED]> diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index 4334c20..5955cfd 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c @@ -16,7 +16,7 @@ #i