summaryrefslogtreecommitdiffstats
path: root/include/linux/printk.h
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2014-11-21 09:16:58 -0500
committerSteven Rostedt <rostedt@goodmis.org>2014-11-21 11:19:15 -0500
commit04b74b27c2941e5d62120f6fee3a0a9388a30613 (patch)
tree05a24b1a4768b12f6656a6121d1281ed77426116 /include/linux/printk.h
parenta9edc88093287183ac934be44f295f183b2c62dd (diff)
downloadlinux-04b74b27c2941e5d62120f6fee3a0a9388a30613.tar.gz
linux-04b74b27c2941e5d62120f6fee3a0a9388a30613.tar.bz2
linux-04b74b27c2941e5d62120f6fee3a0a9388a30613.zip
printk/percpu: Define printk_func when printk is not defined
To avoid include hell, the per_cpu variable printk_func was declared in percpu.h. But it is only defined if printk is defined. As users of printk may also use the printk_func variable, it needs to be defined even if CONFIG_PRINTK is not. Also add a printk.h include in percpu.h just to be safe. Link: http://lkml.kernel.org/r/20141121183215.01ba539c@canb.auug.org.au Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/printk.h')
-rw-r--r--include/linux/printk.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/printk.h b/include/linux/printk.h
index 3bbd979d32fb..c69be9ee8f48 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -124,6 +124,8 @@ static inline __printf(1, 2) __cold
void early_printk(const char *s, ...) { }
#endif
+typedef int(*printk_func_t)(const char *fmt, va_list args);
+
#ifdef CONFIG_PRINTK
asmlinkage __printf(5, 0)
int vprintk_emit(int facility, int level,
@@ -162,8 +164,6 @@ extern int kptr_restrict;
extern void wake_up_klogd(void);
-typedef int(*printk_func_t)(const char *fmt, va_list args);
-
void log_buf_kexec_setup(void);
void __init setup_log_buf(int early);
void dump_stack_set_arch_desc(const char *fmt, ...);