From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752658AbdJTVJC (ORCPT ); Fri, 20 Oct 2017 17:09:02 -0400 Received: from smtprelay0128.hostedemail.com ([216.40.44.128]:47171 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751823AbdJTVJB (ORCPT ); Fri, 20 Oct 2017 17:09:01 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 10,1,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2828:2915:3138:3139:3140:3141:3142:3352:3622:3865:3867:3868:3871:3872:3873:3874:4321:4605:5007:6119:6742:7775:7903:10004:10400:10848:11026:11232:11473:11658:11914:12295:12296:12555:12740:12760:12895:13069:13161:13229:13311:13357:13439:13523:13524:14659:14721:21080:21434:21627:30012:30054:30062:30069:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: board79_6b533f76e4a1c X-Filterd-Recvd-Size: 2604 Message-ID: <1508533736.30181.7.camel@perches.com> Subject: Re: [PATCH] MIPS: kernel: proc: Remove spurious white space in cpuinfo From: Joe Perches To: "Maciej W. Rozycki" Cc: Aleksandar Markovic , linux-mips@linux-mips.org, Dragan Cecavac , Aleksandar Markovic , Douglas Leung , Goran Ferenc , James Hogan , James Hogan , linux-kernel@vger.kernel.org, "Maciej W. Rozycki" , Miodrag Dinic , Paul Burton , Paul Burton , Petar Jovanovic , Raghu Gandham , Ralf Baechle Date: Fri, 20 Oct 2017 14:08:56 -0700 In-Reply-To: References: <1508509203-30661-1-git-send-email-aleksandar.markovic@rt-rk.com> <1508512648.30181.1.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2017-10-20 at 21:52 +0100, Maciej W. Rozycki wrote: > On Fri, 20 Oct 2017, Joe Perches wrote: > > > > diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c > > > index bd9bf52..99f9aab 100644 > > > --- a/arch/mips/kernel/proc.c > > > +++ b/arch/mips/kernel/proc.c > > > @@ -58,7 +58,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) > > > > > > seq_printf(m, "processor\t\t: %ld\n", n); > > > sprintf(fmt, "cpu model\t\t: %%s V%%d.%%d%s\n", > > > - cpu_data[n].options & MIPS_CPU_FPU ? " FPU V%d.%d" : ""); > > > + cpu_data[n].options & MIPS_CPU_FPU ? " FPU V%d.%d" : ""); > > > seq_printf(m, fmt, __cpu_name[n], > > > (version >> 4) & 0x0f, version & 0x0f, > > > (fp_vers >> 4) & 0x0f, fp_vers & 0x0f); > > > > That's somewhat unpleasant code as it formats a fmt string > > and the compiler can not verify fmt and args. > > > > Perhaps something like the below is preferable: > > Hmm, what problem exactly are you trying to solve with code that has > worked just fine for 16 years now? The compiler cannot verify fmt and args.