[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 01/22] scripts/kernel-doc: strip QEMU_ from function definitio
From: |
Alex Bennée |
Subject: |
[PATCH v2 01/22] scripts/kernel-doc: strip QEMU_ from function definitions |
Date: |
Tue, 23 Mar 2021 16:52:47 +0000 |
Some packaged versions of Sphinx (fedora33/alpine so far) have issues
with the annotated C code that kernel-doc spits out. Without knowing
about things like QEMU_PLUGIN_EXPORT it chokes trying to understand
the code. Evidently this is a problem for the kernel as well as the
long stream of regex substitutions we add to in this patch can attest.
Fortunately we have a fairly common format for all our compiler
shenanigans as applied to functions so lets just filter them all out.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210320133706.21475-2-alex.bennee@linaro.org>
---
scripts/kernel-doc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 4b19851b2d..240923d509 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1745,6 +1745,9 @@ sub dump_function($$) {
)+
\)\)\s+//x;
+ # Strip QEMU specific compiler annotations
+ $prototype =~ s/QEMU_[A-Z_]+ +//;
+
# Yes, this truly is vile. We are looking for:
# 1. Return type (may be nothing if we're looking at a macro)
# 2. Function name
--
2.20.1
- [PATCH for 6.0 v2 00/22] fixes for rc1 pre-PR (kernel-doc, semihosting, testing), Alex Bennée, 2021/03/23
- [PATCH v2 01/22] scripts/kernel-doc: strip QEMU_ from function definitions,
Alex Bennée <=
- [PATCH v2 02/22] docs/devel: include the plugin API information from the headers, Alex Bennée, 2021/03/23
- [PATCH v2 04/22] tools/virtiofsd: include --socket-group in help, Alex Bennée, 2021/03/23
- [PATCH v2 03/22] docs/devel: expand style section of memory management, Alex Bennée, 2021/03/23
- [PATCH v2 05/22] semihosting: move semihosting tests to multiarch, Alex Bennée, 2021/03/23
- [PATCH v2 07/22] semihosting/arm-compat-semi: don't use SET_ARG to report SYS_HEAPINFO, Alex Bennée, 2021/03/23
- [PATCH v2 08/22] linux-user/riscv: initialise the TaskState heap/stack info, Alex Bennée, 2021/03/23
- [PATCH v2 06/22] semihosting/arm-compat-semi: unify GET/SET_ARG helpers, Alex Bennée, 2021/03/23
- [PATCH v2 13/22] utils: Tighter tests for qemu_strtosz, Alex Bennée, 2021/03/23
- [PATCH v2 12/22] cirrus.yml: Update the FreeBSD task to version 12.2, Alex Bennée, 2021/03/23