mirror of
https://github.com/torvalds/linux.git
synced 2026-01-12 00:42:35 +08:00
docs: kdoc: Move a regex line in dump_struct()
The complex struct_members regex was defined far from its use; bring the two together. Remove some extraneous backslashes while making the move. Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250807211639.47286-3-corbet@lwn.net
This commit is contained in:
@@ -551,7 +551,6 @@ class KernelDoc:
|
||||
]
|
||||
|
||||
definition_body = r'\{(.*)\}\s*' + "(?:" + '|'.join(qualifiers) + ")?"
|
||||
struct_members = KernRe(type_pattern + r'([^\{\};]+)(\{)([^\{\}]*)(\})([^\{\}\;]*)(\;)')
|
||||
|
||||
# Extract struct/union definition
|
||||
members = None
|
||||
@@ -683,6 +682,7 @@ class KernelDoc:
|
||||
# So, we need to have an extra loop on Python to override such
|
||||
# re limitation.
|
||||
|
||||
struct_members = KernRe(type_pattern + r'([^\{\};]+)(\{)([^\{\}]*)(\})([^\{\};]*)(;)')
|
||||
while True:
|
||||
tuples = struct_members.findall(members)
|
||||
if not tuples:
|
||||
|
||||
Reference in New Issue
Block a user