From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753352AbdIDIIa (ORCPT ); Mon, 4 Sep 2017 04:08:30 -0400 Received: from mx2.suse.de ([195.135.220.15]:50308 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753271AbdIDII2 (ORCPT ); Mon, 4 Sep 2017 04:08:28 -0400 Date: Mon, 4 Sep 2017 10:08:24 +0200 From: Jean Delvare To: Andy Whitcroft , Joe Perches Cc: LKML Subject: [PATCH] checkpatch: simplify the output of --list-types Message-ID: <20170904100824.4cc2410a@endymion> Organization: SUSE Linux X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: Andy Whitcroft Cc: Joe Perches --- 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