|
| From: | Alex Bennée |
| Subject: | Re: [PATCH for-5.0? 3/3] kernel-doc: Use c:struct for Sphinx 3.0 and later |
| Date: | Tue, 14 Apr 2020 16:53:51 +0100 |
| User-agent: | mu4e 1.3.10; emacs 28.0.50 |
Peter Maydell <address@hidden> writes: > The kernel-doc Sphinx plugin and associated script currently emit > 'c:type' directives for "struct foo" documentation. > > Sphinx 3.0 warns about this: > > /home/petmay01/linaro/qemu-from-laptop/qemu/docs/../include/exec/memory.h:3: > WARNING: Type must be either just a name or a typedef-like declaration. > If just a name: > Error in declarator or parameters > Invalid C declaration: Expected identifier in nested name, got keyword: > struct [error at 6] > struct MemoryListener > ------^ > If typedef-like declaration: > Error in declarator or parameters > Invalid C declaration: Expected identifier in nested name. [error at 21] > struct MemoryListener > ---------------------^ > > because it wants us to use the new-in-3.0 'c:struct' instead. > > Plumb the Sphinx version through to the kernel-doc script > and use it to select 'c:struct' for newer versions than 3.0. > > Fixes: LP:1872113 > Signed-off-by: Peter Maydell <address@hidden> Looks reasonable although I don't have a way of testing it on my system. Any idea what systems have the latest sphinx 3 on them? I tried fedora but that still has 1.8.4 so it's not that bleeding edge. Reviewed-by: Alex Bennée <address@hidden> -- Alex Bennée
| [Prev in Thread] | Current Thread | [Next in Thread] |