[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <741eb1fe7101850d9e75cb5ef29d7b4e5376e475.camel@perches.com>
Date: Thu, 13 Oct 2022 17:39:53 -0700
From: Joe Perches <joe@...ches.com>
To: Palmer Dabbelt <palmer@...osinc.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] get_maintainer: Add the --for-tree argument
On Thu, 2022-10-13 at 14:57 -0700, Palmer Dabbelt wrote:
> I recently wanted to look up the maintainers for each tree path via a
> script, and I couldn't find a better way to do that than poking
> get_maintainer.pl to add a new argument. This lets folks run something
> like
>
> $ ./scripts/get_maintainer.pl --for-tree git://github.com/kvm-riscv/linux.git
> Anup Patel <anup@...infault.org> (maintainer:KERNEL VIRTUAL MACHINE FOR RISC-V (KVM/riscv))
> kvm@...r.kernel.org (maintainer:KERNEL VIRTUAL MACHINE FOR RISC-V (KVM/riscv))
> kvm-riscv@...ts.infradead.org (maintainer:KERNEL VIRTUAL MACHINE FOR RISC-V (KVM/riscv))
> linux-riscv@...ts.infradead.org (maintainer:KERNEL VIRTUAL MACHINE FOR RISC-V (KVM/riscv))
>
> to find out who owns a tree.
I'm not sure this is useful.
It seems far simpler to grep the MAINTAINERS file for the repository.
And:
$ git grep "^T:" MAINTAINERS | sort | uniq -c | sort -rn | head -10
153 MAINTAINERS:T: git git://linuxtv.org/media_tree.git
70 MAINTAINERS:T: git git://anongit.freedesktop.org/drm/drm-misc
33 MAINTAINERS:T: git git://linuxtv.org/anttip/media_tree.git
9 MAINTAINERS:T: git git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
6 MAINTAINERS:T: git git://linuxtv.org/mkrufky/tuners.git
6 MAINTAINERS:T: git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening
6 MAINTAINERS:T: git git://github.com/broadcom/stblinux.git
5 MAINTAINERS:T: git git://git.kernel.org/pub/scm/virt/kvm/kvm.git
5 MAINTAINERS:T: git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
5 MAINTAINERS:T: git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev
I think I would not like to see the output for git repositories
with 153 matches. (or even 5 matches)
For instance: (I've more comments below this too)
$ ./scripts/get_maintainer.pl --for-tree=git://linuxtv.org/media_tree.git
Hans Verkuil <hverkuil@...all.nl> (maintainer:AIMSLAB FM RADIO RECEIVER DRIVER)
linux-media@...r.kernel.org (maintainer:AIMSLAB FM RADIO RECEIVER DRIVER)
Maxime Ripard <mripard@...nel.org> (maintainer:ALLWINNER A10 CSI DRIVER)
Paul Kocialkowski <paul.kocialkowski@...tlin.com> (maintainer:ALLWINNER A31 MIPI CSI-2 BRIDGE DRIVER)
Tianshu Qiu <tian.shu.qiu@...el.com> (maintainer:ASAHI KASEI AK7375 LENS VOICE COIL DRIVER)
Mauro Carvalho Chehab <mchehab@...nel.org> (maintainer:AZ6007 DVB DRIVER)
Fabien Dessenne <fabien.dessenne@...s.st.com> (supporter:BDISP ST MEDIA DRIVER)
Joe Tessler <jrt@...gle.com> (maintainer:CHRONTEL CH7322 CEC DRIVER)
Yong Deng <yong.deng@...ewell.com> (maintainer:CSI DRIVERS FOR ALLWINNER V3s)
Andy Walls <awalls@...metrocast.net> (maintainer:CX18 VIDEO4LINUX DRIVER)
Jernej Skrabec <jernej.skrabec@...il.com> (maintainer:DEINTERLACE DRIVERS FOR ALLWINNER H3)
Hugues Fruchet <hugues.fruchet@...s.st.com> (supporter:DELTA ST MEDIA DRIVER)
Sakari Ailus <sakari.ailus@...ux.intel.com> (maintainer:DONGWOON DW9714 LENS VOICE COIL DRIVER)
Dongchun Zhu <dongchun.zhu@...iatek.com> (maintainer:DONGWOON DW9768 LENS VOICE COIL DRIVER)
Alexey Klimov <klimov.linux@...il.com> (maintainer:DSBR100 USB FM RADIO DRIVER)
Michael Krufky <mkrufky@...uxtv.org> (maintainer:DVB_USB_CXUSB MEDIA DRIVER)
Charles-Antoine Couret <charles-antoine.couret@...vision.fr> (maintainer:GS1662 VIDEO SERIALIZER)
Frank Zago <frank@...o.net> (maintainer:GSPCA FINEPIX SUBDRIVER)
Olivier Lorin <o.lorin@...oste.net> (maintainer:GSPCA GL860 SUBDRIVER)
Erik Andren <erik.andren@...il.com> (maintainer:GSPCA M5602 SUBDRIVER)
Brian Johnson <brijohn@...il.com> (maintainer:GSPCA SN9C20X SUBDRIVER)
Leandro Costantino <lcostantino@...il.com> (maintainer:GSPCA T613 SUBDRIVER)
Jean-Christophe Trotin <jean-christophe.trotin@...s.st.com> (supporter:HVA ST MEDIA DRIVER)
Shawn Tu <shawnx.tu@...el.com> (maintainer:HYNIX HI556 SENSOR DRIVER)
Yong Zhi <yong.zhi@...el.com> (maintainer:INTEL IPU3 CSI-2 CIO2 DRIVER)
Bingbu Cao <bingbu.cao@...el.com> (maintainer:INTEL IPU3 CSI-2 CIO2 DRIVER)
Dan Scally <djrscally@...il.com> (maintainer:INTEL IPU3 CSI-2 CIO2 DRIVER)
Ramesh Shanmugasundaram <rashanmu@...il.com> (maintainer:MAX2175 SDR TUNER DRIVER)
Laurent Pinchart <laurent.pinchart@...asonboard.com> (supporter:MEDIA CONTROLLER FRAMEWORK)
Philipp Zabel <p.zabel@...gutronix.de> (maintainer:MEDIA DRIVER FOR FREESCALE IMX PXP)
Sergey Kozlov <serjk@...up.ru> (supporter:MEDIA DRIVERS FOR ASCOT2E)
Abylay Ospan <aospan@...up.ru> (supporter:MEDIA DRIVERS FOR ASCOT2E)
Jasmin Jessich <jasmin@....at> (maintainer:MEDIA DRIVERS FOR CXD2099AR CI CONTROLLERS)
Yasunari Takiguchi <Yasunari.Takiguchi@...y.com> (supporter:MEDIA DRIVERS FOR CXD2880)
Steve Longerbeam <slongerbeam@...il.com> (maintainer:MEDIA DRIVERS FOR FREESCALE IMX)
Rui Miguel Silva <rmfrfs@...il.com> (maintainer:MEDIA DRIVERS FOR FREESCALE IMX7)
Dmitry Osipenko <digetx@...il.com> (maintainer:MEDIA DRIVERS FOR NVIDIA TEGRA - VDE)
linux-tegra@...r.kernel.org (maintainer:MEDIA DRIVERS FOR NVIDIA TEGRA - VDE)
Jacopo Mondi <jacopo@...ndi.org> (supporter:MEDIA DRIVERS FOR RENESAS - CEU)
linux-renesas-soc@...r.kernel.org (supporter:MEDIA DRIVERS FOR RENESAS - CEU)
Fabrizio Castro <fabrizio.castro.jz@...esas.com> (supporter:MEDIA DRIVERS FOR RENESAS - DRIF)
Kieran Bingham <kieran.bingham+renesas@...asonboard.com> (supporter:MEDIA DRIVERS FOR RENESAS - FDP1)
"Niklas Söderlund" <niklas.soderlund@...natech.se> (supporter:MEDIA DRIVERS FOR RENESAS - VIN)
Neil Armstrong <neil.armstrong@...aro.org> (supporter:MESON AO CEC DRIVER FOR AMLOGIC SOCS)
linux-amlogic@...ts.infradead.org (supporter:MESON AO CEC DRIVER FOR AMLOGIC SOCS)
Jimmy Su <jimmy.su@...el.com> (maintainer:OMNIVISION OV08D10 SENSOR DRIVER)
Arec Kao <arec.kao@...el.com> (maintainer:OMNIVISION OV13B10 SENSOR DRIVER)
Shunqian Zheng <zhengsq@...k-chips.com> (maintainer:OMNIVISION OV2685 SENSOR DRIVER)
Dave Stevenson <dave.stevenson@...pberrypi.com> (maintainer:OMNIVISION OV5647 SENSOR DRIVER)
Chiranjeevi Rapolu <chiranjeevi.rapolu@...el.com> (maintainer:OMNIVISION OV5670 SENSOR DRIVER)
Wenyou Yang <wenyou.yang@...rochip.com> (maintainer:OMNIVISION OV7740 SENSOR DRIVER)
"Paul J. Murphy" <paul.j.murphy@...el.com> (maintainer:OMNIVISION OV9282 SENSOR DRIVER)
Daniele Alessandrelli <daniele.alessandrelli@...el.com> (maintainer:OMNIVISION OV9282 SENSOR DRIVER)
Mike Isely <isely@...ox.com> (maintainer:PVRUSB2 VIDEO4LINUX DRIVER)
pvrusb2@...ly.net (maintainer:PVRUSB2 VIDEO4LINUX DRIVER)
Stanimir Varbanov <stanimir.varbanov@...aro.org> (maintainer:QUALCOMM VENUS VIDEO ACCELERATOR DRIVER)
linux-arm-msm@...r.kernel.org (maintainer:QUALCOMM VENUS VIDEO ACCELERATOR DRIVER)
Sean Young <sean@...s.org> (maintainer:RC-CORE / LIRC FRAMEWORK)
Eduardo Valentin <edubezval@...il.com> (odd fixer:SI4713 FM RADIO TRANSMITTER I2C DRIVER)
Ricardo Ribalda <ribalda@...nel.org> (maintainer:SONY IMX214 SENSOR DRIVER)
Leon Luo <leonl@...pardimaging.com> (maintainer:SONY IMX274 SENSOR DRIVER)
Manivannan Sadhasivam <mani@...nel.org> (maintainer:SONY IMX290 SENSOR DRIVER)
Benjamin Mugnier <benjamin.mugnier@...s.st.com> (maintainer:ST MIPID02 CSI-2 TO PARALLEL BRIDGE DRIVER)
Sylvain Petinot <sylvain.petinot@...s.st.com> (maintainer:ST MIPID02 CSI-2 TO PARALLEL BRIDGE DRIVER)
Ezequiel Garcia <ezequiel@...guardiasur.com.ar> (maintainer:STK1160 USB VIDEO CAPTURE DRIVER)
Olli Salonen <olli.salonen@....fi> (maintainer:TDA18250 MEDIA DRIVER)
Antoine Jacquet <royale@...ezo.com> (maintainer:USB ZR364XX DRIVER)
linux-usb@...r.kernel.org (maintainer:USB ZR364XX DRIVER)
Shuah Khan <skhan@...uxfoundation.org> (maintainer:VIMC VIRTUAL MEDIA CONTROLLER DRIVER)
"Daniel W. S. Almeida" <dwlsalmeida@...il.com> (maintainer:VIDTV VIRTUAL DIGITAL TV DRIVER)
Hyun Kwon <hyun.kwon@...inx.com> (supporter:XILINX VIDEO IP CORES)
And I don't know how this is an improvement as the --for-tree argument
seems _very_ likely to be typoed.
> diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
[]
> @@ -23,6 +23,7 @@ use File::Spec::Functions;
>
> my $cur_path = fastgetcwd() . '/';
> my $lk_path = "./";
> +my $for_tree = undef;
> my $email = 1;
> my $email_usename = 1;
> my $email_maintainer = 1;
> @@ -239,6 +240,7 @@ if ($#ARGV > 0) {
>
> if (!GetOptions(
> 'email!' => \$email,
> + 'for-tree=s' => \$for_tree,
> 'git!' => \$email_git,
> 'git-all-signature-types!' => \$email_git_all_signature_types,
> 'git-blame!' => \$email_git_blame,
> @@ -300,7 +302,7 @@ if (defined $self_test) {
> exit 0;
> }
>
> -if (-t STDIN && !@...V) {
> +if (-t STDIN && !@...V && !$for_tree) {
> # We're talking to a terminal, but have no command line arguments.
> die "$P: missing patchfile or -f file - use --help if necessary\n";
> }
> @@ -527,7 +529,7 @@ sub read_mailmap {
>
> ## use the filenames on the command line or find the filenames in the patchfiles
>
> -if (!@...V) {
> +if (!@...V && !$for_tree) {
> push(@ARGV, "&STDIN");
> }
>
> @@ -951,6 +953,47 @@ sub get_maintainers {
> }
> }
>
> + if ($for_tree) {
> + my $tvi = find_first_section();
> + while ($tvi < @typevalue) {
> + my $start = find_starting_index($tvi);
> + my $end = find_ending_index($tvi);
> + $tvi = $end + 1;
> +
> + my $i;
> + my $tree_match = 0;
> + for ($i = $start; $i < $end; $i++) {
> + my $line = $typevalue[$i];
> + if ($line =~ m/^([A-Z]):(.*)/) {
> + my $type = $1;
> + my $value = $2;
> +
> + if ($type eq 'T') {
> + if ($for_tree eq $value || "git $for_tree" eq $value) {
> + $tree_match = 1
> + }
> + }
> + }
> + }
> +
> + if ($tree_match) {
> + for ($i = $start; $i < $end; $i++) {
> + my $line = $typevalue[$i];
> + if ($line =~ m/^([A-Z]):(.*)/) {
> + my $type = $1;
> + my $value = $2;
> +
> + if ($type eq 'M' || $type eq 'L') {
And what about reviewers? 'R' ?
> + my $role = get_maintainer_role($i);
Also this improperly marks mailing lists as "maintainer:<SECTION>"
rather than "mailing list:<SECTION>" as it uses the S: value for
the section rather than the actual role of the person.
> + push_email_address($value, $role)
> + }
> + }
> + }
> + }
> + }
> + }
> +
> +
> foreach my $email (@email_to, @list_to) {
> $email->[0] = deduplicate_email($email->[0]);
> }
> @@ -1074,6 +1117,7 @@ Output type options:
> --multiline => print 1 entry per line
>
> Other options:
> + --for-tree => Get maintainers for the given tree
> --pattern-depth => Number of pattern directory traversals (default: 0 (all))
> --keywords => scan patch for keywords (default: $keywords)
> --sections => print all of the subsystem sections with pattern matches
Powered by blists - more mailing lists