docs: kdoc: remove some ineffective code
authorJonathan Corbet <corbet@lwn.net>
Fri, 6 Jun 2025 16:34:36 +0000 (10:34 -0600)
committerJonathan Corbet <corbet@lwn.net>
Mon, 9 Jun 2025 20:37:17 +0000 (14:37 -0600)
The code testing for a pointer declaration in process_name() has no actual
effect on subsequent actions; remove it.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250606163438.229916-8-corbet@lwn.net
scripts/lib/kdoc/kdoc_parser.py

index 2d8a046499c7507e5a4503a4d7dcd61ee59554a0..575817387a3246a60b6c4c5bad2195396c9a98ef 100644 (file)
@@ -1237,11 +1237,6 @@ class KernelDoc:
             parenthesis = r"(?:\(\w*\))?"   # optional parenthesis on function
             decl_end = r"(?:[-:].*)"         # end of the name part
 
-            # test for pointer declaration type, foo * bar() - desc
-            r = KernRe(fr"^{decl_start}([\w\s]+?){parenthesis}?\s*{decl_end}?$")
-            if r.search(line):
-                self.entry.identifier = r.group(1)
-
             # Test for data declaration
             r = KernRe(r"^\s*\*?\s*(struct|union|enum|typedef)\b\s*(\w*)")
             r2 = KernRe(fr"^{decl_start}{fn_type}(?:define\s+)?(\w+)\s*{parenthesis}\s*{decl_end}?$")