Commit fee61c47 authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Linus Torvalds

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: default avatarAndy Whitcroft <apw@shadowen.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6cbb2e71
...@@ -1670,6 +1670,7 @@ sub process { ...@@ -1670,6 +1670,7 @@ sub process {
my $value = $2; my $value = $2;
# Flatten any parentheses and braces # Flatten any parentheses and braces
$value =~ s/\)\(/\) \(/g;
while ($value =~ s/\([^\(\)]*\)/1/) { while ($value =~ s/\([^\(\)]*\)/1/) {
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment