[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1811170902330.2558@hadrien>
Date: Sat, 17 Nov 2018 09:03:46 -0800 (PST)
From: Julia Lawall <julia.lawall@...6.fr>
To: Rob Herring <robherring2@...il.com>
cc: Joe Perches <joe@...ches.com>, Jani Nikula <jani.nikula@...el.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
ksummit-discuss@...ts.linuxfoundation.org,
linux-nvdimm <linux-nvdimm@...ts.01.org>,
vishal.l.verma@...el.com,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Dmitry Vyukov <dvyukov@...gle.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
stfrench@...rosoft.com, "Tobin C. Harding" <me@...in.cc>
Subject: Re: [Ksummit-discuss] [RFC PATCH 2/3] MAINTAINERS, Handbook: Subsystem
Profile
On Sat, 17 Nov 2018, Rob Herring wrote:
> On Fri, Nov 16, 2018 at 11:57 AM Joe Perches <joe@...ches.com> wrote:
> >
> > On Fri, 2018-11-16 at 14:44 +0200, Jani Nikula wrote:
> > > I quickly cooked up this script to produce the top-5 commit prefixes for
> > > the given files over the arbitrary last 200 commits. It'll give you a
> > > pretty good idea if you're even close.
> > >
> > > ---
> > > #!/bin/sh
> > > # usage: subject-prefix FILE [...]
> > > # show top 5 subject prefixes for FILEs
> > >
> > > git log --format=%s -n 200 -- "$@" |\
> > > grep -v "^Merge " |\
>
> --no-merges in git log can replace this line.
>
> > > sed 's/\(.*\):.*/\1/' |\
> > > sort | uniq -c | sort -nr | sed 's/ *[0-9]\+ //' |\
> > > head -n 5
> > > ---
> > >
> > > Someone who knows perl could turn that into a checkpatch check: See if
> > > the patch subject prefix is one of the top-5 for all files changed by
> > > the patch, and ask the user to double check if it isn't. Or some
> > > heuristics thereof.
> >
> > This won't work when a patch contains multiple files
> > from different paths, or even multiple files from a
> > single driver.
>
> Different paths is often, but not always a sign that patches may need
> to be split up. Maybe that is something checkpatch should point out.
Between v4.0 and v4.19, 18% of commits touch multiple .c files. 35% of
commits touch multiple files in general.
julia
>
> > Perhaps it's better to use a generic mechanism like
> >
> > basename $(dirname $filename):
> >
> > with some exceptions and add an override patch subject
> > grammar to appropriate various sections of MAINTAINERS.
>
> Perhaps just use the script as a starting point to populate
> MAINTAINERS as it may never be that accurate.
>
> > I also think it's better to use a separate script like
> > scripts/spdxcheck.py and tie any necessary checkpatch
> > use to that script.
>
> Yes, checkpatch is getting pretty unwieldy.
>
> Rob
>
Powered by blists - more mailing lists