diff options
author | Jonathan Corbet <corbet@lwn.net> | 2025-08-14 09:40:32 -0600 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2025-08-18 10:19:19 -0600 |
commit | 8f05fbc5afb86f0d4dcae33f3cb0cda561d4d93e (patch) | |
tree | 735cf15dd3e7cfcd64001f49157139393dabb5cc /scripts/lib | |
parent | 05d72fe07242a8e4535aa52e0858f9198e668a41 (diff) |
docs: kdoc: add a couple more comments in create_parameter_list()
Make what the final code is doing a bit more clear to slow readers like me.
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250814154035.328769-5-corbet@lwn.net
Diffstat (limited to 'scripts/lib')
-rw-r--r-- | scripts/lib/kdoc/kdoc_parser.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/lib/kdoc/kdoc_parser.py b/scripts/lib/kdoc/kdoc_parser.py index 07234ce04409..29881757bf1c 100644 --- a/scripts/lib/kdoc/kdoc_parser.py +++ b/scripts/lib/kdoc/kdoc_parser.py @@ -568,12 +568,18 @@ class KernelDoc: bitfield_re = KernRe(r'(.*?):(\w+)') for param in args: + # + # For pointers, shift the star(s) from the variable name to the + # type declaration. + # r = KernRe(r'^(\*+)\s*(.*)') if r.match(param): self.push_parameter(ln, decl_type, r.group(2), f"{dtype} {r.group(1)}", arg, declaration_name) - + # + # Perform a similar shift for bitfields. + # elif bitfield_re.search(param): if dtype != "": # Skip unnamed bit-fields self.push_parameter(ln, decl_type, bitfield_re.group(1), |