docs: kdoc: Centralize handling of the item section list
authorJonathan Corbet <corbet@lwn.net>
Tue, 1 Jul 2025 22:47:59 +0000 (16:47 -0600)
committerJonathan Corbet <corbet@lwn.net>
Tue, 15 Jul 2025 19:43:13 +0000 (13:43 -0600)
commit8d7338752d76c3854a5c54cf7df976c539baab5b
tree29bbb3f3855df23105bb70dee66801a7a359c609
parent8d9d122915492ea6984f32e5df30cef5c582f062
docs: kdoc: Centralize handling of the item section list

The section list always comes directly from the under-construction entry
and is used uniformly.  Formalize section handling in the KdocItem class,
and have output_declaration() load the sections directly from the entry,
eliminating a lot of duplicated, verbose parameters.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
scripts/lib/kdoc/kdoc_item.py
scripts/lib/kdoc/kdoc_output.py
scripts/lib/kdoc/kdoc_parser.py