All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Arnd Bergmann <arnd@arndb.de>, Olof Johansson <olof@lixom.net>,
	Rob Herring <robh+dt@kernel.org>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Joe Perches <joe@perches.com>,
	linux-kernel@vger.kernel.org
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>
Subject: [PATCH] get_maintainer: add email addresses from dts files
Date: Sat, 11 Feb 2023 13:14:41 +0100	[thread overview]
Message-ID: <20230211121441.64359-1-krzysztof.kozlowski@linaro.org> (raw)

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


WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Arnd Bergmann <arnd@arndb.de>, Olof Johansson <olof@lixom.net>,
	Rob Herring <robh+dt@kernel.org>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Joe Perches <joe@perches.com>,
	linux-kernel@vger.kernel.org
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>
Subject: [PATCH] get_maintainer: add email addresses from dts files
Date: Sat, 11 Feb 2023 13:14:41 +0100	[thread overview]
Message-ID: <20230211121441.64359-1-krzysztof.kozlowski@linaro.org> (raw)

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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2023-02-11 12:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-11 12:14 Krzysztof Kozlowski [this message]
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 12:34   ` Krzysztof Kozlowski
2023-02-11 16:27 ` Joe Perches
2023-02-11 16:27   ` Joe Perches
2023-02-12 15:51   ` Krzysztof Kozlowski
2023-02-12 15:51     ` Krzysztof Kozlowski
2023-02-12 21:13     ` Joe Perches
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

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=20230211121441.64359-1-krzysztof.kozlowski@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=joe@perches.com \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=robh+dt@kernel.org \
    --cc=shawnguo@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.