Re: [PATCH] docs: kdoc: fix struct_group_tagged() parsing regression

From: Omokefe Emmanuel Onanaroghene

Date: Sat Sep 26 2026 - 07:35:51 EST


Hi Randy,

> Would something similar to this work for this warning?

Thanks for looking into this — and for spotting that warning in the
first place.

> Warning: include/linux/debugfs.h:246 context_lock_struct(debugfs_cancellation) { struct list_head list; void (*cancel)(struct dentry *, void *); void *cancel_data; }; error: Cannot parse struct or union!

> Even though context_lock_struct is in xforms_list.py, it's not working
> in this case (above).

If I'm reading mainline right, there's no
context_lock_struct rule in xforms_lists.py yet; nothing in the kdoc
tooling handles the macro at all. I hadn't seen your message before —
the rule is something I'm adding in my follow-up patch "[PATCH] docs:
kdoc: parse context_lock_struct() as struct declaration", which is
currently in review in a separate thread.

That's why the warning shows up: there is no transform to run, and even
with one in place the struct transforms wouldn't fire, since
dump_struct() applies them only to the members after
split_struct_proto() — which rejects context_lock_struct(...) first.
So something similar to the struct_group_tagged fix would be part of it
(the rule itself), but it also needs the transforms applied to the whole
declaration before split_struct_proto(), the same way dump_var() and
dump_function() already do. That's what the patch does.

Thanks,

Onana