On Mon, 26 Oct 2026 at 09:42, Cédric Le Goater <[email protected]> wrote: > > On 10/23/26 17:23, Peter Maydell wrote: > > The checkpatch.pl script insists that Fixes tags are at the start of > > each line of its input. Although this is where they ought to be > > in the commit message, it is not where the script will see them > > in common usage patterns like > > > > git show <hash> | ./scripts/checkpatch.pl - > > ah. I didn't think of that usage ...
For the reference, I hit with `./scripts/checkpatch.pl --branch master..HEAD`. Thanks, Stefano > > > because 'git show' prefaces each line of the commit message body with > > four spaces. Allow spaces before the Fixes tag; this matches how we > > check for e.g. Signed-off-by: tags. > > > > Reported-by: Stefano Garzarella <[email protected]> > > Fixes: 910e1d41be6b2 ("scripts/checkpatch: validate Fixes: tag format and > > commit ancestry") > > Signed-off-by: Peter Maydell <[email protected]> > > --- > > I just ran into this myself today as well so wrote up the patch > > --- > > scripts/checkpatch.pl | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > > index 5df266acb17..82f62f60212 100755 > > --- a/scripts/checkpatch.pl > > +++ b/scripts/checkpatch.pl > > @@ -1889,7 +1889,7 @@ sub process { > > > > if ($line !~ /^\s*Fixes:\s+CVE/i) { > > my $tag_case = not ($tag eq "Fixes:"); > > - my $tag_space = not ($line =~ /^fixes:? > > [0-9a-f]{5,40}/i); > > + my $tag_space = not ($line =~ /^\s*fixes:? > > [0-9a-f]{5,40}/i); > > my $id_length = not ($orig_commit =~ > > /^[0-9a-f]{12,40}$/); > > my $id_case = not ($orig_commit !~ /[A-F]/); > > > > > > Reviewed-by: Cédric Le Goater <[email protected]> > > Thank for the fix, > > C. >
