lkml.org 
[lkml]   [2017]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] checkpatch: simplify the output of --list-types
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

\
 
 \ /
  Last update: 2017-09-04 10:09    [W:0.051 / U:1.372 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site