Commit 4e50ebde authored by Josh Triplett's avatar Josh Triplett Committed by Linus Torvalds

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: default avatarJosh Triplett <josh@joshtriplett.org>
Reported-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a3f7607d
...@@ -155,6 +155,7 @@ extern void warn_slowpath_null(const char *file, const int line); ...@@ -155,6 +155,7 @@ extern void warn_slowpath_null(const char *file, const int line);
#ifndef WARN #ifndef WARN
#define WARN(condition, format...) ({ \ #define WARN(condition, format...) ({ \
int __ret_warn_on = !!(condition); \ int __ret_warn_on = !!(condition); \
no_printk(format); \
unlikely(__ret_warn_on); \ unlikely(__ret_warn_on); \
}) })
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment