From: Andrew Morton Cc: Arjan van de Ven Cc: Greg KH Cc: Jiri Slaby DESC add-a-warn-macro-this-is-warn_on-printk-arguments-fix-checkpatch-fixes EDESC From: Andrew Morton ERROR: space required after that ',' (ctx:VxV) #22: FILE: include/asm-generic/bug.h:37: + __attribute__((format(printf,3,4))); ^ ERROR: space required after that ',' (ctx:VxV) #22: FILE: include/asm-generic/bug.h:37: + __attribute__((format(printf,3,4))); ^ total: 2 errors, 0 warnings, 29 lines checked ./patches/add-a-warn-macro-this-is-warn_on-printk-arguments-fix.patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: Arjan van de Ven Cc: Greg KH Cc: Jiri Slaby Signed-off-by: Andrew Morton --- include/asm-generic/bug.h | 6 ++---- kernel/panic.c | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) diff -puN include/asm-generic/bug.h~add-a-warn-macro-this-is-warn_on-printk-arguments-fix include/asm-generic/bug.h --- a/include/asm-generic/bug.h~add-a-warn-macro-this-is-warn_on-printk-arguments-fix +++ a/include/asm-generic/bug.h @@ -34,7 +34,8 @@ struct bug_entry { #ifndef __WARN #ifndef __ASSEMBLY__ extern void warn_on_slowpath(const char *file, const int line); -extern void warn_slowpath(const char *file, const int line, const char *fmt, ...); +extern void warn_slowpath(const char *file, const int line, + const char *fmt, ...) __attribute__((format(printf, 3, 4))); #define WANT_WARN_ON_SLOWPATH #endif #define __WARN() warn_on_slowpath(__FILE__, __LINE__) @@ -61,9 +62,6 @@ extern void warn_slowpath(const char *fi }) #endif - - - #else /* !CONFIG_BUG */ #ifndef HAVE_ARCH_BUG #define BUG() diff -puN kernel/panic.c~add-a-warn-macro-this-is-warn_on-printk-arguments-fix kernel/panic.c --- a/kernel/panic.c~add-a-warn-macro-this-is-warn_on-printk-arguments-fix +++ a/kernel/panic.c @@ -326,10 +326,8 @@ EXPORT_SYMBOL(warn_on_slowpath); void warn_slowpath(const char *file, int line, const char *fmt, ...) { va_list args; - - char function[KSYM_SYMBOL_LEN]; - unsigned long caller = (unsigned long) __builtin_return_address(0); + unsigned long caller = (unsigned long)__builtin_return_address(0); sprint_symbol(function, caller); printk(KERN_WARNING "------------[ cut here ]------------\n"); _