kernel: bump 6.1 to 6.1.89
[openwrt/openwrt.git] / scripts / checkpatch.pl
index e12a244037bfbc9533e584766d662ffdde1b3402..2adc5efec5e6bf1061d6b9133eca2111b0e1dec6 100755 (executable)
@@ -1113,7 +1113,7 @@ sub top_of_openwrt_tree {
        my ($root) = @_;
 
        my @tree_check = (
-               "BSDmakefile", "Config.in", "LICENSE", "Makefile", "README.md",
+               "BSDmakefile", "Config.in", "LICENSES", "Makefile", "README.md",
                "feeds.conf.default", "include", "package", "rules.mk",
                "scripts", "target", "toolchain", "tools"
        );
@@ -2355,7 +2355,7 @@ sub process {
        my $commit_log_possible_stack_dump = 0;
        my $commit_log_long_line = 0;
        my $commit_log_has_diff = 0;
-       my $reported_maintainer_file = 0;
+       my $reported_maintainer_file = 1;
        my $non_utf8_charset = 0;
 
        my $last_blank_line = 0;
@@ -2585,14 +2585,6 @@ sub process {
 
                        if ($realfile !~ /^MAINTAINERS/) {
                                my $last_binding_patch = $is_binding_patch;
-
-                               $is_binding_patch = () = $realfile =~ m@^(?:Documentation/devicetree/|include/dt-bindings/)@;
-
-                               if (($last_binding_patch != -1) &&
-                                   ($last_binding_patch ^ $is_binding_patch)) {
-                                       WARN("DT_SPLIT_BINDING_PATCH",
-                                            "DT binding docs and includes should be a separate patch. See: Documentation/devicetree/bindings/submitting-patches.rst\n");
-                               }
                        }
 
                        next;
@@ -2873,14 +2865,6 @@ sub process {
                             "added, moved or deleted file(s), does MAINTAINERS need updating?\n" . $herecurr);
                }
 
-# Check for adding new DT bindings not in schema format
-               if (!$in_commit_log &&
-                   ($line =~ /^new file mode\s*\d+\s*$/) &&
-                   ($realfile =~ m@^Documentation/devicetree/bindings/.*\.txt$@)) {
-                       WARN("DT_SCHEMA_BINDING_PATCH",
-                            "DT bindings should be in DT schema format. See: Documentation/devicetree/writing-schema.rst\n");
-               }
-
 # Check for wrappage within a valid hunk of the file
                if ($realcnt != 0 && $line !~ m{^(?:\+|-| |\\ No newline|$)}) {
                        ERROR("CORRUPTED_PATCH",
@@ -3118,37 +3102,6 @@ sub process {
                             "Use of $flag is deprecated, please use \`$replacement->{$flag} instead.\n" . $herecurr) if ($replacement->{$flag});
                }
 
-# check for DT compatible documentation
-               if (defined $root &&
-                       (($realfile =~ /\.dtsi?$/ && $line =~ /^\+\s*compatible\s*=\s*\"/) ||
-                        ($realfile =~ /\.[ch]$/ && $line =~ /^\+.*\.compatible\s*=\s*\"/))) {
-
-                       my @compats = $rawline =~ /\"([a-zA-Z0-9\-\,\.\+_]+)\"/g;
-
-                       my $dt_path = $root . "/Documentation/devicetree/bindings/";
-                       my $vp_file = $dt_path . "vendor-prefixes.yaml";
-
-                       foreach my $compat (@compats) {
-                               my $compat2 = $compat;
-                               $compat2 =~ s/\,[a-zA-Z0-9]*\-/\,<\.\*>\-/;
-                               my $compat3 = $compat;
-                               $compat3 =~ s/\,([a-z]*)[0-9]*\-/\,$1<\.\*>\-/;
-                               `grep -Erq "$compat|$compat2|$compat3" $dt_path`;
-                               if ( $? >> 8 ) {
-                                       WARN("UNDOCUMENTED_DT_STRING",
-                                            "DT compatible string \"$compat\" appears un-documented -- check $dt_path\n" . $herecurr);
-                               }
-
-                               next if $compat !~ /^([a-zA-Z0-9\-]+)\,/;
-                               my $vendor = $1;
-                               `grep -Eq "\\"\\^\Q$vendor\E,\\.\\*\\":" $vp_file`;
-                               if ( $? >> 8 ) {
-                                       WARN("UNDOCUMENTED_DT_STRING",
-                                            "DT compatible string vendor \"$vendor\" appears un-documented -- check $vp_file\n" . $herecurr);
-                               }
-                       }
-               }
-
 # check for using SPDX license tag at beginning of files
                if ($realline == $checklicenseline) {
                        if ($rawline =~ /^[ \+]\s*\#\!\s*\//) {
@@ -4744,7 +4697,7 @@ sub process {
 ##                 $line !~ /^.\s*$Type\s+$Ident(?:\s*=[^,{]*)?\s*,\s*$Type\s*$Ident.*/) {
 ##
 ##                     # Remove any bracketed sections to ensure we do not
-##                     # falsly report the parameters of functions.
+##                     # falsely report the parameters of functions.
 ##                     my $ln = $line;
 ##                     while ($ln =~ s/\([^\(\)]*\)//g) {
 ##                     }