[PATCH] checkpatch: suppress MAINTAINERS warning for newly added device tree files

From: Ahmad Fatoum
Date: Mon Jan 13 2025 - 16:48:50 EST


Linux ships with thousands of device trees and device tree maintainers
have indicated that they don't want to see hundreds of maintainer entries
added for them[1].

Yet, checkpatch.pl keeps warning about it, which is annoying:

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?

Avoid this by making the warning conditional on the file not having a
.dts or .dtsi extension.

Link: https://lore.kernel.org/all/e3b73baf-b36b-17c0-f414-bbf2dd746411@xxxxxxxxxx/ [1]
Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 7b28ad3317427a6bf9e27b77065aa3915cb13053..269cfa459162bbc00c2372cfcb0da709f9202a79 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3401,7 +3401,7 @@ sub process {
}

# Check for added, moved or deleted files
- if (!$reported_maintainer_file && !$in_commit_log &&
+ if (!$reported_maintainer_file && !$in_commit_log && $realfile !~ /\.(dts|dtsi)$/ &&
($line =~ /^(?:new|deleted) file mode\s*\d+\s*$/ ||
$line =~ /^rename (?:from|to) [\w\/\.\-]+\s*$/ ||
($line =~ /\{\s*([\w\/\.\-]*)\s*\=\>\s*([\w\/\.\-]*)\s*\}/ &&

---
base-commit: 37136bf5c3a6f6b686d74f41837a6406bec6b7bc
change-id: 20250113-b4-dts-mainainers-check-fa069e9c63ee

Best regards,
--
Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>