mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-16 22:10:24 +00:00
checkpatch: fix 'return is not a function' square bracket handling
We are incorrectly matching square brackets '[' and ']' leading to false positives on more complex functions as below: return (dt3155_fbuffer[m]->ready_head - dt3155_fbuffer[m]->ready_len + dt3155_fbuffer[m]->nbuffers)% (dt3155_fbuffer[m]->nbuffers); Signed-off-by: Andy Whitcroft <apw@canonical.com> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
72f115f94d
commit
e01886ada2
@ -2609,7 +2609,7 @@ sub process {
|
||||
# Flatten any parentheses
|
||||
$value =~ s/\(/ \(/g;
|
||||
$value =~ s/\)/\) /g;
|
||||
while ($value =~ s/\[[^\{\}]*\]/1/ ||
|
||||
while ($value =~ s/\[[^\[\]]*\]/1/ ||
|
||||
$value !~ /(?:$Ident|-?$Constant)\s*
|
||||
$Compare\s*
|
||||
(?:$Ident|-?$Constant)/x &&
|
||||
|
Loading…
Reference in New Issue
Block a user