mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-07 18:40:10 +00:00
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
This commit is contained in:
@@ -545,12 +545,14 @@ class KernelDoc:
|
||||
arg, declaration_name)
|
||||
|
||||
elif arg:
|
||||
#
|
||||
# Clean up extraneous spaces and split the string at commas; the first
|
||||
# element of the resulting list will also include the type information.
|
||||
#
|
||||
arg = KernRe(r'\s*:\s*').sub(":", arg)
|
||||
arg = KernRe(r'\s*\[').sub('[', arg)
|
||||
|
||||
args = KernRe(r'\s*,\s*').split(arg)
|
||||
if args[0] and '*' in args[0]:
|
||||
args[0] = re.sub(r'(\*+)\s*', r' \1', args[0])
|
||||
args[0] = re.sub(r'(\*+)\s*', r' \1', args[0])
|
||||
|
||||
first_arg = []
|
||||
r = KernRe(r'^(.*\s+)(.*?\[.*\].*)$')
|
||||
|
||||
Reference in New Issue
Block a user