[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/12] scripts/kernel-doc: Add missing close-paren in c:function d
From: |
Peter Maydell |
Subject: |
[PULL 09/12] scripts/kernel-doc: Add missing close-paren in c:function directives |
Date: |
Tue, 14 Apr 2020 17:26:10 +0100 |
When kernel-doc generates a 'c:function' directive for a function
one of whose arguments is a function pointer, it fails to print
the close-paren after the argument list of the function pointer
argument, for instance in the memory API documentation:
.. c:function:: void memory_region_init_resizeable_ram (MemoryRegion * mr,
struct Object * owner, const char * name, uint64_t size, uint64_t max_size,
void (*resized) (const char*, uint64_t length, void *host, Error ** errp)
which should have a ')' after the 'void *host' which is the
last argument to 'resized'.
Older versions of Sphinx don't try to parse the argumnet
to c:function, but Sphinx 3.0 does do this and will complain:
/home/petmay01/linaro/qemu-from-laptop/qemu/docs/../include/exec/memory.h:834:
WARNING: Error in declarator or parameters
Invalid C declaration: Expecting "," or ")" in parameters, got "EOF". [error
at 208]
void memory_region_init_resizeable_ram (MemoryRegion * mr, struct Object *
owner, const char * name, uint64_t size, uint64_t max_size, void (*resized)
(const char*, uint64_t length, void *host, Error ** errp)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^
Add the missing close-paren.
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Message-id: address@hidden
Reviewed-by: Alex Bennée <address@hidden>
---
scripts/kernel-doc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index af470eb3211..8dc30e01e58 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -853,7 +853,7 @@ sub output_function_rst(%) {
if ($type =~ m/([^\(]*\(\*)\s*\)\s*\(([^\)]*)\)/) {
# pointer-to-function
- print $1 . $parameter . ") (" . $2;
+ print $1 . $parameter . ") (" . $2 . ")";
} else {
print $type . " " . $parameter;
}
--
2.20.1
- [PULL 02/12] thread.h: Fix Coverity version of qemu_cond_timedwait(), (continued)
- [PULL 02/12] thread.h: Fix Coverity version of qemu_cond_timedwait(), Peter Maydell, 2020/04/14
- [PULL 03/12] thread.h: Remove trailing semicolons from Coverity qemu_mutex_lock() etc, Peter Maydell, 2020/04/14
- [PULL 04/12] linux-user/flatload.c: Use "" for include of QEMU header target_flat.h, Peter Maydell, 2020/04/14
- [PULL 10/12] kernel-doc: Use c:struct for Sphinx 3.0 and later, Peter Maydell, 2020/04/14
- [PULL 06/12] scripts/coverity-scan: Add Docker support, Peter Maydell, 2020/04/14
- [PULL 07/12] docs: Improve our gdbstub documentation, Peter Maydell, 2020/04/14
- [PULL 05/12] scripts/run-coverity-scan: Script to run Coverity Scan build, Peter Maydell, 2020/04/14
- [PULL 11/12] docs: Require Sphinx 1.6 or better, Peter Maydell, 2020/04/14
- [PULL 12/12] Deprecate KVM support for AArch32, Peter Maydell, 2020/04/14
- [PULL 08/12] configure: Honour --disable-werror for Sphinx, Peter Maydell, 2020/04/14
- [PULL 09/12] scripts/kernel-doc: Add missing close-paren in c:function directives,
Peter Maydell <=
- Re: [PULL 00/12] target-arm queue, Peter Maydell, 2020/04/14