From: Vitor Soares <ivitro@gmail.com>
To: Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>
Cc: Vitor Soares <vitor.soares@toradex.com>,
linux-kernel@vger.kernel.org,
Dwaipayan Ray <dwaipayanray1@gmail.com>,
Lukas Bulwahn <lukas.bulwahn@gmail.com>
Subject: [PATCH] checkpatch: Add .dtso to DT file extension checks
Date: Wed, 13 May 2026 22:14:09 +0100 [thread overview]
Message-ID: <20260513211409.921296-2-ivitro@gmail.com> (raw)
From: Vitor Soares <vitor.soares@toradex.com>
Device tree overlay files (.dtso) were not matched by most DT-related
checks, causing them to be silently skipped for overlay patches.
Extend all DT file extension patterns to include .dtso and normalize
them to use non-capturing groups (?:...).
Closes: https://lore.kernel.org/all/20260513171514.889168-2-ivitro@gmail.com/
Assisted-by: Claude:claude-sonnet-4.6
Signed-off-by: Vitor Soares <vitor.soares@toradex.com>
---
scripts/checkpatch.pl | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 3727156e4cca..650d052918a3 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -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;
@@ -3804,7 +3804,7 @@ sub process {
}
# Check for RGMII phy-mode with delay on PCB
- if ($realfile =~ /\.(dts|dtsi|dtso)$/ &&
+ if ($realfile =~ /\.(?:dts|dtsi|dtso)$/ &&
$line =~ /^\+\s*(phy-mode|phy-connection-type)\s*=\s*"/ &&
!ctx_has_comment($first_line, $linenr)) {
my $prop = $1;
@@ -3821,7 +3821,7 @@ sub process {
$checklicenseline = 2;
} elsif ($rawline =~ /^\+/) {
my $comment = "";
- if ($realfile =~ /\.(c|rs|dts|dtsi)$/) {
+ if ($realfile =~ /\.(?:c|rs|dts|dtsi|dtso)$/) {
$comment = '//';
} elsif (($checklicenseline == 2) || $realfile =~ /\.(sh|pl|py|awk|tc|yaml)$/) {
$comment = '#';
@@ -3883,7 +3883,7 @@ sub process {
}
# check we are in a valid source file if not then ignore this hunk
- next if ($realfile !~ /\.(h|c|rs|s|S|sh|dtsi|dts)$/);
+ next if ($realfile !~ /\.(?:h|c|rs|s|S|sh|dtsi|dts|dtso)$/);
# check for using SPDX-License-Identifier on the wrong line number
if ($realline != $checklicenseline &&
@@ -3982,7 +3982,7 @@ sub process {
}
# check we are in a valid source file C or perl if not then ignore this hunk
- next if ($realfile !~ /\.(h|c|pl|dtsi|dts)$/);
+ next if ($realfile !~ /\.(?:h|c|pl|dtsi|dts|dtso)$/);
# at the beginning of a line any tabs must come first and anything
# more than $tabsize must use tabs.
--
2.53.0
reply other threads:[~2026-05-13 21:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260513211409.921296-2-ivitro@gmail.com \
--to=ivitro@gmail.com \
--cc=apw@canonical.com \
--cc=dwaipayanray1@gmail.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
--cc=vitor.soares@toradex.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox