public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] checkpatch.pl: be silent when -q and --ignore is given
@ 2012-02-22 14:40 Artem Bityutskiy
  0 siblings, 0 replies; only message in thread
From: Artem Bityutskiy @ 2012-02-22 14:40 UTC (permalink / raw)
  To: Andy Whitcroft, Andrew Morton; +Cc: Joe Perches, Linux Kernel Maling List

From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>

This patch fixes checkpatch.pl when both -q and --ignore are given and
prevents it from printing a

NOTE: Ignored message types: blah

messages.

E.g., if I use -q --ignore PREFER_PACKED,PREFER_ALIGNED, i see:

NOTE: Ignored message types: PREFER_ALIGNED PREFER_PACKED

It makes no sense to print this when -q is given.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
---
 scripts/checkpatch.pl |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index a3b9782..6fad217 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3394,13 +3394,12 @@ sub process {
 		}
 	}
 
-	if (keys %ignore_type) {
+	if ($quiet == 0 && keys %ignore_type) {
 	    print "NOTE: Ignored message types:";
 	    foreach my $ignore (sort keys %ignore_type) {
 		print " $ignore";
 	    }
-	    print "\n";
-	    print "\n" if ($quiet == 0);
+	    print "\n\n";
 	}
 
 	if ($clean == 1 && $quiet == 0) {
-- 
1.7.9


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-02-22 14:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-22 14:40 [PATCH] checkpatch.pl: be silent when -q and --ignore is given Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox