Skip to contentSkip to conversation

checkpatch: Don't warn on "orhapned" DT schema file

PATCH In review Andy Shevchenko 3 participants 4 messages Oct 27, 2025 – Oct 28, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 checkpatch: Don't warn on "orhapned" DT schema file

Currently checkpatch warns is the DT schema file is absent in MAINTAINERS. However the DT schema files are self-contained in this sense and have embedded information about maintainers of it. This is a requirement. Hence, avoid checkpatch warning about it.

---

v3: removed Requested-by tag
v2: drop some leftovers

The motivation of the patch is that DT people complaining about checkpatch but doing nothing about it. They should be more collaborative.

 scripts/checkpatch.pl | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
scripts/checkpatch.pl +6 -3
index 6729f18e5654..db274a7c2fb0 100755
@@ -3441,9 +3441,12 @@ sub process {
 		     ($line =~ /\{\s*([\w\/\.\-]*)\s*\=\>\s*([\w\/\.\-]*)\s*\}/ &&
 		      (defined($1) || defined($2))))) {
 			$is_patch = 1;
-			$reported_maintainer_file = 1;
-			WARN("FILE_PATH_CHANGES",
-			     "added, moved or deleted file(s), does MAINTAINERS need updating?\n" . $herecurr);
+			# DT bindings are incorporate maintainer information, no need to report
+			if ($realfile !~ m@^Documentation/devicetree/bindings/@)) {
+				$reported_maintainer_file = 1;
+				WARN("FILE_PATH_CHANGES",
+				     "added, moved or deleted file(s), does MAINTAINERS need updating?\n" . $herecurr);
+			}
 		}
 
 # Check for adding new DT bindings not in schema format
Signature · 1 line
2.50.1
maintainer
#1 lore raw
Quoted 7 lines · Andy Shevchenko

Currently checkpatch warns is the DT schema file is absent in MAINTAINERS. However the DT schema files are self-contained in this sense and have embedded information about maintainers of it. This is a requirement. Hence, avoid checkpatch warning about it.

nackish.

Perhaps it'd be better to make checkpatch and get_maintainer have some list of filename suffixes that are expected to have embedded maintainer email addresses

Maybe something like:

our $maintainer_in_file_types = '\.(?:yaml|dts.?|rst)$';

#2 lore raw
Quoted 11 lines · Joe Perches
Quoted 7 lines · Andy Shevchenko

Currently checkpatch warns is the DT schema file is absent in MAINTAINERS. However the DT schema files are self-contained in this sense and have embedded information about maintainers of it. This is a requirement. Hence, avoid checkpatch warning about it.

nackish.

Quoted 7 lines

Perhaps it'd be better to make checkpatch and get_maintainer have some list of filename suffixes that are expected to have embedded maintainer email addresses

Maybe something like:

our $maintainer_in_file_types = '\.(?:yaml|dts.?|rst)$';

Please, do that. I have no idea where all these Perl files do the necessary bits. But currently we have a problem (false positives) with checkpatch, and some maintainers dislike them.

Signature · 2 lines
With Best Regards,
Andy Shevchenko