aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@shadowen.org>2008-07-24 00:28:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 13:47:25 -0400
commitfee61c47d15270bdea699a8a3dd867f0825c3541 (patch)
tree75402264c753a2a6bf5c198922fbbf571d990423 /scripts
parent6cbb2e711128b505209f7c910018aac77335c887 (diff)
checkpatch: return is not a function -- parentheses for casts are ok too
Casts require parentheses so it is possible to have something like this: return (int)(*a); This miss trips the complexity function. Ensure that the two separate parenthesised sections are not coelesced. Signed-off-by: Andy Whitcroft <apw@shadowen.org> 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.pl1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 66f060ecb81f..83ae37b38621 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1670,6 +1670,7 @@ sub process {
1670 my $value = $2; 1670 my $value = $2;
1671 1671
1672 # Flatten any parentheses and braces 1672 # Flatten any parentheses and braces
1673 $value =~ s/\)\(/\) \(/g;
1673 while ($value =~ s/\([^\(\)]*\)/1/) { 1674 while ($value =~ s/\([^\(\)]*\)/1/) {
1674 } 1675 }
1675 1676