From: Andy Whitcroft Date: Thu, 24 Jul 2008 04:28:56 +0000 (-0700) Subject: checkpatch: return is not a function -- parentheses for casts are ok too X-Git-Tag: v2.6.27-rc1~717 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=fee61c47d15270bdea699a8a3dd867f0825c3541;p=~shefty%2Frdma-dev.git 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 66f060ecb81..83ae37b3862 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1670,6 +1670,7 @@ sub process { my $value = $2; # Flatten any parentheses and braces + $value =~ s/\)\(/\) \(/g; while ($value =~ s/\([^\(\)]*\)/1/) { }