summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2026-05-25 09:34:24 -1000
committerTejun Heo <tj@kernel.org>2026-05-25 09:34:24 -1000
commit639609b83f69fe4cd08e01423ae8e12d84484cfa (patch)
tree0af2bf3da28a1c20cd5673c608751f880e508b3b /tools/lib/python/kdoc
parentf31e89a8f583cb8b1b68002cedb77ce444d6f7d2 (diff)
parent53cc12a2dc88c2c6f62f507548640885a70a56a8 (diff)
Merge branch 'arena_direct_access' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next into for-7.2
Diffstat (limited to 'tools/lib/python/kdoc')
-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)