summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/kdoc_parser.py
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-09-30 13:10:26 +0100
committerMark Brown <broonie@kernel.org>2026-09-30 13:10:26 +0100
commitfb3b8808dfbf9b41df01e90c68c40a9757cb7694 (patch)
tree4785d0b0f432421ac07170024f9bce6579c5a54e /tools/lib/python/kdoc/kdoc_parser.py
parent7e30ac5f377ce1bbcd2645013e754b7b36cea9fd (diff)
parent2d72a4c09867a8f9131afc2e705a728f9fba2417 (diff)
downloadlinux-next-fb3b8808dfbf9b41df01e90c68c40a9757cb7694.tar.gz
linux-next-fb3b8808dfbf9b41df01e90c68c40a9757cb7694.zip
Merge branch 'docs-next' of git://git.lwn.net/linux.git
Diffstat (limited to 'tools/lib/python/kdoc/kdoc_parser.py')
-rw-r--r--tools/lib/python/kdoc/kdoc_parser.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/lib/python/kdoc/kdoc_parser.py b/tools/lib/python/kdoc/kdoc_parser.py
index d9ad1ddc87dd..80d4245acd17 100644
--- a/tools/lib/python/kdoc/kdoc_parser.py
+++ b/tools/lib/python/kdoc/kdoc_parser.py
@@ -831,6 +831,13 @@ class KernelDoc:
#
source = source
proto = trim_private_members(proto)
+
+ #
+ # Expand macro-based declarations, like context_lock_struct(),
+ # into a plain struct/union declaration before splitting it,
+ # as dump_var() and dump_function() already do.
+ #
+ proto = self.xforms.apply("struct", proto)
struct_parts = self.split_struct_proto(proto)
if not struct_parts:
self.emit_msg(ln, f"{proto} error: Cannot parse struct or union!")
@@ -841,10 +848,6 @@ class KernelDoc:
self.emit_msg(ln, f"expecting prototype for {decl_type} {self.entry.identifier}. "
f"Prototype was for {decl_type} {declaration_name} instead")
return
- #
- # Go through the list of members applying all of our transformations.
- #
- members = self.xforms.apply("struct", members)
#
# Deal with embedded struct and union members, and drop enums entirely.