The indentation is wrong for the second regex, which causes problems on variables with defaults.
Showing the changes to tools/lib/python (1 of 1 file). Show all
Unified · Split
| @@ -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 | return | 1035 | return |