From: Petr Mladek <pmladek@suse.cz>
To: Joe Perches <joe@perches.com>, Andy Whitcroft <apw@canonical.com>
Cc: linux-kernel@vger.kernel.org, Petr Mladek <pmladek@suse.cz>
Subject: [PATCH] checkpatch: Make the output better readable
Date: Mon, 1 Jun 2015 16:25:37 +0200 [thread overview]
Message-ID: <1433168737-17009-1-git-send-email-pmladek@suse.cz> (raw)
I always have troubles to parse checkpatch.pl output when I check
the whole patchset. It is hard to say which messages belongs to
what patch.
This patch does few small changes to make the output look better
for me:
+ delimit each patch from each other with dashes and empty line
+ remove empty line after the summary
+ print message about false positives only once
Output without this patch:
==========================
total: 0 errors, 0 warnings, 133 lines checked
0015-ring_buffer-Use-iterant-kthreads-API-in-the-ring-buf.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 73 lines checked
0016-ring_buffer-Allow-to-cleanly-freeze-the-ring-buffer-.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 25 lines checked
0017-ring_buffer-Allow-to-exit-the-ring-buffer-benchmark-.patch has no obvious style problems and is ready for submission.
ERROR: Missing Signed-off-by: line(s)
total: 1 errors, 0 warnings, 70 lines checked
0018-kthread-Add-support-for-iteruptible-sleep-with-timeo.patch has style problems, please review.
If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
ERROR: Missing Signed-off-by: line(s)
total: 1 errors, 0 warnings, 34 lines checked
0019-kthread-Allow-to-remove-pause-between-threads-in-ite.patch has style problems, please review.
If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
ERROR: Missing Signed-off-by: line(s)
total: 1 errors, 0 warnings, 12 lines checked
0020-ring_buffer-Use-the-new-API-for-timeouted-sleep-in-t.patch has style problems, please review.
If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
ERROR: Missing Signed-off-by: line(s)
total: 1 errors, 0 warnings, 37 lines checked
0021-jffs2-debug-messages.patch has style problems, please review.
If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
ERROR: Missing Signed-off-by: line(s)
total: 1 errors, 0 warnings, 28 lines checked
0022-test-messages-in-ring_buffer_benchmnark.patch has style problems, please review.
If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
ERROR: Missing Signed-off-by: line(s)
total: 1 errors, 0 warnings, 7 lines checked
0023-debug-messages-in-lockd.patch has style problems, please review.
If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
Output with this patch:
=======================
total: 0 errors, 0 warnings, 133 lines checked
0015-ring_buffer-Use-iterant-kthreads-API-in-the-ring-buf.patch has no obvious style problems and is ready for submission.
--------------------------------------------------------------------------------
total: 0 errors, 0 warnings, 73 lines checked
0016-ring_buffer-Allow-to-cleanly-freeze-the-ring-buffer-.patch has no obvious style problems and is ready for submission.
--------------------------------------------------------------------------------
total: 0 errors, 0 warnings, 25 lines checked
0017-ring_buffer-Allow-to-exit-the-ring-buffer-benchmark-.patch has no obvious style problems and is ready for submission.
--------------------------------------------------------------------------------
ERROR: Missing Signed-off-by: line(s)
total: 1 errors, 0 warnings, 70 lines checked
0018-kthread-Add-support-for-iteruptible-sleep-with-timeo.patch has style problems, please review.
--------------------------------------------------------------------------------
ERROR: Missing Signed-off-by: line(s)
total: 1 errors, 0 warnings, 34 lines checked
0019-kthread-Allow-to-remove-pause-between-threads-in-ite.patch has style problems, please review.
--------------------------------------------------------------------------------
ERROR: Missing Signed-off-by: line(s)
total: 1 errors, 0 warnings, 12 lines checked
0020-ring_buffer-Use-the-new-API-for-timeouted-sleep-in-t.patch has style problems, please review.
--------------------------------------------------------------------------------
ERROR: Missing Signed-off-by: line(s)
total: 1 errors, 0 warnings, 37 lines checked
0021-jffs2-debug-messages.patch has style problems, please review.
--------------------------------------------------------------------------------
ERROR: Missing Signed-off-by: line(s)
total: 1 errors, 0 warnings, 28 lines checked
0022-test-messages-in-ring_buffer_benchmnark.patch has style problems, please review.
--------------------------------------------------------------------------------
ERROR: Missing Signed-off-by: line(s)
total: 1 errors, 0 warnings, 7 lines checked
0023-debug-messages-in-lockd.patch has style problems, please review.
If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
Signed-off-by: Petr Mladek <pmladek@suse.cz>
---
scripts/checkpatch.pl | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index c8032a01d7cf..7022138b14cb 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -720,8 +720,14 @@ my @fixed_deleted = ();
my $fixlinenr = -1;
my $vname;
+my $filenum = 0;
for my $filename (@ARGV) {
my $FILE;
+
+ if ($filenum++ && $quiet == 0) {
+ print "--------------------------------------------------------------------------------\n";
+ print "\n";
+ }
if ($file) {
open($FILE, '-|', "diff -u /dev/null $filename") ||
die "$P: $filename: diff failed - $!\n";
@@ -755,6 +761,14 @@ for my $filename (@ARGV) {
build_types();
}
+if ($exit && $quiet == 0) {
+ print << "EOM";
+
+If any of the errors are false positives, please report
+them to the maintainer, see CHECKPATCH in MAINTAINERS.
+EOM
+}
+
exit($exit);
sub top_of_kernel_tree {
@@ -5578,7 +5592,6 @@ sub process {
print "total: $cnt_error errors, $cnt_warn warnings, " .
(($check)? "$cnt_chk checks, " : "") .
"$cnt_lines lines checked\n";
- print "\n" if ($quiet == 0);
}
if ($quiet == 0) {
@@ -5643,12 +5656,7 @@ EOM
print "$vname has no obvious style problems and is ready for submission.\n"
}
if ($clean == 0 && $quiet == 0) {
- print << "EOM";
-$vname has style problems, please review.
-
-If any of these errors are false positives, please report
-them to the maintainer, see CHECKPATCH in MAINTAINERS.
-EOM
+ print "$vname has style problems, please review.\n"
}
return $clean;
--
1.8.5.6
next reply other threads:[~2015-06-01 14:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-01 14:25 Petr Mladek [this message]
2015-06-01 15:50 ` Joe Perches
2015-06-02 9:13 ` Petr Mladek
2015-06-02 9:52 ` Joe Perches
2015-06-02 10:44 ` Petr Mladek
2015-06-02 20:49 ` Joe Perches
2015-06-01 18:02 ` Joe Perches
[not found] ` <CA+r1ZhjhF-n4Q2kfiV6mx1aUqbZNycNTJBkTgLTq9KivsawvdA@mail.gmail.com>
2015-06-01 18:22 ` Joe Perches
2015-06-02 9:26 ` Petr Mladek
2015-06-02 9:54 ` Joe Perches
2015-06-02 10:53 ` Rasmus Villemoes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1433168737-17009-1-git-send-email-pmladek@suse.cz \
--to=pmladek@suse.cz \
--cc=apw@canonical.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®