Re: [PATCH 2/3] core: Convert printk_once to use DO_ONCE

2013-10-16 Thread Frederic Weisbecker
On Wed, Oct 16, 2013 at 08:59:28AM -0400, Steven Rostedt wrote: > On Wed, 16 Oct 2013 13:53:56 +0200 > Frederic Weisbecker wrote: > > > > static int done; > > > > if (!done) { > > trace_printk(something); > > trace_printk(something else); > > trace_dump_stack(); > > done = 1; >

Re: [PATCH 2/3] core: Convert printk_once to use DO_ONCE

2013-10-16 Thread Steven Rostedt
On Wed, 16 Oct 2013 13:53:56 +0200 Frederic Weisbecker wrote: > static int done; > > if (!done) { > trace_printk(something); > trace_printk(something else); > trace_dump_stack(); > done = 1; > } > > Having a DO_ONCE() would help a lot I think. > > Now we can rename it to __DO

Re: [PATCH 2/3] core: Convert printk_once to use DO_ONCE

2013-10-16 Thread Frederic Weisbecker
On Tue, Oct 15, 2013 at 02:24:40PM -0700, Joe Perches wrote: > On Tue, 2013-10-15 at 23:12 +0200, Frederic Weisbecker wrote: > > On Tue, Oct 15, 2013 at 02:00:05PM -0700, Joe Perches wrote: > > > On Tue, 2013-10-15 at 22:50 +0200, Frederic Weisbecker wrote: > > > [] > > > > diff --git a/include/lin

Re: [PATCH 2/3] core: Convert printk_once to use DO_ONCE

2013-10-15 Thread Joe Perches
On Tue, 2013-10-15 at 23:12 +0200, Frederic Weisbecker wrote: > On Tue, Oct 15, 2013 at 02:00:05PM -0700, Joe Perches wrote: > > On Tue, 2013-10-15 at 22:50 +0200, Frederic Weisbecker wrote: > > [] > > > diff --git a/include/linux/printk.h b/include/linux/printk.h > > [] > > > @@ -252,14 +253,7 @@

Re: [PATCH 2/3] core: Convert printk_once to use DO_ONCE

2013-10-15 Thread Frederic Weisbecker
On Tue, Oct 15, 2013 at 02:00:05PM -0700, Joe Perches wrote: > On Tue, 2013-10-15 at 22:50 +0200, Frederic Weisbecker wrote: > [] > > diff --git a/include/linux/printk.h b/include/linux/printk.h > [] > > @@ -252,14 +253,7 @@ extern asmlinkage void dump_stack(void) __cold; > > > > #ifdef CONFIG_P

Re: [PATCH 2/3] core: Convert printk_once to use DO_ONCE

2013-10-15 Thread Joe Perches
On Tue, 2013-10-15 at 22:50 +0200, Frederic Weisbecker wrote: [] > diff --git a/include/linux/printk.h b/include/linux/printk.h [] > @@ -252,14 +253,7 @@ extern asmlinkage void dump_stack(void) __cold; > > #ifdef CONFIG_PRINTK > #define printk_once(fmt, ...)\ > -({

[PATCH 2/3] core: Convert printk_once to use DO_ONCE

2013-10-15 Thread Frederic Weisbecker
Signed-off-by: Frederic Weisbecker Cc: Andrew Morton Cc: Steven Rostedt Cc: Linus Torvalds Cc: H. Peter Anvin Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Liu Chuansheng Cc: Ingo Molnar --- include/linux/printk.h | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a