diff --git a/[refs] b/[refs] index da29a96b7e1e..4506171ff96f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2a1bc5d5c5096f2dfb6f8b18f39ecb718f101535 +refs/heads/master: f055663c5853aa1d9f4c86351a4637462a0b9041 diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index c7980ff2975e..36825c3d7d79 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -2214,10 +2214,10 @@ sub process { } if ($level == 0 && $block =~ /^\s*\{/ && !$allowed) { my $herectx = $here . "\n";; - my $end = $linenr + statement_rawlines($block) - 1; + my $cnt = statement_rawlines($block); - for (my $ln = $linenr - 1; $ln < $end; $ln++) { - $herectx .= $rawlines[$ln] . "\n";; + for (my $n = 0; $n < $cnt; $n++) { + $herectx .= raw_line($linenr, $n) . "\n";; } WARN("braces {} are not necessary for single statement blocks\n" . $herectx);