Re: [PATCH 0/2] Move kernel-doc to tools/docs
From: Randy Dunlap
Date: Wed Jan 14 2026 - 14:20:22 EST
On 1/14/26 8:41 AM, Jonathan Corbet wrote:
> All of the documentation-related tools have been gathered together in
> tools/docs, with one exception: kernel-doc still lives under scripts/.
> Move it to its proper home, fixing up a fair number of references along the
> way.
>
> This move was delayed because it ran afoul of one other relatively recent
> change. With the conversion of kernel-doc to Python, the Sphinx kerneldoc
> extension gained the ability to import the relevant modules directly, but
> it also kept the option of running kernel-doc as a separate process. To
> decide which course to take, the extension looks at the kerneldoc_bin
> configuration setting; if that setting ends with "kernel-doc.py", it
> chooses the import method.
>
> Some of us found that behavior a bit obscure. It also complicated the task
> of moving scripts/kernel-doc.py to tools/docs/kernel-doc. I tried a couple
> of ways of preserving this behavior but ended up with solutions that were
> just as obscure.
>
> So I took a different approach. In the end, the ability to run kernel-doc
> as a separate process does not buy us much. For debugging purposes, it's
> easier to just run kernel-doc by hand directly. So this series simply
> removes that capability, simplifying the logic and removing a bunch of
> code. The code that creates the command line remains in case anybody
> should ever want a specific invocation to run by hand.
>
> Jonathan Corbet (2):
> docs: kdoc: remove support for an external kernel-doc from sphinx
> Move kernel-doc to tools/docs
I do many of these on a regular basis:
$ ./scripts/kernel-doc -none -Wall <path_to_source_file>
Will I still be able to do that (by using ./tools/doc/kernel-doc ...)?
--
~Randy