mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
docs: kdoc: simplify the PROTO continuation logic
Remove the unneeded "cont" variable and tighten up the code slightly. Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250606163438.229916-2-corbet@lwn.net
This commit is contained in:
@@ -1688,7 +1688,6 @@ class KernelDoc:
|
||||
Besides parsing kernel-doc tags, it also parses export symbols.
|
||||
"""
|
||||
|
||||
cont = False
|
||||
prev = ""
|
||||
prev_ln = None
|
||||
export_table = set()
|
||||
@@ -1704,18 +1703,14 @@ class KernelDoc:
|
||||
if self.state == state.PROTO:
|
||||
if line.endswith("\\"):
|
||||
prev += line.rstrip("\\")
|
||||
cont = True
|
||||
|
||||
if not prev_ln:
|
||||
prev_ln = ln
|
||||
|
||||
continue
|
||||
|
||||
if cont:
|
||||
if prev:
|
||||
ln = prev_ln
|
||||
line = prev + line
|
||||
prev = ""
|
||||
cont = False
|
||||
prev_ln = None
|
||||
|
||||
self.config.log.debug("%d %s%s: %s",
|
||||
|
||||
Reference in New Issue
Block a user