From: sashiko-bot@kernel.org
To: "Omokefe Emmanuel Onanaroghene" <emmaonana18@gmail.com>,
intel-wired-lan@lists.osuosl.org
Subject: Re: [PATCH v4] docs: kdoc: fix struct_group_tagged() parsing regression
Date: Fri, 04 Dec 2026 21:16:35 +0000 [thread overview]
Message-ID: <sashiko-outbox-250684@kernel.org> (raw)
In-Reply-To: <20261203211616.10272-1-emmaonana18@gmail.com>
Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [Medium] docs: kdoc: struct_group_tagged() member descriptions dropped
from output
- [Medium] docs: kdoc: check_sections() hides missing prefixes on all
nested structs
- [Low] docs: kdoc: struct_group_tagged() hides undocumented member
warnings
--
commit d7d797016b310e8dcc282c86cfe920ed0b31eda8
Author: Omokefe Emmanuel Onanaroghene <emmaonana18@gmail.com>
docs: kdoc: fix struct_group_tagged() parsing regression
This commit updates the struct_group_tagged() kernel-doc transform to
preserve the struct tag and member name, relaxes check_sections() to
accept unqualified tags matching dotted member suffixes, and adds a unit
test based on struct page_pool_params.
Link: https://lore.kernel.org/all/0cf8ea5f-418f-45f0-907c-3d1ed4f03e9f@infradead.org/
> diff --git a/tools/lib/python/kdoc/kdoc_parser.py b/tools/lib/python/kdoc/kdoc_parser.py
> index ef5879b05308b..4bc36fba5fa8a 100644
> --- a/tools/lib/python/kdoc/kdoc_parser.py
> +++ b/tools/lib/python/kdoc/kdoc_parser.py
> @@ -637,7 +637,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 missing-prefix warnings for all nested structs and unions, not
just struct_group_tagged()?
This regresses commit 46d9c16115cf ("scripts/kernel-doc: Detect
mismatched inline member documentation tags"): writing @atomic_access
instead of @attr.atomic_access on an ordinary nested struct like
struct xe_bo no longer warns, while out_struct() drops the description.
It also makes the submember_exact hint path in get_suggestions_hint()
unreachable from check_sections().
> diff --git a/tools/lib/python/kdoc/xforms_lists.py b/tools/lib/python/kdoc/xforms_lists.py
> index fa380055191c5..52415ef211538 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 [1], does rewriting
struct_group_tagged() as a named nested struct drop all inner member
descriptions from the rendered documentation?
rewrite_struct_members() prefixes inner members with the group name
(such as fast.order), so push_parameter() misses the unqualified @order
in parameterdescs and marks fast.order undescribed. check_sections()
silences the warning without migrating the description.
RestFormat.out_struct() and ManFormat.out_struct() then skip those
undescribed entries, omitting 24 documented member descriptions across
the four struct_group_tagged() structs in the tree (including
struct page_pool_params).
The new TestStructGroupTagged test only asserts that warnings is empty,
so it does not catch the dropped descriptions.
[Severity: Low]
Will prefixing inner struct_group_tagged() members also hide genuine
missing-description warnings?
KernelDoc.push_parameter() only warns about undocumented members when
"." not in param, so dotted names like fast.order now bypass the
"not described" check if a member inside struct_group_tagged() lacks
kernel-doc.
[1] https://lore.kernel.org/r/179527340172.2367332.3292077208678045371@gmail.com
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261203211616.10272-1-emmaonana18@gmail.com?part=1
prev parent reply other threads:[~2026-12-04 21:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 21:16 [PATCH v4] docs: kdoc: fix struct_group_tagged() parsing regression Omokefe Emmanuel Onanaroghene
2026-12-04 2:41 ` Bagas Sanjaya
2026-12-04 21:16 ` sashiko-bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-250684@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=emmaonana18@gmail.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.