aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 2c1afba57580..862e8e0e86ae 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1465,6 +1465,7 @@ sub process {
1465 } 1465 }
1466 1466
1467 my $cond_ptr = -1; 1467 my $cond_ptr = -1;
1468 $continuation = 0;
1468 while ($cond_ptr != $cond_lines) { 1469 while ($cond_ptr != $cond_lines) {
1469 $cond_ptr = $cond_lines; 1470 $cond_ptr = $cond_lines;
1470 1471
@@ -1478,9 +1479,11 @@ sub process {
1478 # 1) blank lines, they should be at 0, 1479 # 1) blank lines, they should be at 0,
1479 # 2) preprocessor lines, and 1480 # 2) preprocessor lines, and
1480 # 3) labels. 1481 # 3) labels.
1481 if ($s =~ /^\s*?\n/ || 1482 if ($continuation ||
1483 $s =~ /^\s*?\n/ ||
1482 $s =~ /^\s*#\s*?/ || 1484 $s =~ /^\s*#\s*?/ ||
1483 $s =~ /^\s*$Ident\s*:/) { 1485 $s =~ /^\s*$Ident\s*:/) {
1486 $continuation = ($s =~ /^.*?\\\n/) ? 1 : 0;
1484 $s =~ s/^.*?\n//; 1487 $s =~ s/^.*?\n//;
1485 $cond_lines++; 1488 $cond_lines++;
1486 } 1489 }