mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-16 17:23:55 +08:00
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>
This commit is contained in:
parent
fe658f94b2
commit
ca8198640f
@ -3219,7 +3219,7 @@ sub process {
|
||||
my ($stat, $cond, $line_nr_next, $remain_next, $off_next,
|
||||
$realline_next);
|
||||
#print "LINE<$line>\n";
|
||||
if ($linenr >= $suppress_statement &&
|
||||
if ($linenr > $suppress_statement &&
|
||||
$realcnt && $sline =~ /.\s*\S/) {
|
||||
($stat, $cond, $line_nr_next, $remain_next, $off_next) =
|
||||
ctx_statement_block($linenr, $realcnt, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user