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

Ahmad Fatoum posted 1 patch 11 months, 1 week ago
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] checkpatch: suppress MAINTAINERS warning for newly added device tree files
Posted by Ahmad Fatoum 11 months, 1 week ago
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@linaro.org/ [1]
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 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@pengutronix.de>
Re: [PATCH] checkpatch: suppress MAINTAINERS warning for newly added device tree files
Posted by Ahmad Fatoum 8 months, 1 week ago
Dear device tree maintainers,

On 13.01.25 22:47, Ahmad Fatoum wrote:
> 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.

Any thoughts on this patch?

Thanks,
Ahmad

> 
> Link: https://lore.kernel.org/all/e3b73baf-b36b-17c0-f414-bbf2dd746411@linaro.org/ [1]
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  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,


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |