Re: [PATCH 0/4] checkpatch: improve exit criterias
From: Joe Perches
Date: Tue Nov 10 2026 - 10:12:36 EST
On Tue, 2026-11-10 at 07:42 -0600, Bjorn Andersson wrote:
> On Sun, Nov 8, 2026 at 3:04 AM Joe Perches <joe@xxxxxxxxxxx> wrote:
> >
> > On Sun, 2026-11-08 at 04:21 +0000, Bjorn Andersson wrote:
> > > When invoking checkpatch with the --mailback argument over a range of
> > > patches the tool unexpectedly exits successfully on the first clean
> > > patch. For example:
> > >
> > > ./scripts/checkpatch.pl --mailback --git v7.3-rc1..
> >
> > Why is it useful to do this?
>
> My use case is that I create a maintainer branch off e.g. v7.3-rc1
> (now v7.4-rc1), then apply a bunch of patches and before pushing that
> out I run "checkpatch.pl --strict v7.3-rc1..".
I think the description for mailback should be changed to
be used only for a single commit as this proposal would
otherwise change the exit condition for the single use case no?
> But this is quite noisy, and the compressed "b4 prep --check" output
> is more what I'm looking for.
My b4 version is 0.14.3 and the man b4 for prep doesn't include
a --check option or description so I don't know what that output
looks like.
> So, I borrowed the "checkpatch.pl -q
> --terse --no-summary --mailback --showfile" from there and it took me
> a while to realize the difference between:
>
> --mailback only produce a report in case of warnings/errors
>
> and "don't produce a report if the first commit is good".
So perhaps just don't use --mailback?
And remove the --showfile so checkpatch adds the git commit id
to the output and maybe add a front end little script to do
the git commit id to commit subject to make it easier to detect
what commit might need updating?