aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 1d7924ad3a34..696196e194f5 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2016,7 +2016,11 @@ sub process {
2016 2016
2017 # Flatten any parentheses 2017 # Flatten any parentheses
2018 $value =~ s/\)\(/\) \(/g; 2018 $value =~ s/\)\(/\) \(/g;
2019 while ($value !~ /(?:$Ident|-?$Constant)\s*$Compare\s*(?:$Ident|-?$Constant)/ && $value =~ s/\([^\(\)]*\)/1/) { 2019 while ($value =~ s/\[[^\{\}]*\]/1/ ||
2020 $value !~ /(?:$Ident|-?$Constant)\s*
2021 $Compare\s*
2022 (?:$Ident|-?$Constant)/x &&
2023 $value =~ s/\([^\(\)]*\)/1/) {
2020 } 2024 }
2021 2025
2022 if ($value =~ /^(?:$Ident|-?$Constant)$/) { 2026 if ($value =~ /^(?:$Ident|-?$Constant)$/) {