mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 23:21:46 +00:00
[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>
This commit is contained in:
parent
cd7619d6bf
commit
d59745ce3e
4 changed files with 43 additions and 6 deletions
|
@ -115,10 +115,19 @@ extern int __kernel_text_address(unsigned long addr);
|
|||
extern int kernel_text_address(unsigned long addr);
|
||||
extern int session_of_pgrp(int pgrp);
|
||||
|
||||
#ifdef CONFIG_PRINTK
|
||||
asmlinkage int vprintk(const char *fmt, va_list args)
|
||||
__attribute__ ((format (printf, 1, 0)));
|
||||
asmlinkage int printk(const char * fmt, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
#else
|
||||
static inline int vprintk(const char *s, va_list args)
|
||||
__attribute__ ((format (printf, 1, 0)));
|
||||
static inline int vprintk(const char *s, va_list args) { return 0; }
|
||||
static inline int printk(const char *s, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
static inline int printk(const char *s, ...) { return 0; }
|
||||
#endif
|
||||
|
||||
unsigned long int_sqrt(unsigned long);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue