linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] get_maintainer: add email addresses from dts files
@ 2023-02-11 12:14 Krzysztof Kozlowski
  2023-02-11 12:34 ` Krzysztof Kozlowski
  2023-02-11 16:27 ` Joe Perches
  0 siblings, 2 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-11 12:14 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, Rob Herring, devicetree,
	linux-arm-kernel, Joe Perches, linux-kernel
  Cc: Krzysztof Kozlowski, Shawn Guo, Krzysztof Kozlowski

The DTS/DTSI files represent hardware description for Linux kernel,
which is necessary to properly recognize and configure hardware by
Linux.  DTS is usually created by people having the actual hardware and
having interest in keeping it in good shape.  Such people can provide
review (they might have board schematics) and testing.  Unfortunately
they mostly do not appear in MAINTAINERS file.  Adding per-DTS entries
to MAINTAINERS would quickly make it bloated (hundreds of new per-DTS
entries).

On the other hand there is no point in CC-ing every Copyright email
appearing in files, because it might be outdated.  Add new in-file
pattern for storing maintainers dedicated to specific boards:

  Maintainer: John Smith <email>

Suggested-by: Joe Perches <joe@perches.com>
Suggested-by: Shawn Guo <shawnguo@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

This is rework of earlier approach:
Link: https://lore.kernel.org/r/20210809080204.8381-1-shawnguo@kernel.org
---
 scripts/get_maintainer.pl | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index ab123b498fd9..f02a2a80c3bc 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -445,6 +445,17 @@ sub maintainers_in_file {
 	my @poss_addr = $text =~ m$[A-Za-zÀ-ÿ\"\' \,\.\+-]*\s*[\,]*\s*[\(\<\{]{0,1}[A-Za-z0-9_\.\+-]+\@[A-Za-z0-9\.-]+\.[A-Za-z0-9]+[\)\>\}]{0,1}$g;
 	push(@file_emails, clean_file_emails(@poss_addr));
     }
+
+    # Match "Maintainer: email" entries only in DTS sources
+    if (-f $file && ($email_file_emails || $file =~ /\.dtsi?$/)) {
+	open(my $f, '<', $file)
+	    or die "$P: Can't open $file: $!\n";
+	my $text = do { local($/) ; <$f> };
+	close($f);
+
+	my @poss_addr = $text =~ m$Maintainer: [A-Za-zÀ-ÿ\"\' \,\.\+-]*\s*[\,]*\s*[\(\<\{]{0,1}[A-Za-z0-9_\.\+-]+\@[A-Za-z0-9\.-]+\.[A-Za-z0-9]+[\)\>\}]{0,1}$g;
+	push(@file_emails, clean_file_emails(@poss_addr));
+    }
 }
 
 #
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] get_maintainer: add email addresses from dts files
@ 2020-08-30 12:29 Shawn Guo
  2020-09-30 10:54 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 7+ messages in thread
From: Shawn Guo @ 2020-08-30 12:29 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel, Shawn Guo

MAINTAINER file will get bloated quickly if individual section entry
is created for each .dts/.dtsi file.  Add the email address from dts
files to get_maintainer output for saving unnecessary patching on
MAINTAINER file.

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
---
 scripts/get_maintainer.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 484d2fbf5921..b8e104028359 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -436,7 +436,7 @@ sub maintainers_in_file {
 
     return if ($file =~ m@\bMAINTAINERS$@);
 
-    if (-f $file && ($email_file_emails || $file =~ /\.yaml$/)) {
+    if (-f $file && ($email_file_emails || $file =~ /\.(?:yaml|dtsi?)$/)) {
 	open(my $f, '<', $file)
 	    or die "$P: Can't open $file: $!\n";
 	my $text = do { local($/) ; <$f> };
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-02-12 21:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-11 12:14 [PATCH] get_maintainer: add email addresses from dts files Krzysztof Kozlowski
2023-02-11 12:34 ` Krzysztof Kozlowski
2023-02-11 16:27 ` Joe Perches
2023-02-12 15:51   ` Krzysztof Kozlowski
2023-02-12 21:13     ` Joe Perches
  -- strict thread matches above, loose matches on Subject: below --
2020-08-30 12:29 Shawn Guo
2020-09-30 10:54 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).