]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - scripts/checkpatch.pl
checkpatch: change CamelCase test and make it --strict
[karo-tx-linux.git] / scripts / checkpatch.pl
index b954de58304fc7387d947ac7c6d06374009536a4..f1aad19b475ceda7a2656d55adb169b572e3a0a2 100755 (executable)
@@ -2938,12 +2938,12 @@ sub process {
                while ($line =~ m{($Constant|$Lval)}g) {
                        my $var = $1;
                        if ($var !~ /$Constant/ &&
-                           $var =~ /[A-Z]\w*[a-z]|[a-z]\w*[A-Z]/ &&
+                           $var =~ /[A-Z][a-z]|[a-z][A-Z]/ &&
                            $var !~ /"^(?:Clear|Set|TestClear|TestSet|)Page[A-Z]/ &&
                            !defined $camelcase{$var}) {
                                $camelcase{$var} = 1;
-                               WARN("CAMELCASE",
-                                    "Avoid CamelCase: <$var>\n" . $herecurr);
+                               CHK("CAMELCASE",
+                                   "Avoid CamelCase: <$var>\n" . $herecurr);
                        }
                }