aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMatt Mackall <mpm@selenic.com>2005-05-01 11:59:02 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-01 11:59:02 -0400
commitd59745ce3e7aa13856bca16d3bcbb95041775ff6 (patch)
tree6e495bb6697d86534685bf813c43e210a8d8323a /include
parentcd7619d6bf36564cf54ff7218ef54e558a741913 (diff)
[PATCH] clean up kernel messages
Arrange for all kernel printks to be no-ops. Only available if CONFIG_EMBEDDED. This patch saves about 375k on my laptop config and nearly 100k on minimal configs. Signed-off-by: Matt Mackall <mpm@selenic.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/kernel.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 7c1cba4a5278..e25b97062ce1 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -115,10 +115,19 @@ extern int __kernel_text_address(unsigned long addr);
115extern int kernel_text_address(unsigned long addr); 115extern int kernel_text_address(unsigned long addr);
116extern int session_of_pgrp(int pgrp); 116extern int session_of_pgrp(int pgrp);
117 117
118#ifdef CONFIG_PRINTK
118asmlinkage int vprintk(const char *fmt, va_list args) 119asmlinkage int vprintk(const char *fmt, va_list args)
119 __attribute__ ((format (printf, 1, 0))); 120 __attribute__ ((format (printf, 1, 0)));
120asmlinkage int printk(const char * fmt, ...) 121asmlinkage int printk(const char * fmt, ...)
121 __attribute__ ((format (printf, 1, 2))); 122 __attribute__ ((format (printf, 1, 2)));
123#else
124static inline int vprintk(const char *s, va_list args)
125 __attribute__ ((format (printf, 1, 0)));
126static inline int vprintk(const char *s, va_list args) { return 0; }
127static inline int printk(const char *s, ...)
128 __attribute__ ((format (printf, 1, 2)));
129static inline int printk(const char *s, ...) { return 0; }
130#endif
122 131
123unsigned long int_sqrt(unsigned long); 132unsigned long int_sqrt(unsigned long);
124 133