docs: kdoc: a few final dump_struct() touches

Add a couple more comments so that each phase of the process is
now clearly marked.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250807211639.47286-13-corbet@lwn.net
This commit is contained in:
Jonathan Corbet
2025-08-07 15:16:39 -06:00
parent 23c47b0931
commit e282303e71

View File

@@ -802,14 +802,15 @@ class KernelDoc:
nested = NestedMatch()
for search, sub in struct_nested_prefixes:
members = nested.sub(search, sub, members)
# Keeps the original declaration as-is
#
# Deal with embedded struct and union members, and drop enums entirely.
#
declaration = members
members = self.rewrite_struct_members(members)
# Ignore other nested elements, like enums
members = re.sub(r'(\{[^\{\}]*\})', '', members)
#
# Output the result and we are done.
#
self.create_parameter_list(ln, decl_type, members, ';',
declaration_name)
self.check_sections(ln, declaration_name, decl_type)