Skip to content

Commit

Permalink
kernel.h: remove initialization of bool in printk_once
Browse files Browse the repository at this point in the history
Don't initialize __print_once.  Invert the test to reduce initialized
data.

defconfig before:	$size vmlinux
   text	   data	    bss	    dec	    hex	filename
6976022	 679572	1359668	9015262	 898fde	vmlinux

defconfig after:	$size vmlinux
   text	   data	    bss	    dec	    hex	filename
6976006	 679508	1359700	9015214	 898fae	vmlinux

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Joe Perches authored and Linus Torvalds committed Dec 15, 2009
1 parent 196a15b commit 0b2749a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/linux/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,10 @@ extern int printk_delay_msec;
* Print a one-time message (analogous to WARN_ONCE() et al):
*/
#define printk_once(x...) ({ \
static bool __print_once = true; \
static bool __print_once; \
\
if (__print_once) { \
__print_once = false; \
if (!__print_once) { \
__print_once = true; \
printk(x); \
} \
})
Expand Down

0 comments on commit 0b2749a

Please sign in to comment.