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>
This commit is contained in:
committed by
Linus Torvalds
parent
1490cf5f0c
commit
12fdff3fc2
@@ -22,10 +22,6 @@
|
||||
#define kdebug(FMT, ...) \
|
||||
printk("[%-5.5s%5u] "FMT"\n", current->comm, current->pid ,##__VA_ARGS__)
|
||||
#else
|
||||
static inline __attribute__((format(printf, 1, 2)))
|
||||
void no_printk(const char *fmt, ...)
|
||||
{
|
||||
}
|
||||
#define kdebug(FMT, ...) \
|
||||
no_printk("[%-5.5s%5u] "FMT"\n", current->comm, current->pid ,##__VA_ARGS__)
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user