linux/tools/lib/python
Omokefe Emmanuel Onanaroghene 2d72a4c098 docs: kdoc: parse context_lock_struct() as struct declaration
kernel-doc fails to parse struct declarations wrapped in
context_lock_struct(), e.g. struct debugfs_cancellation:

  include/linux/debugfs.h:245 ... error: Cannot parse struct or union!

Add a struct transform that expands context_lock_struct() to a plain
struct declaration, and apply the struct transforms to the whole
declaration before split_struct_proto(), matching what dump_var() and
dump_function() already do for their prototypes. The member-only
transform in dump_struct() is then redundant.

Add a regression test for the debugfs_cancellation declaration.

Fixes: 6e530e2e31 ("debugfs: Make debugfs_cancellation a context lock struct")
Signed-off-by: Omokefe Emmanuel Onanaroghene <emmaonana18@gmail.com>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260925234054.128477-1-emmaonana18@gmail.com>
2026-09-29 16:59:29 -06:00
..
abi docs: python: abi_regex: convert adjacent index placeholders 2026-08-11 10:36:28 -06:00
feat docs: parse_features: make documentation more consistent 2026-01-23 11:37:39 -07:00
kdoc docs: kdoc: parse context_lock_struct() as struct declaration 2026-09-29 16:59:29 -06:00
__init__.py
jobserver.py jobserver: Fix typo in docstring 2026-03-17 08:43:39 -06:00
unittest_helper.py tools: unittest_helper: add a quiet mode 2026-03-30 10:54:13 -06:00