[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-5.0? 2/3] scripts/kernel-doc: Add missing close-paren in
From: |
Alex Bennée |
Subject: |
Re: [PATCH for-5.0? 2/3] scripts/kernel-doc: Add missing close-paren in c:function directives |
Date: |
Tue, 14 Apr 2020 15:56:55 +0100 |
User-agent: |
mu4e 1.3.10; emacs 28.0.50 |
Peter Maydell <address@hidden> writes:
> 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:
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>
Anyway:
Reviewed-by: Alex Bennée <address@hidden>
Tested-by: Alex Bennée <address@hidden>
--
Alex Bennée
- [PATCH for-5.0? 0/3] Make docs build work with Sphinx 3, Peter Maydell, 2020/04/11
- [PATCH for-5.0? 2/3] scripts/kernel-doc: Add missing close-paren in c:function directives, Peter Maydell, 2020/04/11
- [PATCH for-5.0? 1/3] configure: Honour --disable-werror for Sphinx, Peter Maydell, 2020/04/11
- [PATCH for-5.0? 3/3] kernel-doc: Use c:struct for Sphinx 3.0 and later, Peter Maydell, 2020/04/11
- Re: [PATCH for-5.0? 0/3] Make docs build work with Sphinx 3, Paolo Bonzini, 2020/04/13
- Supported Sphinx Versions (was: Re: [PATCH for-5.0? 0/3] Make docs build work with Sphinx 3), John Snow, 2020/04/13