summaryrefslogtreecommitdiff
path: root/scripts/lib/kdoc/kdoc_output.py
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2025-07-03 12:44:00 -0600
committerJonathan Corbet <corbet@lwn.net>2025-07-08 08:06:25 -0600
commitb8ac0259f80e12d12cc72572c097b31caf524c88 (patch)
tree4878690927f7a4579653ec55c8110d0d2998edf2 /scripts/lib/kdoc/kdoc_output.py
parent061a1c1a27c9ea7ae5d99f72b579d542e767a3e2 (diff)
docs: kdoc: rework type prototype parsing
process_proto_type() is using a complex regex and a "while True" loop to split a declaration into chunks and, in the end, count brackets. Switch to using a simpler regex to just do the split directly, and handle each chunk as it comes. The result is, IMO, easier to understand and reason about. The old algorithm would occasionally elide the space between function parameters; see struct rng_alg->generate(), foe example. The only output difference is to not elide that space, which is more correct. Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Tested-by: Akira Yokosawa <akiyks@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250703184403.274408-5-corbet@lwn.net
Diffstat (limited to 'scripts/lib/kdoc/kdoc_output.py')
0 files changed, 0 insertions, 0 deletions