Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [Medium] docs: kdoc: struct_group_tagged() inner member docs dropped from output - [Medium] docs: kdoc: check_sections() suppresses prefix warnings on all nested structs --
commit 6115678cf3e6e19585bd8d59787433bb0d68c597 Author: Omokefe Emmanuel Onanaroghene <[email protected]> docs: kdoc: fix struct_group_tagged() parsing regression This commit preserves the struct tag and member name when transforming struct_group_tagged() in kernel-doc and allows unqualified member tags in check_sections(). Link: https://lore.kernel.org/all/[email protected]/ > diff --git a/tools/lib/python/kdoc/kdoc_parser.py > b/tools/lib/python/kdoc/kdoc_parser.py > index 80d4245acd172..54b4b7bb32de4 100644 > --- a/tools/lib/python/kdoc/kdoc_parser.py > +++ b/tools/lib/python/kdoc/kdoc_parser.py > @@ -635,7 +635,9 @@ class KernelDoc: > continue > if param_name.startswith("{unnamed_"): > continue > - if param_name in self.entry.parameterlist: > + if param_name in self.entry.parameterlist or \ > + any(actual.endswith('.' + param_name) > + for actual in self.entry.parameterlist): > continue > > hint = self.get_suggestions_hint(param_name, > self.entry.parameterlist) [Severity: Medium] As reported by TAKANO Mitsuhiro on v2 [1], does this endswith() check suppress excess-member warnings for ordinary named nested structs and unions that do not use struct_group_tagged()? When a regular nested member such as foo.bar is documented as @bar: without its struct prefix, check_sections() now skips it instead of warning and suggesting @foo.bar via get_suggestions_hint(). > diff --git a/tools/lib/python/kdoc/xforms_lists.py > b/tools/lib/python/kdoc/xforms_lists.py > index db23fb650ea85..a4c5b111d191f 100644 > --- a/tools/lib/python/kdoc/xforms_lists.py > +++ b/tools/lib/python/kdoc/xforms_lists.py > @@ -62,7 +62,7 @@ class CTransforms: > # > (CMatch("struct_group"), r"struct { \2+ };"), > (CMatch("struct_group_attr"), r"struct { \3+ };"), > - (CMatch("struct_group_tagged"), r"struct { \3+ };"), > + (CMatch("struct_group_tagged"), r"struct \1 { \3+ } \2;"), > (CMatch("__struct_group"), r"struct { \4+ };"), > (CMatch("context_lock_struct"), r"struct \1"), > ] [Severity: Medium] As reported by TAKANO Mitsuhiro on v2 [2], does rewriting struct_group_tagged() into only a named nested struct cause the inner member descriptions to be dropped from the rendered output? rewrite_struct_members() prefixes each inner member with the group name (such as fast.order), while dump_section() stores @order: in self.entry.parameterdescs under the unqualified key "order". push_parameter() then fails to find "fast.order" in parameterdescs, sets self.entry.parameterdescs["fast.order"] = self.undescribed, and skips the missing-description warning because "." is in the parameter name. Because check_sections() only suppresses the excess-member warning for "order" without copying its description to "fast.order", RestFormat.out_struct() and ManFormat.out_struct() see KernelDoc.undescribed for every inner member in parameterlist and omit all of their descriptions from the generated documentation. [1] https://lore.kernel.org/r/[email protected] [2] https://lore.kernel.org/r/[email protected] -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=1
