Re: [PATCH] acpi: glue: Update DBG macro to include KERN_DEBUG
On Monday, December 17, 2012 10:31:30 PM Joe Perches wrote: > Currently these DBG statements are emitted at KERN_DEFAULT. > Change the macro to emit at KERN_DEBUG. > > This can help avoid unexpected message interleaving. Applied to linux-pm.git/linux-next as v3.8 material. Thanks, Rafael > Signed-off-by: Joe Perches > --- > > Another way to fix this message interleaving... > > drivers/acpi/glue.c |9 +++-- > 1 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c > index 0155184..95af6f6 100644 > --- a/drivers/acpi/glue.c > +++ b/drivers/acpi/glue.c > @@ -18,9 +18,14 @@ > > #define ACPI_GLUE_DEBUG 0 > #if ACPI_GLUE_DEBUG > -#define DBG(x...) printk(PREFIX x) > +#define DBG(fmt, ...)\ > + printk(KERN_DEBUG PREFIX fmt, ##__VA_ARGS__) > #else > -#define DBG(x...) do { } while(0) > +#define DBG(fmt, ...)\ > +do { \ > + if (0) \ > + printk(KERN_DEBUG PREFIX fmt, ##__VA_ARGS__); \ > +} while (0) > #endif > static LIST_HEAD(bus_type_list); > static DECLARE_RWSEM(bus_type_sem); > -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] acpi: glue: Update DBG macro to include KERN_DEBUG
On Monday, December 17, 2012 10:31:30 PM Joe Perches wrote: Currently these DBG statements are emitted at KERN_DEFAULT. Change the macro to emit at KERN_DEBUG. This can help avoid unexpected message interleaving. Applied to linux-pm.git/linux-next as v3.8 material. Thanks, Rafael Signed-off-by: Joe Perches j...@perches.com --- Another way to fix this message interleaving... drivers/acpi/glue.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index 0155184..95af6f6 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c @@ -18,9 +18,14 @@ #define ACPI_GLUE_DEBUG 0 #if ACPI_GLUE_DEBUG -#define DBG(x...) printk(PREFIX x) +#define DBG(fmt, ...)\ + printk(KERN_DEBUG PREFIX fmt, ##__VA_ARGS__) #else -#define DBG(x...) do { } while(0) +#define DBG(fmt, ...)\ +do { \ + if (0) \ + printk(KERN_DEBUG PREFIX fmt, ##__VA_ARGS__); \ +} while (0) #endif static LIST_HEAD(bus_type_list); static DECLARE_RWSEM(bus_type_sem); -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] acpi: glue: Update DBG macro to include KERN_DEBUG
Currently these DBG statements are emitted at KERN_DEFAULT. Change the macro to emit at KERN_DEBUG. This can help avoid unexpected message interleaving. Signed-off-by: Joe Perches --- Another way to fix this message interleaving... drivers/acpi/glue.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index 0155184..95af6f6 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c @@ -18,9 +18,14 @@ #define ACPI_GLUE_DEBUG0 #if ACPI_GLUE_DEBUG -#define DBG(x...) printk(PREFIX x) +#define DBG(fmt, ...) \ + printk(KERN_DEBUG PREFIX fmt, ##__VA_ARGS__) #else -#define DBG(x...) do { } while(0) +#define DBG(fmt, ...) \ +do { \ + if (0) \ + printk(KERN_DEBUG PREFIX fmt, ##__VA_ARGS__); \ +} while (0) #endif static LIST_HEAD(bus_type_list); static DECLARE_RWSEM(bus_type_sem); -- 1.7.8.112.g3fd21 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] acpi: glue: Update DBG macro to include KERN_DEBUG
Currently these DBG statements are emitted at KERN_DEFAULT. Change the macro to emit at KERN_DEBUG. This can help avoid unexpected message interleaving. Signed-off-by: Joe Perches j...@perches.com --- Another way to fix this message interleaving... drivers/acpi/glue.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index 0155184..95af6f6 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c @@ -18,9 +18,14 @@ #define ACPI_GLUE_DEBUG0 #if ACPI_GLUE_DEBUG -#define DBG(x...) printk(PREFIX x) +#define DBG(fmt, ...) \ + printk(KERN_DEBUG PREFIX fmt, ##__VA_ARGS__) #else -#define DBG(x...) do { } while(0) +#define DBG(fmt, ...) \ +do { \ + if (0) \ + printk(KERN_DEBUG PREFIX fmt, ##__VA_ARGS__); \ +} while (0) #endif static LIST_HEAD(bus_type_list); static DECLARE_RWSEM(bus_type_sem); -- 1.7.8.112.g3fd21 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/