mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
docs: kdoc: remove some ineffective code
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
This commit is contained in:
@@ -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}?$")
|
||||
|
||||
Reference in New Issue
Block a user