From: Jani Nikula <jani.nikula@intel.com>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
Jonathan Corbet <corbet@lwn.net>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Vegard Nossum <vegard.nossum@oracle.com>,
ksummit@lists.linux.dev,
Linux Documentation <linux-doc@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Akira Yokosawa <akiyks@gmail.com>,
Bagas Sanjaya <bagasdotme@gmail.com>,
Randy Dunlap <rdunlap@infradead.org>
Subject: Re: [TECH TOPIC] Kernel documentation - update and future directions
Date: Mon, 01 Sep 2025 13:09:15 +0300 [thread overview]
Message-ID: <b452388b7796bba710790ceb5759b75ec6e57f23@intel.com> (raw)
In-Reply-To: <20250831160339.2c45506c@foz.lan>
On Sun, 31 Aug 2025, Mauro Carvalho Chehab <mchehab+huawei@kernel.org> wrote:
> It shouldn't be that hard to do the same for kernel-doc kAPI documentation:
> kernel-doc now can parse the entire tree with:
>
> $ scripts/kernel-doc .
>
> Someone can easily use it to discover the current gaps at the docs that
> have already some kernel-doc markups and identify what of them aren't
> yet placed under Documentation/ ".. kernel-doc::" markups.
>
> So, I'd say the first step here would be to ensure that 100% of the
> docs are there somewhere. Alternatively, we could place all the rest
> of functions with kernel-doc markups outside Documentation inside an
> "others/" book - or even "<subsystem>/others/", and then gradually move
> them to the right places.
I don't agree that all the kernel-docs need to be in the html build in
the first place. Some of them would be better off with a simple
non-structured comment instead. For example, most static functions. Some
of the kernel-docs are useful for the structure the format provides, but
still having them in the html build is overkill. For example, many
complex but driver specific functions.
I think the API documentation in the Sphinx build is primarily useful
for kernel generic and subsystem APIs, or overviews of
functionality. But nobody's looking at the Sphinx build for highly
specific and isolated documentation for individual structures or
functions.
I'd say emphasize quality over quantity in the Sphinx build. An
overwhelming amount of (in the big picture) insignificant API
documentation does not make for good documentation.
That said, there *are* a lot of kernel-doc comments that absolutely
should be pulled into the Sphinx build. But don't be indiscriminate
about it.
---
I think a more interesting first step would be ensuring all the
kernel-docs we do have are free of kernel-doc and rst warnings. Because
they should be, and this would make them easier to pull into the Sphinx
build as needed.
Currently we only have the kernel-doc checks in W=1 builds for .c
files.
The i915 and xe drivers have local Makefile hacks to do it for more than
just W=1 builds and also headers. The attempts to expand the header
checks to the drm subsystem, however, failed infamously.
And still none of this checks for rst. But now that kernel-doc is
python, it shouldn't be too hard. Probably needs a dependency, but it
could only depend on it when passing some --lint-rst option.
Having this in place would also reduce the churn caused by merging
broken kernel-doc. It's fast enough to be done as part of the regular
build, while most people don't run the entire Sphinx build as part of
the development flow.
BR,
Jani.
--
Jani Nikula, Intel
next prev parent reply other threads:[~2025-09-01 10:09 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87plcndkzs.fsf@trenco.lwn.net>
[not found] ` <20250828230104.GB26612@pendragon.ideasonboard.com>
[not found] ` <87wm6l0w2y.fsf@trenco.lwn.net>
2025-08-30 16:00 ` [TECH TOPIC] Kernel documentation - update and future directions Vegard Nossum
2025-08-30 22:23 ` Laurent Pinchart
2025-08-30 23:08 ` Jonathan Corbet
2025-08-31 14:03 ` Mauro Carvalho Chehab
2025-08-31 20:16 ` Jonathan Corbet
2025-09-01 6:17 ` Randy Dunlap
2025-09-01 19:27 ` Mauro Carvalho Chehab
2025-09-01 10:09 ` Jani Nikula [this message]
2025-09-01 16:51 ` Randy Dunlap
2025-09-01 17:52 ` Mark Brown
2025-09-01 18:15 ` Randy Dunlap
2025-09-01 18:20 ` Mark Brown
2025-09-01 18:25 ` Jonathan Corbet
2025-09-01 18:40 ` Mark Brown
2025-09-01 19:51 ` Jonathan Corbet
2025-09-01 22:52 ` Mauro Carvalho Chehab
2025-09-01 18:46 ` Mauro Carvalho Chehab
2025-09-01 18:52 ` Mark Brown
2025-09-01 22:56 ` Mauro Carvalho Chehab
2025-09-02 11:15 ` Mark Brown
2025-09-02 11:59 ` Mauro Carvalho Chehab
2025-09-02 12:14 ` Mauro Carvalho Chehab
2025-09-02 13:00 ` Mark Brown
2025-09-02 14:42 ` Mauro Carvalho Chehab
2025-09-02 15:15 ` Jonathan Corbet
2025-09-02 17:19 ` Mauro Carvalho Chehab
2025-09-02 18:52 ` Laurent Pinchart
2025-09-03 7:47 ` Jani Nikula
2025-09-03 10:04 ` Mauro Carvalho Chehab
2025-09-03 10:25 ` Jani Nikula
2025-09-02 18:58 ` Jonathan Corbet
2025-09-02 22:35 ` Mauro Carvalho Chehab
2025-09-03 6:29 ` Johannes Berg
2025-09-03 10:42 ` Mauro Carvalho Chehab
2025-09-03 10:45 ` Johannes Berg
2025-09-03 10:54 ` Johannes Berg
2025-09-03 14:57 ` Mauro Carvalho Chehab
2025-09-03 15:07 ` Laurent Pinchart
2025-09-03 15:17 ` Konstantin Ryabitsev
2025-09-03 15:22 ` Miguel Ojeda
2025-09-03 15:11 ` Johannes Berg
2025-09-03 15:25 ` Mauro Carvalho Chehab
2025-09-03 15:37 ` Jonathan Corbet
2025-09-03 15:52 ` Mauro Carvalho Chehab
2025-09-03 13:39 ` Mauro Carvalho Chehab
2025-09-03 13:51 ` Laurent Pinchart
2025-09-01 19:53 ` Jonathan Corbet
2025-09-01 23:15 ` Mauro Carvalho Chehab
2025-09-01 18:37 ` Mauro Carvalho Chehab
2025-09-01 19:05 ` Andrew Lunn
2025-09-01 19:17 ` Mark Brown
2025-09-02 10:42 ` Jani Nikula
2025-09-02 11:55 ` Mauro Carvalho Chehab
2025-09-02 12:07 ` Jani Nikula
2025-09-02 15:07 ` Mauro Carvalho Chehab
2025-09-01 18:26 ` Mauro Carvalho Chehab
2025-09-02 10:55 ` Jani Nikula
2025-09-02 12:04 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b452388b7796bba710790ceb5759b75ec6e57f23@intel.com \
--to=jani.nikula@intel.com \
--cc=akiyks@gmail.com \
--cc=bagasdotme@gmail.com \
--cc=corbet@lwn.net \
--cc=ksummit@lists.linux.dev \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-doc@vger.kernel.org \
--cc=mchehab+huawei@kernel.org \
--cc=mchehab@kernel.org \
--cc=rdunlap@infradead.org \
--cc=vegard.nossum@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).