From: Joe Perches Date: Wed, 11 Sep 2013 21:24:04 +0000 (-0700) Subject: checkpatch: fix perl version 5.12 and earlier incompatibility X-Git-Tag: MMI-PSA29.97-13-9~13647^2~108 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=58cb3cf66cc6330910316abb1dc7a7aa78917a27;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git checkpatch: fix perl version 5.12 and earlier incompatibility 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 Reported-by: Julia Lawall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 55277a8e1527..9ba4fc44112a 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -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";