浏览代码

checkpatch: emit "NOTE: <types>" message only once after multiple files

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 <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joe Perches 10 年之前
父节点
当前提交
3c816e490c
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      scripts/checkpatch.pl

+ 4 - 4
scripts/checkpatch.pl

@@ -203,7 +203,7 @@ sub hash_save_array_words {
 sub hash_show_words {
 sub hash_show_words {
 	my ($hashRef, $prefix) = @_;
 	my ($hashRef, $prefix) = @_;
 
 
-	if ($quiet == 0 && keys %$hashRef) {
+	if (keys %$hashRef) {
 		print "\nNOTE: $prefix message types:";
 		print "\nNOTE: $prefix message types:";
 		foreach my $word (sort keys %$hashRef) {
 		foreach my $word (sort keys %$hashRef) {
 			print " $word";
 			print " $word";
@@ -770,6 +770,9 @@ for my $filename (@ARGV) {
 }
 }
 
 
 if (!$quiet) {
 if (!$quiet) {
+	hash_show_words(\%use_type, "Used");
+	hash_show_words(\%ignore_type, "Ignored");
+
 	if ($^V lt 5.10.0) {
 	if ($^V lt 5.10.0) {
 		print << "EOM"
 		print << "EOM"
 
 
@@ -5707,9 +5710,6 @@ EOM
 		}
 		}
 	}
 	}
 
 
-	hash_show_words(\%use_type, "Used");
-	hash_show_words(\%ignore_type, "Ignored");
-
 	if ($clean == 0 && $fix &&
 	if ($clean == 0 && $fix &&
 	    ("@rawlines" ne "@fixed" ||
 	    ("@rawlines" ne "@fixed" ||
 	     $#fixed_inserted >= 0 || $#fixed_deleted >= 0)) {
 	     $#fixed_inserted >= 0 || $#fixed_deleted >= 0)) {