summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-07-30 14:41:16 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-30 17:25:17 -0700
commitb34a26f3158cca932b6f1427b97fe12c7838ee68 (patch)
treee1c5e08259b56d444f6797c8e3e7b88cd4df64d5 /scripts
parent4ed940d4c34c21a1a356969a923f2815d608e0bf (diff)
downloadlinux-3.10-b34a26f3158cca932b6f1427b97fe12c7838ee68.tar.gz
linux-3.10-b34a26f3158cca932b6f1427b97fe12c7838ee68.tar.bz2
linux-3.10-b34a26f3158cca932b6f1427b97fe12c7838ee68.zip
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 <joe@perches.com> Cc: Andy Whitcroft <apw@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl4
1 files changed, 2 insertions, 2 deletions
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) .