]> git.ipfire.org Git - thirdparty/linux.git/commit
docs: kdoc: move the prefix transforms out of dump_struct()
authorJonathan Corbet <corbet@lwn.net>
Thu, 7 Aug 2025 21:16:31 +0000 (15:16 -0600)
committerJonathan Corbet <corbet@lwn.net>
Mon, 11 Aug 2025 16:25:42 +0000 (10:25 -0600)
commit64cf83bcd3217a9583caeb404ff136366a46705c
tree1790094f9854a46d2a0226e230bba7bccf2c9e5e
parent5fd513f01169ae93d202b8c30f0837096664e7d7
docs: kdoc: move the prefix transforms out of dump_struct()

dump_struct is one of the longest functions in the kdoc_parser class,
making it hard to read and reason about.  Move the definition of the prefix
transformations out of the function, join them with the definition of
"attribute" (which was defined at the top of the file but only used here),
and reformat the code slightly for shorter line widths.

Just code movement in the end.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250807211639.47286-5-corbet@lwn.net
scripts/lib/kdoc/kdoc_parser.py