summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.com>2026-06-16 22:47:16 +0300
committerJiri Kosina <jkosina@suse.com>2026-06-16 22:47:16 +0300
commitaa776949fb77462ee712eee28bc54a9ce95c5b40 (patch)
tree389848f195054d64ac6fc137a2218e0a63655288 /tools/lib/python
parent6df6b1f2c49678211f65647c300bc51dda02893b (diff)
parent12b7731995ca577d86e02196e99ba9c126f47282 (diff)
downloadlinux-aa776949fb77462ee712eee28bc54a9ce95c5b40.tar.xz
Merge branch 'for-7.2/wiimote' into for-linus
Diffstat (limited to 'tools/lib/python')
-rw-r--r--tools/lib/python/kdoc/kdoc_parser.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/lib/python/kdoc/kdoc_parser.py b/tools/lib/python/kdoc/kdoc_parser.py
index 74af7ae47aa4..c3f966da533e 100644
--- a/tools/lib/python/kdoc/kdoc_parser.py
+++ b/tools/lib/python/kdoc/kdoc_parser.py
@@ -439,6 +439,11 @@ class KernelDoc:
# Ignore argument attributes
arg = KernRe(r'\sPOS0?\s').sub(' ', arg)
+ # Replace '[at_least ' with '[static '. This allows sphinx to parse
+ # array parameter declarations like 'char A[at_least 4]', where
+ # 'at_least' is #defined to 'static' by the kernel headers.
+ arg = arg.replace('[at_least ', '[static ')
+
# Strip leading/trailing spaces
arg = arg.strip()
arg = KernRe(r'\s+').sub(' ', arg, count=1)