Skip to content

Commit

Permalink
checkpatch: fix perl version 5.12 and earlier incompatibility
Browse files Browse the repository at this point in the history
A previous patch ("checkpatch: add --types option to report only
specific message types") uses a perl syntax introduced in perl version
5.14.

Use the backward compatible perl syntax instead.

Signed-off-by: Joe Perches <[email protected]>
Reported-by: Julia Lawall <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
JoePerches authored and torvalds committed Sep 11, 2013
1 parent 1b5539b commit 58cb3cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ sub hash_save_array_words {
sub hash_show_words {
my ($hashRef, $prefix) = @_;

if ($quiet == 0 && keys $hashRef) {
if ($quiet == 0 && keys %$hashRef) {
print "NOTE: $prefix message types:";
foreach my $word (sort keys $hashRef) {
foreach my $word (sort keys %$hashRef) {
print " $word";
}
print "\n\n";
Expand Down

0 comments on commit 58cb3cf

Please sign in to comment.