From: Jani Nikula <jani.nikula@intel.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
Jonathan Corbet <corbet@lwn.net>
Cc: ksummit-discuss@lists.linuxfoundation.org, ksummit@lists.linux.dev
Subject: Re: [Ksummit-discuss] [TECH TOPIC] What kernel documentation could be
Date: Thu, 23 Jun 2022 12:18:50 +0300 [thread overview]
Message-ID: <875ykrrb45.fsf@intel.com> (raw)
In-Reply-To: <20220618092447.5ebed314@sal.lan>
On Sat, 18 Jun 2022, Mauro Carvalho Chehab <mchehab@kernel.org> wrote:
> The big missing feature on Sphinx itself is with regards to per-C-type
> domain. So, if we have one struct and one function both called "foo",
> the cross-references will be broken. This issue is known since Sphinx
> 3.1, and there are already patches fixing it since then (I remember
> testing them) but, up to today, the Sphinx upstream patches meant
> to fix it weren't applied yet (as far as I can tell).
https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#namespacing
Integrating that needs to be done carefully, though, to not make a mess
of it.
> One thing that probably be solved on a different way is to have
> a better solution for things like:
>
> Functions for feature 1
> =======================
>
> .. kernel-doc:: include/some_header.h
> :doc: Feature 1
>
> .. kernel-doc:: include/some_header.h
> :functions:
> func1
> func2
>
> Functions for feature 2
> =======================
>
> .. kernel-doc:: include/some_header.h
> :doc: Feature 2
>
> .. kernel-doc:: include/some_header.h
> :functions:
> func3
> func4
Yeah, currently that leads to parsing the header four times by
kernel-doc the script. The solution would be to finally convert the
script to a proper python Sphinx extension that can do caching. (This is
how it works in Hawkmoth, FWIW.)
> Perhaps we could change Kernel-doc in a way that doing just:
>
> .. kernel-doc:: include/some_header.h
>
> would be enough.
The order in nicely flowing documentation is not necessarily the same as
the order in nicely flowing source code. I expect it to be much more
acceptable to tweak the rst to achieve this than to do source code
rearrangement to generate nice documentation.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2022-06-23 9:18 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-17 20:57 [TECH TOPIC] What kernel documentation could be Jonathan Corbet
2022-06-17 20:57 ` [Ksummit-discuss] " Jonathan Corbet
2022-06-17 21:48 ` Laurent Pinchart
2022-06-17 21:48 ` Laurent Pinchart
2022-06-27 15:18 ` Jonathan Corbet
2022-06-18 8:24 ` Mauro Carvalho Chehab
2022-06-18 8:24 ` Mauro Carvalho Chehab
2022-06-18 11:03 ` Miguel Ojeda
2022-06-18 11:16 ` Mauro Carvalho Chehab
2022-06-18 11:16 ` Mauro Carvalho Chehab
2022-06-18 14:37 ` Miguel Ojeda
2022-06-23 9:18 ` Jani Nikula [this message]
2022-06-23 9:57 ` Mauro Carvalho Chehab
2022-06-23 10:30 ` Jani Nikula
2022-06-23 13:40 ` Jonathan Corbet
2022-06-24 7:33 ` Mauro Carvalho Chehab
2022-06-24 16:37 ` Markus Heiser
2022-06-27 15:27 ` Jonathan Corbet
2022-06-27 15:31 ` Christoph Hellwig
2022-06-28 7:43 ` Mauro Carvalho Chehab
2022-06-28 7:57 ` Geert Uytterhoeven
2022-06-28 11:01 ` Mauro Carvalho Chehab
2022-07-02 12:43 ` Stephen Rothwell
2022-06-24 22:57 ` Jonathan Corbet
2022-06-25 9:10 ` Mauro Carvalho Chehab
2022-06-25 14:00 ` Jonathan Corbet
2022-06-25 18:11 ` Linus Torvalds
2022-06-26 7:55 ` Mauro Carvalho Chehab
2022-06-26 9:26 ` Mauro Carvalho Chehab
2022-06-26 9:53 ` Mauro Carvalho Chehab
2022-06-27 15:28 ` Liam Howlett
2022-06-27 15:54 ` Christian Brauner
2022-06-27 16:27 ` Mark Brown
2022-06-28 10:53 ` Mauro Carvalho Chehab
2022-06-28 16:13 ` Luck, Tony
2022-06-27 15:34 ` Jonathan Corbet
2022-06-27 17:07 ` Linus Torvalds
2022-07-02 10:52 ` Mauro Carvalho Chehab
2022-06-25 17:43 ` Steven Rostedt
2022-06-25 17:48 ` Laurent Pinchart
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=875ykrrb45.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=corbet@lwn.net \
--cc=ksummit-discuss@lists.linuxfoundation.org \
--cc=ksummit@lists.linux.dev \
--cc=mchehab@kernel.org \
/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).