Skip to content

Commit

Permalink
x86/platform/intel/quark: Add printf attribute to imr_self_test_result()
Browse files Browse the repository at this point in the history
__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 <[email protected]>
Acked-by: Bryan O'Donoghue <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
fishilico authored and Ingo Molnar committed Dec 20, 2016
1 parent 634b847 commit 9120cf4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/x86/platform/intel-quark/imr_selftest.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 9120cf4

Please sign in to comment.