mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
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
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user