summaryrefslogtreecommitdiff
path: root/scripts/lib/kdoc/kdoc_parser.py
diff options
context:
space:
mode:
authorSean Anderson <sean.anderson@linux.dev>2025-04-08 18:09:36 +0800
committerJonathan Corbet <corbet@lwn.net>2025-04-09 12:10:34 -0600
commitde258fa8ca8d72ef17f4d71162cfbbd2d9f397e6 (patch)
treeb4ffc706164236943150f136e62f636aaf96b64a /scripts/lib/kdoc/kdoc_parser.py
parent04a383ced6965fedc9c1b6c83d841acce076b53c (diff)
scripts: kernel-doc: fix parsing function-like typedefs (again)
Typedefs like typedef struct phylink_pcs *(*pcs_xlate_t)(const u64 *args); have a typedef_type that ends with a * and therefore has no word boundary. Add an extra clause for the final group of the typedef_type so we only require a word boundary if we match a word. [mchehab: modify also kernel-doc.py, as we're deprecating the perl version] Fixes: 7d2c6b1edf79 ("scripts: kernel-doc: fix parsing function-like typedefs") Signed-off-by: Sean Anderson <sean.anderson@linux.dev> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/e0abb103c73a96d76602d909f60ab8fd6e2fd0bd.1744106242.git.mchehab+huawei@kernel.org
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
-rwxr-xr-xscripts/lib/kdoc/kdoc_parser.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/kdoc/kdoc_parser.py b/scripts/lib/kdoc/kdoc_parser.py
index f60722bcc687..4f036c720b36 100755
--- a/scripts/lib/kdoc/kdoc_parser.py
+++ b/scripts/lib/kdoc/kdoc_parser.py
@@ -1067,7 +1067,7 @@ class KernelDoc:
Stores a typedef inside self.entries array.
"""
- typedef_type = r'((?:\s+[\w\*]+\b){1,8})\s*'
+ typedef_type = r'((?:\s+[\w\*]+\b){0,7}\s+(?:\w+\b|\*+))\s*'
typedef_ident = r'\*?\s*(\w\S+)\s*'
typedef_args = r'\s*\((.*)\);'