]> git.ipfire.org Git - thirdparty/qemu.git/commit
scripts/kernel-doc: Add missing close-paren in c:function directives
authorPeter Maydell <peter.maydell@linaro.org>
Sat, 11 Apr 2020 18:29:33 +0000 (19:29 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 14 Apr 2020 16:14:18 +0000 (17:14 +0100)
commita62d563796e369b910073eeec02d604f23dcbe89
tree070a84a74fd0ad775534381b634bba3bfa886bdf
parent516e8b7d4a531b3c71ed77199cc2c8904ccd60b4
scripts/kernel-doc: Add missing close-paren in c:function directives

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 <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20200411182934.28678-3-peter.maydell@linaro.org
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
scripts/kernel-doc