linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] x86/platform/intel/quark: add printf attribute to imr_self_test_result()
@ 2016-12-19 13:21 Nicolas Iooss
  2016-12-20  0:28 ` Bryan O'Donoghue
  2016-12-20  9:36 ` [tip:x86/urgent] x86/platform/intel/quark: Add " tip-bot for Nicolas Iooss
  0 siblings, 2 replies; 3+ messages in thread
From: Nicolas Iooss @ 2016-12-19 13:21 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin
  Cc: x86, linux-kernel, Nicolas Iooss

__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, gcc complains about a missing format
attribute when compiling allmodconfig with -Wmissing-format-attribute.
Silent this warning by adding the attribute.

Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
---
 arch/x86/platform/intel-quark/imr_selftest.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/platform/intel-quark/imr_selftest.c b/arch/x86/platform/intel-quark/imr_selftest.c
index f5bad40936ac..b8f562049cad 100644
--- a/arch/x86/platform/intel-quark/imr_selftest.c
+++ b/arch/x86/platform/intel-quark/imr_selftest.c
@@ -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;
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-20  9:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-19 13:21 [PATCH 1/1] x86/platform/intel/quark: add printf attribute to imr_self_test_result() Nicolas Iooss
2016-12-20  0:28 ` Bryan O'Donoghue
2016-12-20  9:36 ` [tip:x86/urgent] x86/platform/intel/quark: Add " tip-bot for Nicolas Iooss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).