diff options
author | Paul Spooren <mail@aparcar.org> | 2020-08-02 15:34:00 -1000 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2020-11-12 18:21:55 +0100 |
commit | 66e87a1f3802a4553423a4fcbb9e6a63f9fd96d2 (patch) | |
tree | 12422ba00f94be9cdd1549e2c395945f1127c332 /scripts | |
parent | 086ee09bbcac4997224b471b95345b143c1318b5 (diff) | |
download | upstream-66e87a1f3802a4553423a4fcbb9e6a63f9fd96d2.tar.gz upstream-66e87a1f3802a4553423a4fcbb9e6a63f9fd96d2.tar.bz2 upstream-66e87a1f3802a4553423a4fcbb9e6a63f9fd96d2.zip |
scripts: checkpatch remove device-tree doc check
Remove checks for device tree documentation as the OpenWrt tree comes
withouth the ./Documentation folder.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/checkpatch.pl | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index e12a244037..9da28baf35 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -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*\//) { |