On 2025-08-22 11:13, Alison Schofield wrote:
> On Fri, Aug 22, 2025 at 02:55:34AM +0000, marc.herb...@linux.intel.com wrote:
>> From: Marc Herbert <marc.herb...@linux.intel.com>
>>
>> This magic number must match kernel code. Make that corresponding kernel
>> code much less time-consuming to find.
> 
> The 'must match' is the important part. Include that in the comment.

Good point, will do!

> Why expect the user to parse a git describe string and go fishing.
> Just tell them it is defined in the cxl-test module.
> 

git knows how to parse back the git describe string; readers don't need
to parse anything. As explained in the commit message, it's convenient
because it holds in a single string both the immutable commit ID _and_
an indication of the minimum kernel version required.

Why tell users to "go fishing" for the cxl-test module when they can
find the location directly with a single git command.  This is real: I
actually wasted a fair amount of time searching for that constant in
drivers/cxl/ because I assumed the cxl-test driver was there. This
comment is not meant for experts; if they needed it then it would not
have been missing for so long.

Last but not least, code and files move around and get renamed. This
commit will never change, so it provides an immutable starting point in
case things change.

I'll add both, it should still fit on one line.

Reply via email to