diff options
author | Joe Perches <joe@perches.com> | 2011-01-12 16:59:43 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 08:03:09 -0800 |
commit | a9747cc3addf81e56ea9b8a4374fbdb9d1737eae (patch) | |
tree | fe163341b5c80ea2f597095c609eec959ee3e728 /include/linux/printk.h | |
parent | fb842b00c5eab66ec361b31550aa8a922745ce9e (diff) |
include/linux/printk.h: move console functions and variables together
There are many uses of printk_once(KERN_<level>, so add pr_<level>_once
macros to avoid printk_once(KERN_<level> pr_fmt(fmt).
Add an #ifdef CONFIG_PRINTK for print_hex_dump and static inline void
functions for the #else cases to reduce embedded code size. Neaten and
organize the rest of the code.
This patch:
Move console functions and variables together.
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/printk.h')
-rw-r--r-- | include/linux/printk.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/include/linux/printk.h b/include/linux/printk.h index 9adfba6ec28..bd43c727c0a 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -29,6 +29,17 @@ extern int console_printk[]; #define minimum_console_loglevel (console_printk[2]) #define default_console_loglevel (console_printk[3]) +static inline void console_silent(void) +{ + console_loglevel = 0; +} + +static inline void console_verbose(void) +{ + if (console_loglevel) + console_loglevel = 15; +} + struct va_format { const char *fmt; va_list *va; @@ -131,17 +142,6 @@ extern void printk_tick(void); extern void asmlinkage __attribute__((format(printf, 1, 2))) early_printk(const char *fmt, ...); -static inline void console_silent(void) -{ - console_loglevel = 0; -} - -static inline void console_verbose(void) -{ - if (console_loglevel) - console_loglevel = 15; -} - extern void dump_stack(void) __cold; enum { |