aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@canonical.com>2009-10-26 16:50:13 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-10-29 07:39:31 -0700
commitcc77cdca5209c1199deb33f3a83df191ac32f4d6 (patch)
tree23a1149ca4268d0e743b8e847d83fbda3f929067 /scripts
parent9a974fdbe3fbb4b0f6d552579dc79ac237412c61 (diff)
downloadmrst-s0i3-test-cc77cdca5209c1199deb33f3a83df191ac32f4d6.tar.gz
mrst-s0i3-test-cc77cdca5209c1199deb33f3a83df191ac32f4d6.tar.xz
mrst-s0i3-test-cc77cdca5209c1199deb33f3a83df191ac32f4d6.zip
checkpatch: correctly stop scanning at the bottom of a hunk
We are allowing context scanning checks to apply against the first line of context outside at the end of the hunk. This can lead to false matches to patch names leading to various perl warnings. Correctly stop at the bottom of the hunk. Signed-off-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index b43e309c38f..1eca1e14358 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1234,7 +1234,6 @@ sub process {
$linenr++;
my $rawline = $rawlines[$linenr - 1];
- my $hunk_line = ($realcnt != 0);
#extract the line range in the file after the patch is applied
if ($line=~/^\@\@ -\d+(?:,\d+)? \+(\d+)(,(\d+))? \@\@/) {
@@ -1274,6 +1273,8 @@ sub process {
$realcnt--;
}
+ my $hunk_line = ($realcnt != 0);
+
#make up the handle for any error we report on this line
$prefix = "$filename:$realline: " if ($emacs && $file);
$prefix = "$filename:$linenr: " if ($emacs && !$file);