Re: [PATCH -next 004/491] PERFORMANCE EVENTS SUBSYSTEM: Use fallthrough;

From: Joe Perches
Date: Thu Mar 12 2020 - 02:16:48 EST


On Wed, 2020-03-11 at 16:30 +0100, Peter Zijlstra wrote:
> On Tue, Mar 10, 2020 at 09:51:18PM -0700, Joe Perches wrote:
> > Convert the various uses of fallthrough comments to fallthrough;
> >
> > Done via script
> > Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
> >
> > Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
>
> The subject can use a little less screaming, but the actual patch is
> fine.

Patch subject come from the MAINTAINERS subsystem/section heading
because I don't see a better way to script the patch subject that
is more effective.

Using something like:

$ cat get_patch_subject_prefix.bash
#!/bin/bash
git log --format="%s" --no-merges -200 --since=2-years-ago $@ | \
cut -f1 -d":" | \
sort | uniq -c | sort -rn | head -1 | \
sed 's/^[[:space:]]*[[:digit:]]*[[:space:]]*//'
$

Does well for some sets of files, less well for others.

For instance:

$ ./get_patch_subject_prefix.bash drivers/net/ethernet/intel/
ice

which is just one of 10 or so subsystems of intel/...

And there's no way I'm going to individually edit
~500 patches for every specific maintainer's preference.