]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - scripts/checkpatch.pl
checkpatch: allow parentheses on return handle array values
[linux-2.6-omap-h63xx.git] / scripts / checkpatch.pl
index 1d7924ad3a34898d49a0087c61cc0bd8672fca7c..696196e194f5320a176afe140fd9b871df919bc9 100755 (executable)
@@ -2016,7 +2016,11 @@ sub process {
 
                        # Flatten any parentheses
                        $value =~ s/\)\(/\) \(/g;
-                       while ($value !~ /(?:$Ident|-?$Constant)\s*$Compare\s*(?:$Ident|-?$Constant)/ && $value =~ s/\([^\(\)]*\)/1/) {
+                       while ($value =~ s/\[[^\{\}]*\]/1/ ||
+                              $value !~ /(?:$Ident|-?$Constant)\s*
+                                            $Compare\s*
+                                            (?:$Ident|-?$Constant)/x &&
+                              $value =~ s/\([^\(\)]*\)/1/) {
                        }
 
                        if ($value =~ /^(?:$Ident|-?$Constant)$/) {