From: Andy Whitcroft Date: Thu, 16 Oct 2008 05:02:35 +0000 (-0700) Subject: checkpatch: suspect indent handle macro continuation X-Git-Tag: v2.6.28-rc1~463 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=740504c61f79a932564fb7117d79ad53d950b201;p=linux-2.6-omap-h63xx.git checkpatch: suspect indent handle macro continuation When ignoring a macro in the middle of a conditional, we need to ignore the macro start and any continuation lines. Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 2c1afba5758..862e8e0e86a 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1465,6 +1465,7 @@ sub process { } my $cond_ptr = -1; + $continuation = 0; while ($cond_ptr != $cond_lines) { $cond_ptr = $cond_lines; @@ -1478,9 +1479,11 @@ sub process { # 1) blank lines, they should be at 0, # 2) preprocessor lines, and # 3) labels. - if ($s =~ /^\s*?\n/ || + if ($continuation || + $s =~ /^\s*?\n/ || $s =~ /^\s*#\s*?/ || $s =~ /^\s*$Ident\s*:/) { + $continuation = ($s =~ /^.*?\\\n/) ? 1 : 0; $s =~ s/^.*?\n//; $cond_lines++; }