Re: [PATCH v4] scripts/kernel-doc: Detect mismatched inline member documentation tags
From: Jonathan Corbet
Date: Fri May 15 2026 - 10:42:47 EST
Shuicheng Lin <shuicheng.lin@xxxxxxxxx> writes:
> Add validation in check_sections() to verify that inline member
> documentation tags (/** @member: description */) match actual struct/union
> member names. Previously, kernel-doc only validated section headers against
> the parameter list, but inline doc tags stored in parameterdescs were never
> cross-checked, allowing stale or mistyped member names to go undetected.
>
> The new check iterates over parameterdescs keys and warns about any that
> don't appear in the parameter list, catching issues like renamed struct
> members where the documentation tag was not updated to match.
>
> This catches real issues such as:
> - xe_bo_types.h: @atomic_access (missing struct prefix, should be
> @attr.atomic_access)
> - xe_device_types.h: @usm.asid (member is actually asid_to_vm)
Sigh ... naturally this adds a number of docs-build warnings, but they
do seem to be legit. So I've applied it, thanks.
In the future, please copy the maintainer(s) on your patches;
scripts/get_maintainer.pl should have told you to do that. I almost
missed this one entirely.
jon