]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
kernel-doc: add support for handling global variables
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 16 Dec 2025 14:26:12 +0000 (15:26 +0100)
committerJonathan Corbet <corbet@lwn.net>
Mon, 22 Dec 2025 21:43:25 +0000 (14:43 -0700)
commit1045ec382c6019b63cab24428783749a1cecc439
tree47af8f5d27e1a9f31222e6bb888b9d342ac3075a
parent82e87387f6e2af9f69a7528733e953fd22e815aa
kernel-doc: add support for handling global variables

Specially on kAPI, sometimes it is desirable to be able to
describe global variables that are part of kAPI.

Documenting vars with Sphinx is simple, as we don't need
to parse a data struct. All we need is the variable
declaration and use native C domain ::c:var: to format it
for us.

Add support for it.

Link: https://lore.kernel.org/linux-doc/491c3022-cef8-4860-a945-c9c4a3b63c09@infradead.org/T/#m947c25d95cb1d96a394410ab1131dc8e9e5013f1
Suggested-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <fa7d1c61a8de9150f71b318382f1507d3b13848d.1765894964.git.mchehab+huawei@kernel.org>
tools/lib/python/kdoc/kdoc_output.py
tools/lib/python/kdoc/kdoc_parser.py