Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756777AbcLTAQ5 (ORCPT ); Mon, 19 Dec 2016 19:16:57 -0500 Received: from mail-wm0-f52.google.com ([74.125.82.52]:36122 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756605AbcLTAQv (ORCPT ); Mon, 19 Dec 2016 19:16:51 -0500 Subject: Re: [PATCH 1/1] x86/platform/intel/quark: add printf attribute to imr_self_test_result() To: Nicolas Iooss , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" References: <20161219132144.4108-1-nicolas.iooss_linux@m4x.org> Cc: x86@kernel.org, linux-kernel@vger.kernel.org From: "Bryan O'Donoghue" Message-ID: <0b12e4ca-4709-b3a3-6479-e395c48a38c3@nexus-software.ie> Date: Tue, 20 Dec 2016 00:28:23 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20161219132144.4108-1-nicolas.iooss_linux@m4x.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1186 Lines: 40 On 19/12/16 13:21, Nicolas Iooss wrote: > __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; > > since I wrote this code. Acked-by: Bryan O'Donoghue cheers --- bod