summaryrefslogtreecommitdiff
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2010-08-12 16:54:57 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-12 09:51:35 -0700
commit12fdff3fc2483f906ae6404a6e8dcf2550310b6f (patch)
treea79fb1365fce7c7529655a8802d6d6bf8509b374 /include/linux/kernel.h
parent1490cf5f0cb07dd49cdab4bceb769d7f711d7ca6 (diff)
downloadlinux-12fdff3fc2483f906ae6404a6e8dcf2550310b6f.tar.gz
Add a dummy printk function for the maintenance of unused printks
Add a dummy printk function for the maintenance of unused printks through gcc format checking, and also so that side-effect checking is maintained too. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index d848cb854655..2b0a35e6bc69 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -306,6 +306,13 @@ static inline void log_buf_kexec_setup(void)
}
#endif
+/*
+ * Dummy printk for disabled debugging statements to use whilst maintaining
+ * gcc's format and side-effect checking.
+ */
+static inline __attribute__ ((format (printf, 1, 2)))
+int no_printk(const char *s, ...) { return 0; }
+
extern int printk_needs_cpu(int cpu);
extern void printk_tick(void);