Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757120AbcLSNWI (ORCPT ); Mon, 19 Dec 2016 08:22:08 -0500 Received: from mx1.polytechnique.org ([129.104.30.34]:37864 "EHLO mx1.polytechnique.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754912AbcLSNWE (ORCPT ); Mon, 19 Dec 2016 08:22:04 -0500 From: Nicolas Iooss To: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Nicolas Iooss Subject: [PATCH 1/1] x86/platform/intel/quark: add printf attribute to imr_self_test_result() Date: Mon, 19 Dec 2016 14:21:44 +0100 Message-Id: <20161219132144.4108-1-nicolas.iooss_linux@m4x.org> X-Mailer: git-send-email 2.11.0 X-AV-Checked: ClamAV using ClamSMTP at svoboda.polytechnique.org (Mon Dec 19 14:22:02 2016 +0100 (CET)) X-Spam-Flag: No, tests=bogofilter, spamicity=0.000001, queueID=0E6385647D8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1002 Lines: 29 __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 --- 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