x86/platform/intel/quark: Add printf attribute to imr_self_test_result()
authorNicolas Iooss <nicolas.iooss_linux@m4x.org>
Mon, 19 Dec 2016 13:21:44 +0000 (14:21 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 20 Dec 2016 08:37:24 +0000 (09:37 +0100)
__printf() attributes help detecting issues in printf() format strings at
compile time.

Even though imr_selftest.c is only compiled with
CONFIG_DEBUG_IMR_SELFTEST=y, GCC complains about a missing format
attribute when compiling allmodconfig with -Wmissing-format-attribute.

Silence this warning by adding the attribute.

Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Acked-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20161219132144.4108-1-nicolas.iooss_linux@m4x.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/platform/intel-quark/imr_selftest.c

index f5bad40936ac5bc7a4b47a868fb07121963fe2be..b8f562049cad102cd315987f87b099bed97e4cce 100644 (file)
@@ -25,7 +25,8 @@
  * @fmt:       format string.
  * ...         variadic argument list.
  */
-static void __init imr_self_test_result(int res, const char *fmt, ...)
+static __printf(2, 3)
+void __init imr_self_test_result(int res, const char *fmt, ...)
 {
        va_list vlist;