Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+7 -1
+7 -1
scripts/lib/kdoc/kdoc_parser.py
··· 568 568 569 569 bitfield_re = KernRe(r'(.*?):(\w+)') 570 570 for param in args: 571 + # 572 + # For pointers, shift the star(s) from the variable name to the 573 + # type declaration. 574 + # 571 575 r = KernRe(r'^(\*+)\s*(.*)') 572 576 if r.match(param): 573 577 self.push_parameter(ln, decl_type, r.group(2), 574 578 f"{dtype} {r.group(1)}", 575 579 arg, declaration_name) 576 - 580 + # 581 + # Perform a similar shift for bitfields. 582 + # 577 583 elif bitfield_re.search(param): 578 584 if dtype != "": # Skip unnamed bit-fields 579 585 self.push_parameter(ln, decl_type, bitfield_re.group(1),