[PATCH 00/18] Several kdoc fixes

From: Mauro Carvalho Chehab

Date: Mon Mar 02 2026 - 11:57:00 EST


Hi Jon,

This series contains patches from:
https://lore.kernel.org/linux-doc/87sear2kbm.fsf@xxxxxxxxxxxxxx/T/#t

I rebased them to make the changes cleaner, fixing mostly on fixes.

I dropped stuff related to NestedMatch arguments parsing.
I'll be sending you on a new patch series, likely tomorrow.

The changes here basically addresses several issues discoverd by
Randy and by me and makes NestedMatch more similar to KernRe.

It also moves the transforms ruleset to a separate file, to make
easier to maintain kernel-doc code.

Mauro Carvalho Chehab (16):
docs: kdoc_re: add support for groups()
docs: kdoc_re: don't go past the end of a line
docs: kdoc_parser: move var transformers to the beginning
docs: kdoc_parser: don't mangle with function defines
docs: kdoc_parser: fix variable regexes to work with size_t
docs: kdoc_parser: fix the default_value logic for variables
docs: kdoc_parser: don't exclude defaults from prototype
docs: kdoc_parser: fix parser to support multi-word types
docs: kdoc_parser: add support for LIST_HEAD
docs: kdoc_re: better show KernRe() at documentation
docs: kdoc_parser: move transform lists to a separate file
docs: kdoc_re: handle strings and escape chars on NextMatch
docs: kdoc_re: don't recompile NestedMatch regex every time
docs: kdoc_re: Change NestedMath args replacement to \0
docs: kdoc_re: make NestedMatch use KernRe
docs: kdoc_parser: move nested match transforms to xforms_lists.py

Randy Dunlap (2):
docs: kdoc_parser: handle struct member macro
VIRTIO_DECLARE_FEATURES(name)
docs: xforms_lists: ignore context analysis and lock attributes

Documentation/tools/kdoc_parser.rst | 8 ++
tools/lib/python/kdoc/kdoc_files.py | 3 +-
tools/lib/python/kdoc/kdoc_parser.py | 172 +++-----------------------
tools/lib/python/kdoc/kdoc_re.py | 115 +++++++++++++----
tools/lib/python/kdoc/xforms_lists.py | 170 +++++++++++++++++++++++++
5 files changed, 286 insertions(+), 182 deletions(-)
create mode 100644 tools/lib/python/kdoc/xforms_lists.py

--
2.52.0