]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
docs: kdoc: remove a couple of spurious regex characters
authorJonathan Corbet <corbet@lwn.net>
Fri, 5 Sep 2025 21:53:05 +0000 (15:53 -0600)
committerJonathan Corbet <corbet@lwn.net>
Thu, 18 Sep 2025 16:19:53 +0000 (10:19 -0600)
The "name" regex in dump_function() includes both the tilde and colon
characters, but neither has any place in function prototypes.  Remove the
characters, after which the regex simplifies to "\w+"

No output changes.

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

index 1a1558211acd1cf62dc72ef2e90ee2fe67df7ce4..decd127df82e009d8f8206c048a38af9c59c7310 100644 (file)
@@ -958,7 +958,7 @@ class KernelDoc:
         # - atomic_set (macro)
         # - pci_match_device, __copy_to_user (long return type)
 
-        name = r'[a-zA-Z0-9_~:]+'
+        name = r'\w+'
         prototype_end1 = r'[^\(]*'
         prototype_end2 = r'[^\{]*'
         prototype_end = fr'\(({prototype_end1}|{prototype_end2})\)'