Re: [PATCH v5] checkpatch: check for missing Fixes tags

From: Thorsten Leemhuis
Date: Wed Jun 12 2024 - 05:16:03 EST


On 12.06.24 10:49, Dan Carpenter wrote:
> On Wed, Jun 12, 2024 at 08:46:24AM +0200, Thorsten Leemhuis wrote:
>> On 11.06.24 20:38, Andrew Morton wrote:
>>> On Tue, 11 Jun 2024 16:43:29 +0300 Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
>>>
>>>> This check looks for common words that probably indicate a patch
>>>> is a fix. For now the regex is:
>>>>
>>>> (?:(?:BUG: K.|UB)SAN: |Call Trace:|stable\@|syzkaller)/)
>>>>
>>>> Why are stable patches encouraged to have a fixes tag? Some people mark
>>>> their stable patches as "# 5.10" etc. This is useful but a Fixes tag is
>>>> still a good idea.
>>>
>>> I'd say that "# 5.10" is lame
>>
>> Documentation/process/stable-kernel-rules.rst documents this use to
>> "Point out kernel version prerequisites".
>
> No, the 5.10 means that the fix is required for everything after 5.10.
> Here is how you reference pre-requisites.
>
> Cc: <stable@xxxxxxxxxxxxxxx> # 3.3.x: a1f84a3: sched: Check for idle
> Cc: <stable@xxxxxxxxxxxxxxx> # 3.3.x: 1b9508f: sched: Rate-limit newidle
> Cc: <stable@xxxxxxxxxxxxxxx> # 3.3.x: fd21073: sched: Fix affinity logic

That format according to the docs is to "Specify any additional patch
prerequisites for cherry picking", but cherry picking might not be what
the maintainer wants.

Anyway, I won't commit on this further and from here will leave this to
Greg, that's best at this point, it's his domain.

> But as a distro maintainer it's much nicer to have a Fixes:
> 123412341234 ("Add new wifi driver").

I see your point and agree that it would be nice to have. At the same
time I've seen people on the lists that don't like to use the Fixes: tag
when nothing is "fixed". And it would be an additional burden for
developers to look the commit-id up. So it could contribute to the
"checkpatch is asking too much here and not worth the trouble" stance
I've seen a few times (to which I contributed myself... :-/ ).

Ciao, Thorsten