2023-04-27 09:10:52

by Geert Uytterhoeven

[permalink] [raw]
Subject: get_maintainer.pl wrong and undeterministic? (was: Re: [PATCH v2 2/2] usb: gadget: udc: Handle gadget_connect failure during bind operation)

Hi Krishna,

CC Joe and lkml

On Thu, Apr 27, 2023 at 10:44 AM Krishna Kurapati PSSNV
<[email protected]> wrote:
> On 4/27/2023 1:23 PM, Geert Uytterhoeven wrote:
> > On Thu, Apr 27, 2023 at 5:49 AM Krishna Kurapati PSSNV
> > <[email protected]> wrote:
> >> On 4/26/2023 2:48 PM, Geert Uytterhoeven wrote:
> >>> On Wed, Apr 26, 2023 at 3:17 AM Krishna Kurapati PSSNV
> >>> <[email protected]> wrote:
> >>>> Hi Alan, Geert,
> >>>>
> >>>> Can you help review and provide comments/approval on the following patch.
> >>>
> >>> I don't know why you are addressing me, as I never touched the affected
> >>> file, am not listed as its maintainer, and don't know much about USB UDC.
> >
> >> Apologies. I must have caused some confusion because of same name. I
> >> must have specified clearly whom I was referring to.
> >>
> >> I CC'd and was referring to Geert Uytterhoeven <[email protected]>
> >> for comments.
> >
> > That's actually me, too ;-)
> >
> >> As per the output of get_maintainer.pl
> >>
> >> ./scripts/get_maintainer.pl drivers/usb/gadget/udc/core.c
> >>
> >> Greg Kroah-Hartman <[email protected]> (supporter:USB
> >> SUBSYSTEM,commit_signer:6/6=100%,authored:1/6=17%,removed_lines:2/26=8%)
> >> Alan Stern <[email protected]>
> >> (commit_signer:4/6=67%,authored:3/6=50%,added_lines:36/45=80%,removed_lines:17/26=65%)
> >> TaoXue <[email protected]> (commit_signer:1/6=17%)
> >> "Rafael J. Wysocki" <[email protected]> (commit_signer:1/6=17%)
> >> Geert Uytterhoeven <[email protected]> (commit_signer:1/6=17%)
> >> Colin Ian King <[email protected]> (authored:1/6=17%)
> >> Jiantao Zhang <[email protected]>
> >> (authored:1/6=17%,added_lines:6/45=13%,removed_lines:6/26=23%)
> >
> > Interesting, I don't see me listed when running that command (on v6.3 and
> > next-20230425), and I never authored any change to that file.
> > What is the tree (commit sha1) you are running ./scripts/get_maintainer.pl on?
>
> I checked it on linux-next a couple of weeks back and it showed me this.
> But when I synced latest linux kernel, it didn't show it today ????
> Not sure, what is the diff here.

Interesting:

