From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757114AbbFQRIs (ORCPT ); Wed, 17 Jun 2015 13:08:48 -0400 Received: from smtprelay0062.hostedemail.com ([216.40.44.62]:43514 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755613AbbFQRIk (ORCPT ); Wed, 17 Jun 2015 13:08:40 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::,RULES_HIT:41:355:379:541:800:960:973:982:983:988:989:1208:1260:1277:1311:1313:1314:1345:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3653:3865:3866:3867:3868:3872:4321:5007:6261:7903:9592:10004:10400:10848:11026:11658:11914:12043:12438:12517:12519:12555:13069:13095:13311:13357:14394:21080,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 X-HE-Tag: queen55_859729726f609 X-Filterd-Recvd-Size: 1895 Message-ID: <1434560917.2689.75.camel@perches.com> Subject: [PATCH] checkpatch: Emit "NOTE: " message only once after multiple files From: Joe Perches To: Andrew Morton Cc: Andy Whitcroft , LKML Date: Wed, 17 Jun 2015 10:08:37 -0700 Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.11-0ubuntu3 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 Make this message similar to the "false positives" message and emit it only once when scanning multiple files instead of after each file scanned. Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 69c4716..cb896a5 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -203,7 +203,7 @@ sub hash_save_array_words { sub hash_show_words { my ($hashRef, $prefix) = @_; - if ($quiet == 0 && keys %$hashRef) { + if (keys %$hashRef) { print "\nNOTE: $prefix message types:"; foreach my $word (sort keys %$hashRef) { print " $word"; @@ -770,6 +770,9 @@ for my $filename (@ARGV) { } if (!$quiet) { + hash_show_words(\%use_type, "Used"); + hash_show_words(\%ignore_type, "Ignored"); + if ($^V lt 5.10.0) { print << "EOM" @@ -5644,9 +5647,6 @@ EOM } } - hash_show_words(\%use_type, "Used"); - hash_show_words(\%ignore_type, "Ignored"); - if ($clean == 0 && $fix && ("@rawlines" ne "@fixed" || $#fixed_inserted >= 0 || $#fixed_deleted >= 0)) {