From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932849AbdAIWQ2 (ORCPT ); Mon, 9 Jan 2017 17:16:28 -0500 Received: from smtprelay0242.hostedemail.com ([216.40.44.242]:40336 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932080AbdAIWQW (ORCPT ); Mon, 9 Jan 2017 17:16:22 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::,RULES_HIT:41:355:379:541:599:800:960:968:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1431:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3872:3874:4321:4605:5007:7514:8604:9393:10004:10400:10848:11232:11658:11914:12043:12740:12760:12895:13069:13161:13229:13311:13357:13439:14181:14659:14721:21080:21451:30054:30056:30070:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:3,LUA_SUMMARY:none X-HE-Tag: bait74_1a357d0a6df3e X-Filterd-Recvd-Size: 2038 Message-ID: <1484000178.2106.23.camel@perches.com> Subject: Re: [PATCH] checkpatch.pl: warn against using %Z From: Joe Perches To: Alexey Dobriyan , Andrew Morton Cc: linux-kernel@vger.kernel.org, apw@canonical.com Date: Mon, 09 Jan 2017 14:16:18 -0800 In-Reply-To: <20170109235955.GA6787@avx2> References: <20170103230126.GA30170@avx2> <20170105160748.1f3696c51cd4e56de132243d@linux-foundation.org> <20170109235955.GA6787@avx2> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.3-0ubuntu0.1 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 Tue, 2017-01-10 at 02:59 +0300, Alexey Dobriyan wrote: > %Z is going to be removed in favour of %z. > > Signed-off-by: Alexey Dobriyan > --- > > scripts/checkpatch.pl | 6 ++++++ > 1 file changed, 6 insertions(+) > > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -5189,6 +5189,12 @@ sub process { > "\%Ld/%Lu are not-standard C, use %lld/%llu\n" . $herecurr); > last; > } > + # check for %Z > + if ($string =~ /(? + WARN("PRINTF_Z", > + "%Z is non-standard C, use %z\n" . $herecurr); > + last; > + } > if ($string =~ /0x%[\*\d\.\$\Llzth]*[udi]/) { > ERROR("PRINTF_0xDECIMAL", > "Prefixing 0x with decimal output is defective\n" . $herecurr); Right concept, slightly incorrect implementation. diouxX isn't necessary, ?