diff options
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-x | scripts/checkpatch.pl | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 077a2ca33043..53ec3946670d 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -168,12 +168,11 @@ our @modifierList = ( | |||
168 | ); | 168 | ); |
169 | 169 | ||
170 | sub build_types { | 170 | sub build_types { |
171 | my $mods = "(?: \n" . join("|\n ", @modifierList) . "\n)"; | 171 | my $mods = "(?x: \n" . join("|\n ", @modifierList) . "\n)"; |
172 | my $all = "(?: \n" . join("|\n ", @typeList) . "\n)"; | 172 | my $all = "(?x: \n" . join("|\n ", @typeList) . "\n)"; |
173 | $Modifier = qr{(?:$Attribute|$Sparse|$mods)}; | 173 | $Modifier = qr{(?:$Attribute|$Sparse|$mods)}; |
174 | $NonptrType = qr{ | 174 | $NonptrType = qr{ |
175 | (?:const\s+)? | 175 | (?:$Modifier\s+|const\s+)* |
176 | (?:$mods\s+)? | ||
177 | (?: | 176 | (?: |
178 | (?:typeof|__typeof__)\s*\(\s*\**\s*$Ident\s*\)| | 177 | (?:typeof|__typeof__)\s*\(\s*\**\s*$Ident\s*\)| |
179 | (?:${all}\b) | 178 | (?:${all}\b) |