]> www.infradead.org Git - users/hch/misc.git/commitdiff
docs: kdoc: a few final dump_struct() touches
authorJonathan Corbet <corbet@lwn.net>
Thu, 7 Aug 2025 21:16:39 +0000 (15:16 -0600)
committerJonathan Corbet <corbet@lwn.net>
Mon, 11 Aug 2025 16:25:43 +0000 (10:25 -0600)
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
scripts/lib/kdoc/kdoc_parser.py

index 878fbfab4ac755158ae30b5eedd568f83514c202..9b21fb86709a2e68d851882296794ab20b7b2d3e 100644 (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)