summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2026-05-10 13:24:49 -0700
committerAlexei Starovoitov <ast@kernel.org>2026-05-10 13:24:49 -0700
commit7e033543a2ab4c72319201298ed458e3bbddd82f (patch)
treed6c2f6517b65fdf17dd647ed9df1666f28b0ba35 /tools/lib/python/kdoc
parent2ca6723a5f7b68c739dba47b2639e3eaa7884b09 (diff)
parentafaa0a477099cb7256e26fe11289c753a225ac97 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 7.1-rc3
Cross-merge BPF and other fixes after downstream PR. Signed-off-by: Alexei Starovoitov <ast@kernel.org>
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)