]> Gentwo Git Trees - linux/.git/commitdiff
tools: docs: parse_data_structs.py: accept more reftypes
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 1 Oct 2025 14:49:31 +0000 (16:49 +0200)
committerJonathan Corbet <corbet@lwn.net>
Fri, 17 Oct 2025 19:56:59 +0000 (13:56 -0600)
Current regex is limited to only some c-domain reftypes.
There are several others.

Change the code to pick the name specified there.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <5c146923d1e3183893f290216fb1378954e2e540.1759329363.git.mchehab+huawei@kernel.org>

tools/docs/lib/parse_data_structs.py

index 0d537e989ea78e0a9f7805a17a83246003c881a2..25361996cd20f0e7bda8587b94fabe2739c82413 100755 (executable)
@@ -214,7 +214,7 @@ class ParseDataStructs:
 
             # Parse reference type when the type is specified
 
-            match = re.match(r"^\:c\:(data|func|macro|type)\:\`(.+)\`", new)
+            match = re.match(r"^\:c\:(\w+)\:\`(.+)\`", new)
             if match:
                 reftype = f":c:{match.group(1)}"
                 new = match.group(2)