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: Make body_with_blank_line parsing more flexible

The regex in the BODY_WITH_BLANK_LINE case was looking for lines starting
with " * ", where exactly one space was allowed before the following text.
There are many kerneldoc comments where the authors have put multiple
spaces instead, leading to mis-formatting of the documentation.
Specifically, in this case, the description portion is associated with the
last of the parameters.

Allow multiple spaces in this context.

See, for example, synchronize_hardirq() and how its documentation is
formatted before and after the change.

Acked-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tested-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250621203512.223189-2-corbet@lwn.net

+1 -1
+1 -1
scripts/lib/kdoc/kdoc_parser.py
··· 1309 1309 """ 1310 1310 1311 1311 if self.state == state.BODY_WITH_BLANK_LINE: 1312 - r = KernRe(r"\s*\*\s?\S") 1312 + r = KernRe(r"\s*\*\s*\S") 1313 1313 if r.match(line): 1314 1314 self.dump_section() 1315 1315 self.entry.section = SECTION_DEFAULT