diff options
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-x | scripts/checkpatch.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index b3a1bc70d9ee..dd2c262aebbf 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -145,7 +145,8 @@ sub list_types { | |||
145 | close($script); | 145 | close($script); |
146 | 146 | ||
147 | my @types = (); | 147 | my @types = (); |
148 | for ($text =~ /\b(?:(?:CHK|WARN|ERROR)\s*\(\s*"([^"]+)")/g) { | 148 | # Also catch when type or level is passed through a variable |
149 | for ($text =~ /(?:(?:\bCHK|\bWARN|\bERROR|&\{\$msg_level})\s*\(|\$msg_type\s*=)\s*"([^"]+)"/g) { | ||
149 | push (@types, $_); | 150 | push (@types, $_); |
150 | } | 151 | } |
151 | @types = sort(uniq(@types)); | 152 | @types = sort(uniq(@types)); |