mirror of
https://github.com/torvalds/linux.git
synced 2026-04-22 16:53:59 -04:00
docs: kdoc_parser: fix the default_value logic for variables
The indentation is wrong for the second regex, which causes problems on variables with defaults. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <681f18338abd6ae33cb9c15d72bb31a1cba75a9a.1772469446.git.mchehab+huawei@kernel.org>
This commit is contained in:
committed by
Jonathan Corbet
parent
4fd349f03d
commit
9bbf22b87d
@@ -1027,9 +1027,9 @@ class KernelDoc:
|
||||
default_val = r.group(2)
|
||||
else:
|
||||
r= KernRe(OPTIONAL_VAR_ATTR + r"(?:[\w_]*)?\s+(?:\*+)?(?:[\w_]+)\s*[\d\]\[]*\s*(=.*)?")
|
||||
if r.match(proto):
|
||||
default_val = r.group(1)
|
||||
|
||||
if r.match(proto):
|
||||
default_val = r.group(1)
|
||||
if not declaration_name:
|
||||
self.emit_msg(ln,f"{proto}: can't parse variable")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user