aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2017-07-10 18:52:13 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-10 19:32:35 -0400
commitca8198640fa9aeea71ae61b02fee6ee5e097f243 (patch)
tree3d3390aa3c2784989d7b1165743a29af122e157e
parentfe658f94b2c911729afbffeeb1f5f03f0a26d9e6 (diff)
checkpatch: fix stepping through statements with $stat and ctx_statement_block
Fix the off-by-one in the suppression of lines in a statement block. This means that for multiple line statements like foo(bar, baz, qux); $stat has been inspected first correctly for the entire statement, and subsequently incorrectly just for qux); This fix will help make tracking appropriate indentation a little easier. Link: http://lkml.kernel.org/r/71b25979c90412133c717084036c9851cd2b7bcb.1496862585.git.joe@perches.com Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rwxr-xr-xscripts/checkpatch.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index bc2417711b6a..2f61f54b8940 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3219,7 +3219,7 @@ sub process {
3219 my ($stat, $cond, $line_nr_next, $remain_next, $off_next, 3219 my ($stat, $cond, $line_nr_next, $remain_next, $off_next,
3220 $realline_next); 3220 $realline_next);
3221#print "LINE<$line>\n"; 3221#print "LINE<$line>\n";
3222 if ($linenr >= $suppress_statement && 3222 if ($linenr > $suppress_statement &&
3223 $realcnt && $sline =~ /.\s*\S/) { 3223 $realcnt && $sline =~ /.\s*\S/) {
3224 ($stat, $cond, $line_nr_next, $remain_next, $off_next) = 3224 ($stat, $cond, $line_nr_next, $remain_next, $off_next) =
3225 ctx_statement_block($linenr, $realcnt, 0); 3225 ctx_statement_block($linenr, $realcnt, 0);