Message ID | 20230211121441.64359-1-krzysztof.kozlowski@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | get_maintainer: add email addresses from dts files | expand |
On 11/02/2023 13:14, Krzysztof Kozlowski wrote: > 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> This is obviously not a valid tag anymore... I'll sent a v2 tomorrow. Best regards, Krzysztof
On Sat, 2023-02-11 at 13:14 +0100, Krzysztof Kozlowski wrote: > 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 Why the rework? I think the older one is much simpler. I believe I forwarded the older one to Andrew Morton awhile back. I'll check to see what happened to it. > --- > 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)); > + } > } > > #
On 11/02/2023 17:27, Joe Perches wrote: > On Sat, 2023-02-11 at 13:14 +0100, Krzysztof Kozlowski wrote: >> 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 > > Why the rework? I think the older one is much simpler. > > I believe I forwarded the older one to Andrew Morton awhile back. > I'll check to see what happened to it. It was never merged, thus I assumed some changes are needed, e.g. to ignore emails in copyrights. Best regards, Krzysztof
On Sun, 2023-02-12 at 16:51 +0100, Krzysztof Kozlowski wrote: > On 11/02/2023 17:27, Joe Perches wrote: > > On Sat, 2023-02-11 at 13:14 +0100, Krzysztof Kozlowski wrote: > > > 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. That's what .mailmap is for. > > > Add new in-file > > > pattern for storing maintainers dedicated to specific boards: I think adding Maintainer: who <who@foo.tld> to each dts and dtsi file would be a lot of unnecessary changes $ git ls-files | grep -P '\.dtsi?$' | wc -l 4673 > > > This is rework of earlier approach: > > > Link: https://lore.kernel.org/r/20210809080204.8381-1-shawnguo@kernel.org > > > > Why the rework? I think the older one is much simpler. > > > > I believe I forwarded the older one to Andrew Morton awhile back. > > I'll check to see what happened to it. > > It was never merged, thus I assumed some changes are needed, e.g. to > ignore emails in copyrights. I think the old one is fine.
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)); + } } #