]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
docs: kdoc_parser: add support for LIST_HEAD
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 2 Mar 2026 16:40:52 +0000 (17:40 +0100)
committerJonathan Corbet <corbet@lwn.net>
Tue, 3 Mar 2026 17:47:24 +0000 (10:47 -0700)
Convert LIST_HEAD into struct list_head when handling its
prototype.

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: <8bdfa6ba6002b0a73a83660f0ce7b40e30124552.1772469446.git.mchehab+huawei@kernel.org>

tools/lib/python/kdoc/kdoc_parser.py

index 22a820d33dc8ced43d3a5d1e61b1f3876b05777b..1df869061bf3747330c0eb70c129dac0104fa37d 100644 (file)
@@ -198,6 +198,7 @@ function_xforms = [
 var_xforms = [
     (KernRe(r"__read_mostly"), ""),
     (KernRe(r"__ro_after_init"), ""),
+    (KernRe(r"LIST_HEAD\(([\w_]+)\)"), r"struct list_head \1"),
     (KernRe(r"(?://.*)$"), ""),
     (KernRe(r"(?:/\*.*\*/)"), ""),
     (KernRe(r";$"), ""),