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: tidy up space removal in create_parameter_list()

Remove a redundant test and add a comment describing what the space removal
is doing.

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-3-corbet@lwn.net

+5 -3
+5 -3
scripts/lib/kdoc/kdoc_parser.py
··· 545 545 arg, declaration_name) 546 546 547 547 elif arg: 548 + # 549 + # Clean up extraneous spaces and split the string at commas; the first 550 + # element of the resulting list will also include the type information. 551 + # 548 552 arg = KernRe(r'\s*:\s*').sub(":", arg) 549 553 arg = KernRe(r'\s*\[').sub('[', arg) 550 - 551 554 args = KernRe(r'\s*,\s*').split(arg) 552 - if args[0] and '*' in args[0]: 553 - args[0] = re.sub(r'(\*+)\s*', r' \1', args[0]) 555 + args[0] = re.sub(r'(\*+)\s*', r' \1', args[0]) 554 556 555 557 first_arg = [] 556 558 r = KernRe(r'^(.*\s+)(.*?\[.*\].*)$')