From: Randy Dunlap <rdunlap@infradead.org>
To: Karl Mehltretter <kmehltretter@gmail.com>,
Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <skhan@linuxfoundation.org>,
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
Dongliang Mu <dzm91@hust.edu.cn>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] docs: parse-headers: Fix script name and stale Makefile reference
Date: Fri, 4 Sep 2026 20:54:36 -0700 [thread overview]
Message-ID: <58d769f8-7378-4f8e-9bf1-b33ef5bf8ca3@infradead.org> (raw)
In-Reply-To: <20260905025821.83968-1-kmehltretter@gmail.com>
On 9/4/26 7:58 PM, Karl Mehltretter wrote:
> The script is tools/docs/parse-headers.py, not parse_headers.py, and its
> FILE_RULES argument is optional. Commit 8a298579cdfc ("scripts:
> sphinx-build-wrapper: get rid of uapi/media Makefile") removed the
> Makefile the text points to as an example; the cross-references are now
> generated by the kernel-include directive, so point to a file that uses
> it.
>
> Fixes: d69a03a97a2d ("docs: doc-guide: parse-headers.rst update its documentation")
> Fixes: 8a298579cdfc ("scripts: sphinx-build-wrapper: get rid of uapi/media Makefile")
> Assisted-by: LLM
> Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
I would like to see documentation for kernel-include added to
Documentation/doc-guide/kernel-doc.rst or doc-guide/parse-headers.rst.
I'm surprised that it's there already.
Thanks.
> ---
> Documentation/doc-guide/parse-headers.rst | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/Documentation/doc-guide/parse-headers.rst b/Documentation/doc-guide/parse-headers.rst
> index a7bb01ff04eb..eb36c92e9a06 100644
> --- a/Documentation/doc-guide/parse-headers.rst
> +++ b/Documentation/doc-guide/parse-headers.rst
> @@ -8,26 +8,27 @@ between the code and the documentation. Adding cross-references for
> userspace API files has an additional advantage: Sphinx will generate warnings
> if a symbol is not found at the documentation. That helps to keep the
> uAPI documentation in sync with the Kernel changes.
> -The :ref:`parse_headers.py <parse_headers>` provides a way to generate such
> -cross-references. It has to be called via Makefile, while building the
> -documentation. Please see ``Documentation/userspace-api/media/Makefile`` for an example
> -about how to use it inside the Kernel tree.
> +The :ref:`parse-headers.py <parse_headers>` provides a way to generate such
> +cross-references. During the documentation build, the same parser is used by
> +the ``kernel-include`` directive with the ``:generate-cross-refs:`` option.
> +Please see ``Documentation/userspace-api/media/cec/cec-header.rst`` for an
> +example about how to use it inside the Kernel tree.
>
> .. _parse_headers:
>
> -tools/docs/parse_headers.py
> +tools/docs/parse-headers.py
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> NAME
> ****
>
> -parse_headers.py - parse a C file, in order to identify functions, structs,
> +parse-headers.py - parse a C file, in order to identify functions, structs,
> enums and defines and create cross-references to a Sphinx book.
>
> USAGE
> *****
>
> -parse-headers.py [-h] [-d] [-t] ``FILE_IN`` ``FILE_OUT`` ``FILE_RULES``
> +parse-headers.py [-h] [-d] [-t] ``FILE_IN`` ``FILE_OUT`` [``FILE_RULES``]
>
> SYNOPSIS
> ********
--
~Randy
next prev parent reply other threads:[~2026-09-05 3:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-05 2:58 Karl Mehltretter
2026-09-05 3:54 ` Randy Dunlap [this message]
2026-09-07 16:02 ` Jonathan Corbet
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=58d769f8-7378-4f8e-9bf1-b33ef5bf8ca3@infradead.org \
--to=rdunlap@infradead.org \
--cc=corbet@lwn.net \
--cc=dzm91@hust.edu.cn \
--cc=kmehltretter@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab+huawei@kernel.org \
--cc=skhan@linuxfoundation.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
all inboxes | Powered by JetHome®