summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/xforms_lists.py
diff options
context:
space:
mode:
authorOmokefe Emmanuel Onanaroghene <emmaonana18@gmail.com>2026-09-26 00:40:54 +0100
committerJonathan Corbet <corbet@lwn.net>2026-09-29 16:59:29 -0600
commit2d72a4c09867a8f9131afc2e705a728f9fba2417 (patch)
treef1d23701d596e872ee6ad77c9547d95ee21ecbb5 /tools/lib/python/kdoc/xforms_lists.py
parentb5375eb154041e18be6f93f39e939b1a5e1283bc (diff)
downloadlinux-next-2d72a4c09867a8f9131afc2e705a728f9fba2417.tar.gz
linux-next-2d72a4c09867a8f9131afc2e705a728f9fba2417.zip
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: 6e530e2e3119 ("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>
Diffstat (limited to 'tools/lib/python/kdoc/xforms_lists.py')
-rw-r--r--tools/lib/python/kdoc/xforms_lists.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/lib/python/kdoc/xforms_lists.py b/tools/lib/python/kdoc/xforms_lists.py
index 423e2bab7667..15f6f21c7a9e 100644
--- a/tools/lib/python/kdoc/xforms_lists.py
+++ b/tools/lib/python/kdoc/xforms_lists.py
@@ -62,6 +62,7 @@ class CTransforms:
(CMatch("struct_group_attr"), r"struct { \3+ };"),
(CMatch("struct_group_tagged"), r"struct { \3+ };"),
(CMatch("__struct_group"), r"struct { \4+ };"),
+ (CMatch("context_lock_struct"), r"struct \1"),
]
#: Transforms for function prototypes.