$ git checkout next-20230425
Updating files: 100% (7386/7386), done.
Previous HEAD position was 198925fae644b009 Add linux-next
specific files for 20230329
HEAD is now at f600e0bbde8562a0 Add linux-next specific files for 20230425
$ scripts/get_maintainer.pl drivers/usb/gadget/udc/core.c
Greg Kroah-Hartman <[email protected]> (supporter:USB
SUBSYSTEM,commit_signer:11/11=100%,authored:3/11=27%,removed_lines:5/73=7%)
Alan Stern <[email protected]>
(commit_signer:4/11=36%,authored:3/11=27%,added_lines:36/182=20%,removed_lines:17/73=23%)
Badhri Jagan Sridharan <[email protected]>
(commit_signer:2/11=18%,authored:2/11=18%,added_lines:107/182=59%,removed_lines:44/73=60%)
Elson Roy Serrao <[email protected]>
(commit_signer:1/11=9%,added_lines:27/182=15%)
Sebastian Reichel <[email protected]> (commit_signer:1/11=9%)
Colin Ian King <[email protected]> (authored:1/11=9%)
Jiantao Zhang <[email protected]>
(authored:1/11=9%,removed_lines:6/73=8%)
[email protected] (open list:USB SUBSYSTEM)
[email protected] (open list)
$ git checkout next-20230329
Updating files: 100% (7386/7386), done.
Previous HEAD position was f600e0bbde8562a0 Add linux-next
specific files for 20230425
HEAD is now at 198925fae644b009 Add linux-next specific files for 20230329
$ scripts/get_maintainer.pl drivers/usb/gadget/udc/core.c
Greg Kroah-Hartman <[email protected]> (supporter:USB
SUBSYSTEM,commit_signer:8/8=100%,authored:3/8=38%,added_lines:5/48=10%,removed_lines:5/29=17%)
Alan Stern <[email protected]>
(commit_signer:3/8=50%,authored:3/8=38%,added_lines:36/48=75%,removed_lines:17/29=59%)
Geert Uytterhoeven <[email protected]> (commit_signer:1/8=12%)
Sebastian Reichel <[email protected]> (commit_signer:1/8=12%)
Heikki Krogerus <[email protected]> (commit_signer:1/8=12%)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I, Sebastian, and Heikki never touched this file...

Jiantao Zhang <[email protected]>
(authored:1/8=12%,added_lines:6/48=12%,removed_lines:6/29=21%)
Colin Ian King <[email protected]> (authored:1/8=12%)
[email protected] (open list:USB SUBSYSTEM)
[email protected] (open list)
$ scripts/get_maintainer.pl drivers/usb/gadget/udc/core.c
Greg Kroah-Hartman <[email protected]> (supporter:USB
SUBSYSTEM,commit_signer:8/8=100%,authored:3/8=38%,added_lines:5/48=10%,removed_lines:5/29=17%)
Alan Stern <[email protected]>
(commit_signer:4/8=50%,authored:3/8=38%,added_lines:36/48=75%,removed_lines:17/29=59%)
"Rafael J. Wysocki" <[email protected]> (commit_signer:1/8=12%)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Heikki and I are gone, but Rafael is new and also hasn't touched this file?

Colin Ian King <[email protected]>
(commit_signer:1/8=12%,authored:1/8=12%)
Sebastian Reichel <[email protected]> (commit_signer:1/8=12%)
Jiantao Zhang <[email protected]>
(authored:1/8=12%,added_lines:6/48=12%,removed_lines:6/29=21%)
[email protected] (open list:USB SUBSYSTEM)
[email protected] (open list)

You can see the differences when running the following multiple times:

$ diff <(scripts/get_maintainer.pl drivers/usb/gadget/udc/core.c)
<(scripts/get_maintainer.pl drivers/usb/gadget/udc/core.c)

Looks like scripts/get_maintainer.pl (a) shows wrong committers (they
did provide other e.g. Reviewed-by tags), and (b) is not deterministic?

Thanks!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


2023-04-27 10:14:06

by Andreas Schwab

[permalink] [raw]
Subject: Re: get_maintainer.pl wrong and undeterministic?

On Apr 27 2023, Geert Uytterhoeven wrote:

> $ scripts/get_maintainer.pl drivers/usb/gadget/udc/core.c
> Greg Kroah-Hartman <[email protected]> (supporter:USB
> SUBSYSTEM,commit_signer:8/8=100%,authored:3/8=38%,added_lines:5/48=10%,removed_lines:5/29=17%)
> Alan Stern <[email protected]>
> (commit_signer:3/8=50%,authored:3/8=38%,added_lines:36/48=75%,removed_lines:17/29=59%)
> Geert Uytterhoeven <[email protected]> (commit_signer:1/8=12%)
> Sebastian Reichel <[email protected]> (commit_signer:1/8=12%)
> Heikki Krogerus <[email protected]> (commit_signer:1/8=12%)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> I, Sebastian, and Heikki never touched this file...

If you look at 'git log drivers/usb/gadget/udc/core.c', you see commits
touching scripts/get_maintainer.pl.

