checkpatch: add .dtso to DT compatible string vendor check
PATCH 1/1 checkpatch: add .dtso to DT compatible string vendor check
From: Vitor Soares <[email protected]>
Extend the DT compatible documentation check to match .dtso files so that vendor-prefixed compatibles in overlay files trigger the UNDOCUMENTED_DT_STRING warning when the vendor is absent from vendor-prefixes.yaml.
Assisted-by Claude:claude-sonnet-4.6
Signed-off-by Vitor Soares <[email protected]>
--- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/checkpatch.pl +1 -1
@@ -3774,7 +3774,7 @@ sub process { # check for DT compatible documentation if (defined $root && - (($realfile =~ /\.dtsi?$/ && $line =~ /^\+\s*compatible\s*=\s*\"/) || + (($realfile =~ /\.(dts|dtsi|dtso)$/ && $line =~ /^\+\s*compatible\s*=\s*\"/) || ($realfile =~ /\.[ch]$/ && $line =~ /^\+.*\.compatible\s*=\s*\"/))) { my @compats = $rawline =~ /\"([a-zA-Z0-9\-\,\.\+_]+)\"/g;
Signature · 1 line
2.53.0
Joe Perches
maintainerQuoted 7 lines · Vitor Soares
Extend the DT compatible documentation check to match .dtso files so that vendor-prefixed compatibles in overlay files trigger the
UNDOCUMENTED_DT_STRINGwarning when the vendor is absent fromvendor-prefixes.yaml.Assisted-by Claude:claude-sonnet-4.6
[]
scripts/checkpatch.pl
Quoted 1 line
scripts/checkpatch.pl +0
-0
[]
scripts/checkpatch.pl sub process { · line 3777
Quoted 6 lines
scripts/checkpatch.pl +1
-1@@ -3774,7 +3774,7 @@ sub process { # check for DT compatible documentation if (defined $root && - (($realfile =~ /\.dtsi?$/ && $line =~ /^\+\s*compatible\s*=\s*\"/) || + (($realfile =~ /\.(dts|dtsi|dtso)$/ && $line =~ /^\+\s*compatible\s*=\s*\"/) ||
Use (?:...) to avoid capture groups.
And presumably all checks for dts.? files and locations should be modified
$ git grep -n dts scripts/checkpatch.pl
scripts/checkpatch.pl:3777: (($realfile =~ /\.dtsi?$/ && $line =~ /^\+\s*compatible\s*=\s*\"/) ||
scripts/checkpatch.pl:3807: if ($realfile =~ /\.(dts|dtsi|dtso)$/ &&
scripts/checkpatch.pl:3824: if ($realfile =~ /\.(c|rs|dts|dtsi)$/) {
scripts/checkpatch.pl:3886: next if ($realfile !~ /\.(h|c|rs|s|S|sh|dtsi|dts)$/);
scripts/checkpatch.pl:3985: next if ($realfile !~ /\.(h|c|pl|dtsi|dts)$/);