From: Josh Triplett Date: Mon, 7 Apr 2014 22:39:12 +0000 (-0700) Subject: bug: when !CONFIG_BUG, make WARN call no_printk to check format and args X-Git-Tag: v4.9.8~6596^2~37 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4e50ebde32bed67a9aec8c239bbd89e5d0b8727b;p=platform%2Fkernel%2Flinux-rpi3.git 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 Reported-by: Arnd Bergmann Acked-by: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index 2d54d8d..a97fa11 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); #ifndef WARN #define WARN(condition, format...) ({ \ int __ret_warn_on = !!(condition); \ + no_printk(format); \ unlikely(__ret_warn_on); \ }) #endif