lkml.org 
[lkml]   [2013]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/3] core: Convert printk_once to use DO_ONCE
From
Date
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, ...) \
> -({ \
> - static bool __print_once; \
> - \
> - if (!__print_once) { \
> - __print_once = true; \
> - printk(fmt, ##__VA_ARGS__); \
> - } \
> -})
> + DO_ONCE(printk(fmt, ##__VA_ARGS__));

It's hard to believe the overhead is worth it.




\
 
 \ /
  Last update: 2013-10-16 00:41    [W:0.048 / U:7.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site