Re: [PATCH 0/2] Move kernel-doc to tools/docs
From: Jonathan Corbet
Date: Fri Jan 16 2026 - 12:44:05 EST
Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx> writes:
> On Thu, 15 Jan 2026, Jonathan Corbet <corbet@xxxxxxx> wrote:
>> Randy Dunlap <rdunlap@xxxxxxxxxxxxx> writes:
>>
>>> On 1/15/26 7:05 AM, Jonathan Corbet wrote:
>>>> Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx> writes:
>>>>
>>>>> I think the tool source should be called kernel_doc.py or something, and
>>>>> scripts/kernel-doc should be a script running the former.
>>>>
>>>> I honestly don't get it - why add an extra indirection step here?
>>>
>>> a. compatibility with people in the wild running scripts/kernel-doc
>>
>> That is easily achieved with a symbolic link if we need it.
>>
>>> b. adhere to well-known naming conventions.
>>
>> The normal convention is to not have language-specific extensions on
>> commands. As in "scripts/kernel-doc". I still don't understand how
>> making a wrapper script somehow makes this better.
>
> kernel-doc the python source directly messing with sys.path is not
> great. The python source should be able to assume the environment has
> been set up, imports work, etc.
I agree that's not great. We could of course fix that up in the
makefile; the sys.path manipulation is only for standalone runs.
> The wrapper script is the stable interface that can hide the actual
> location and structure of the python packages and sources, and set up
> the python environment.
I suppose. I sort of see the existing kernel-doc as *being* the wrapper
script.
> While I'm not suggesting to package kernel-doc for pypi, I think
> structuring it in a way that it could be is a fairly good guideline for
> managing the source. And I feel like all the other refactoring and
> relocation is already taking us in this direction.
So I guess my feeling is that if somebody really wants to implement that
extra level of indirection, we can consider it. I won't dig in my heels
*too* deeply. But it's a separate change from moving the tool, so
should be done on its own.
Thanks,
jon