]> git.proxmox.com Git - mirror_qemu.git/blobdiff - scripts/checkpatch.pl
checkpatch: do not warn for multiline parenthesized returned value
[mirror_qemu.git] / scripts / checkpatch.pl
index c2aaf421da32c3b8405e638666e8cba18745dbad..2f81371ffb0fa9b03549e1aeb8e2b14ea37ab1be 100755 (executable)
@@ -2296,7 +2296,8 @@ sub process {
                               $value =~ s/\([^\(\)]*\)/1/) {
                        }
 #print "value<$value>\n";
-                       if ($value =~ /^\s*(?:$Ident|-?$Constant)\s*$/) {
+                       if ($value =~ /^\s*(?:$Ident|-?$Constant)\s*$/ &&
+                           $line =~ /;$/) {
                                ERROR("return is not a function, parentheses are not required\n" . $herecurr);
 
                        } elsif ($spacing !~ /\s+/) {