lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon,  1 Jun 2015 16:25:37 +0200
From:	Petr Mladek <pmladek@...e.cz>
To:	Joe Perches <joe@...ches.com>, Andy Whitcroft <apw@...onical.com>
Cc:	linux-kernel@...r.kernel.org, Petr Mladek <pmladek@...e.cz>
Subject: [PATCH] checkpatch: Make the output better readable

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@...e.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