History

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.

Mauro Carvalho Chehab committed 8 months ago

Commit 9bbf22b1 parent 4fd349f1 file · +2 −2Browse files

Showing the changes to tools/lib/python (1 of 1 file). Show all

Unified · Split

tools/lib/python/kdoc/kdoc_parser.py+2−2
@@ -1027,9 +1027,9 @@ class KernelDoc: · 1026 unmodified lines
1027 default_val = r.group(2)1027 default_val = r.group(2)
1028 else:1028 else:
1029 r= KernRe(OPTIONAL_VAR_ATTR + r"(?:[\w_]*)?\s+(?:\*+)?(?:[\w_]+)\s*[\d\]\[]*\s*(=.*)?")1029 r= KernRe(OPTIONAL_VAR_ATTR + r"(?:[\w_]*)?\s+(?:\*+)?(?:[\w_]+)\s*[\d\]\[]*\s*(=.*)?")
1030 if r.match(proto):
1031 default_val = r.group(1)
1032 1030
1031 if r.match(proto):
1032 default_val = r.group(1)
1033 if not declaration_name:1033 if not declaration_name:
1034 self.emit_msg(ln,f"{proto}: can't parse variable")1034 self.emit_msg(ln,f"{proto}: can't parse variable")
1035 return1035 return

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t