public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] checkpatch: simplify the output of --list-types
Date: Mon, 4 Sep 2017 10:08:24 +0200	[thread overview]
Message-ID: <20170904100824.4cc2410a@endymion> (raw)

Drop the header and numbering of types. This format was confusing as
it suggested one could pass the number instead of the type name,
however it did not actually work, and numbering wasn't stable anyway.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
---
 scripts/checkpatch.pl |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- linux-4.13-rc7.orig/scripts/checkpatch.pl	2017-09-04 08:51:13.234841824 +0200
+++ linux-4.13-rc7/scripts/checkpatch.pl	2017-09-04 10:07:11.994427535 +0200
@@ -134,8 +134,6 @@ sub uniq {
 sub list_types {
 	my ($exitcode) = @_;
 
-	my $count = 0;
-
 	local $/ = undef;
 
 	open(my $script, '<', abs_path($P)) or
@@ -150,9 +148,8 @@ sub list_types {
 		push (@types, $_);
 	}
 	@types = sort(uniq(@types));
-	print("#\tMessage type\n\n");
 	foreach my $type (@types) {
-		print(++$count . "\t" . $type . "\n");
+		print "$type\n";
 	}
 
 	exit($exitcode);

-- 
Jean Delvare
SUSE L3 Support

             reply	other threads:[~2017-09-04  8:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-04  8:08 Jean Delvare [this message]
2017-09-04 15:48 ` [PATCH] checkpatch: simplify the output of --list-types Joe Perches
2017-09-05  9:37   ` Jean Delvare

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=20170904100824.4cc2410a@endymion \
    --to=jdelvare@suse.de \
    --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