]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
docs: kdoc: remove some dead code in dump_typedef()
authorJonathan Corbet <corbet@lwn.net>
Mon, 8 Sep 2025 22:32:10 +0000 (16:32 -0600)
committerJonathan Corbet <corbet@lwn.net>
Thu, 18 Sep 2025 16:19:53 +0000 (10:19 -0600)
The regex in this block of code makes no sense, and a quick test shows that
it never matches anything; simply delete the code.

No output changes.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
scripts/lib/kdoc/kdoc_parser.py

index 5e41acfef7b8ebde4a7502e6c0ffb5c29b834a67..7c739b495d58eaa34c452edd52eb52b375b3c758 100644 (file)
@@ -1060,11 +1060,6 @@ class KernelDoc:
                                     purpose=self.entry.declaration_purpose)
             return
 
-        # Handle nested parentheses or brackets
-        r = KernRe(r'(\(*.\)\s*|\[*.\]\s*);$')
-        while r.search(proto):
-            proto = r.sub('', proto)
-
         # Parse simple typedefs
         r = KernRe(r'typedef.*\s+(\w+)\s*;')
         if r.match(proto):