diff options
author | Josh Triplett <josh@joshtriplett.org> | 2014-04-07 18:39:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-07 19:36:10 -0400 |
commit | 4e50ebde32bed67a9aec8c239bbd89e5d0b8727b (patch) | |
tree | edd795dfd8709ed19b766977350df17f2e3ac19b /include/asm-generic | |
parent | a3f7607d09e28520ad6d86ea423051605f7d4c6f (diff) |
bug: when !CONFIG_BUG, make WARN call no_printk to check format and args
The stub version of WARN for !CONFIG_BUG completely ignored its format
string and subsequent arguments; make it check them instead, using
no_printk.
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/bug.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index 2d54d8df7bd1..a97fa11aaf41 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h | |||
@@ -155,6 +155,7 @@ extern void warn_slowpath_null(const char *file, const int line); | |||
155 | #ifndef WARN | 155 | #ifndef WARN |
156 | #define WARN(condition, format...) ({ \ | 156 | #define WARN(condition, format...) ({ \ |
157 | int __ret_warn_on = !!(condition); \ | 157 | int __ret_warn_on = !!(condition); \ |
158 | no_printk(format); \ | ||
158 | unlikely(__ret_warn_on); \ | 159 | unlikely(__ret_warn_on); \ |
159 | }) | 160 | }) |
160 | #endif | 161 | #endif |