From: Joe Perches Date: Mon, 30 Jul 2012 21:41:16 +0000 (-0700) Subject: checkpatch: Update alignment check X-Git-Tag: v3.6-rc1~41^2~61 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b34a26f3158cca932b6f1427b97fe12c7838ee68;p=profile%2Fivi%2Fkernel-x86-ivi.git checkpatch: Update alignment check Parenthesis alignment doesn't correctly check an existing line after an inserted or modified line with an open parenthesis. Fix it. Signed-off-by: Joe Perches Cc: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index e5bd60ff48e..630319acb82 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1848,8 +1848,8 @@ sub process { my $pos = pos_last_openparen($rest); if ($pos >= 0) { - $line =~ /^\+([ \t]*)/; - my $newindent = $1; + $line =~ /^(\+| )([ \t]*)/; + my $newindent = $2; my $goodtabindent = $oldindent . "\t" x ($pos / 8) .