提交 58cb3cf6 编写于 作者: J Joe Perches 提交者: Linus Torvalds

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: NJoe Perches <joe@perches.com>
Reported-by: NJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 1b5539b1
......@@ -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";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册