--
Andreas Schwab, [email protected]
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."

2023-04-27 10:19:21

by Andreas Schwab

[permalink] [raw]
Subject: Re: get_maintainer.pl wrong and undeterministic?

Please ignore that, typo on my side.

--
Andreas Schwab, [email protected]
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."

2023-04-28 22:04:43

by Joe Perches

[permalink] [raw]
Subject: Re: get_maintainer.pl wrong and undeterministic? (was: Re: [PATCH v2 2/2] usb: gadget: udc: Handle gadget_connect failure during bind operation)

On Thu, 2023-04-27 at 11:09 +0200, Geert Uytterhoeven wrote:
> Hi Krishna,
>
> CC Joe and lkml

get_maintainer is sometimes non deterministic.

When adding maintainers from git commit logs (and btw, it's
not just nominal maintainers, it's any signers), if the
same number of signature names are read from the commit logs
the selection of the listed entries _is_ random.

see: https://lore.kernel.org/lkml/[email protected]/

>
> On Thu, Apr 27, 2023 at 10:44 AM Krishna Kurapati PSSNV
> <[email protected]> wrote:
> > On 4/27/2023 1:23 PM, Geert Uytterhoeven wrote:
> > > On Thu, Apr 27, 2023 at 5:49 AM Krishna Kurapati PSSNV
> > > <[email protected]> wrote:
> > > > On 4/26/2023 2:48 PM, Geert Uytterhoeven wrote:
> > > > > On Wed, Apr 26, 2023 at 3:17 AM Krishna Kurapati PSSNV to l
> > > > > <[email protected]> wrote:
> > > > > > Hi Alan, Geert,
> > > > > >
> > > > > > Can you help review and provide comments/approval on the following patch.
> > > > >
> > > > > I don't know why you are addressing me, as I never touched the affected
> > > > > file, am not listed as its maintainer, and don't know much about USB UDC.
> > >
> > > > Apologies. I must have caused some confusion because of same name. I
> > > > must have specified clearly whom I was referring to.
> > > >
> > > > I CC'd and was referring to Geert Uytterhoeven <[email protected]>
> > > > for comments.
> > >
> > > That's actually me, too ;-)
> > >
> > > > As per the output of get_maintainer.pl
> > > >
> > > > ./scripts/get_maintainer.pl drivers/usb/gadget/udc/core.c
> > > >
> > > > Greg Kroah-Hartman <[email protected]> (supporter:USB
> > > > SUBSYSTEM,commit_signer:6/6=100%,authored:1/6=17%,removed_lines:2/26=8%)
> > > > Alan Stern <[email protected]>
> > > > (commit_signer:4/6=67%,authored:3/6=50%,added_lines:36/45=80%,removed_lines:17/26=65%)
> > > > TaoXue <[email protected]> (commit_signer:1/6=17%)
> > > > "Rafael J. Wysocki" <[email protected]> (commit_signer:1/6=17%)
> > > > Geert Uytterhoeven <[email protected]> (commit_signer:1/6=17%)
> > > > Colin Ian King <[email protected]> (authored:1/6=17%)
> > > > Jiantao Zhang <[email protected]>
> > > > (authored:1/6=17%,added_lines:6/45=13%,removed_lines:6/26=23%)
> > >
> > > Interesting, I don't see me listed when running that command (on v6.3 and
> > > next-20230425), and I never authored any change to that file.
> > > What is the tree (commit sha1) you are running ./scripts/get_maintainer.pl on?
> >
> > I checked it on linux-next a couple of weeks back and it showed me this.
> > But when I synced latest linux kernel, it didn't show it today ????
> > Not sure, what is the diff here.
>
> Interesting:
>
> $ git checkout next-20230425
> Updating files: 100% (7386/7386), done.
> Previous HEAD position was 198925fae644b009 Add linux-next
> specific files for 20230329
> HEAD is now at f600e0bbde8562a0 Add linux-next specific files for 20230425
> $ scripts/get_maintainer.pl drivers/usb/gadget/udc/core.c
> Greg Kroah-Hartman <[email protected]> (supporter:USB
> SUBSYSTEM,commit_signer:11/11=100%,authored:3/11=27%,removed_lines:5/73=7%)
> Alan Stern <[email protected]>
> (commit_signer:4/11=36%,authored:3/11=27%,added_lines:36/182=20%,removed_lines:17/73=23%)
> Badhri Jagan Sridharan <[email protected]>
> (commit_signer:2/11=18%,authored:2/11=18%,added_lines:107/182=59%,removed_lines:44/73=60%)
> Elson Roy Serrao <[email protected]>
> (commit_signer:1/11=9%,added_lines:27/182=15%)
> Sebastian Reichel <[email protected]> (commit_signer:1/11=9%)
> Colin Ian King <[email protected]> (authored:1/11=9%)
> Jiantao Zhang <[email protected]>
> (authored:1/11=9%,removed_lines:6/73=8%)
> [email protected] (open list:USB SUBSYSTEM)
> [email protected] (open list)
> $ git checkout next-20230329
> Updating files: 100% (7386/7386), done.
> Previous HEAD position was f600e0bbde8562a0 Add linux-next
> specific files for 20230425
> HEAD is now at 198925fae644b009 Add linux-next specific files for 20230329
> $ scripts/get_maintainer.pl drivers/usb/gadget/udc/core.c
> Greg Kroah-Hartman <[email protected]> (supporter:USB
> SUBSYSTEM,commit_signer:8/8=100%,authored:3/8=38%,added_lines:5/48=10%,removed_lines:5/29=17%)
> Alan Stern <[email protected]>
> (commit_signer:3/8=50%,authored:3/8=38%,added_lines:36/48=75%,removed_lines:17/29=59%)
> Geert Uytterhoeven <[email protected]> (commit_signer:1/8=12%)
> Sebastian Reichel <[email protected]> (commit_signer:1/8=12%)
> Heikki Krogerus <[email protected]> (commit_signer:1/8=12%)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> I, Sebastian, and Heikki never touched this file...
>
> Jiantao Zhang <[email protected]>
> (authored:1/8=12%,added_lines:6/48=12%,removed_lines:6/29=21%)
> Colin Ian King <[email protected]> (authored:1/8=12%)
> [email protected] (open list:USB SUBSYSTEM)
> [email protected] (open list)
> $ scripts/get_maintainer.pl drivers/usb/gadget/udc/core.c
> Greg Kroah-Hartman <[email protected]> (supporter:USB
> SUBSYSTEM,commit_signer:8/8=100%,authored:3/8=38%,added_lines:5/48=10%,removed_lines:5/29=17%)
> Alan Stern <[email protected]>
> (commit_signer:4/8=50%,authored:3/8=38%,added_lines:36/48=75%,removed_lines:17/29=59%)
> "Rafael J. Wysocki" <[email protected]> (commit_signer:1/8=12%)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Heikki and I are gone, but Rafael is new and also hasn't touched this file?
>
> Colin Ian King <[email protected]>
> (commit_signer:1/8=12%,authored:1/8=12%)
> Sebastian Reichel <[email protected]> (commit_signer:1/8=12%)
> Jiantao Zhang <[email protected]>
> (authored:1/8=12%,added_lines:6/48=12%,removed_lines:6/29=21%)
> [email protected] (open list:USB SUBSYSTEM)
> [email protected] (open list)
>
> You can see the differences when running the following multiple times:
>
> $ diff <(scripts/get_maintainer.pl drivers/usb/gadget/udc/core.c)
> <(scripts/get_maintainer.pl drivers/usb/gadget/udc/core.c)
>
> Looks like scripts/get_maintainer.pl (a) shows wrong committers (they
> did provide other e.g. Reviewed-by tags), and (b) is not deterministic?
>
> Thanks!
>
> Gr{oetje,eeting}s,
>
> Geert
>