checkpatch: add 6 missing types to --list-types
[sfrench/cifs-2.6.git] / scripts / checkpatch.pl
index b3a1bc70d9ee61cdc3fb625be226a712bb570e2e..dd2c262aebbf2a43283f38badcf445702c59c9e9 100755 (executable)
@@ -145,7 +145,8 @@ sub list_types {
        close($script);
 
        my @types = ();
-       for ($text =~ /\b(?:(?:CHK|WARN|ERROR)\s*\(\s*"([^"]+)")/g) {
+       # Also catch when type or level is passed through a variable
+       for ($text =~ /(?:(?:\bCHK|\bWARN|\bERROR|&\{\$msg_level})\s*\(|\$msg_type\s*=)\s*"([^"]+)"/g) {
                push (@types, $_);
        }
        @types = sort(uniq(@types));