On Mon, Dec 02, 2019 at 06:01:16PM +0000, Peter Maydell wrote: > On Fri, 29 Nov 2019 at 14:02, Paolo Bonzini <pbonz...@redhat.com> wrote: > > > > Surprisingly, QEMU does have a pretty consistent doc comment style and > > it is not very different from the Linux kernel's. Of the documentation > > "sigils", only "#" separates the QEMU doc comment style from Linux's, > > and it has 200+ instances vs. 6 for the kernel's '&struct foo' (all in > > accel/tcg/translate-all.c), so it's clear that the two standards are > > different in this respect. In addition, our structs are typedefed and > > recognized by CamelCase names. > > > > Adjust kernel-doc's parser for these two aspects of the QEMU coding > > standards. The patch has been valid, with hardly any change, for over > > two years, so it should not be an issue to keep kernel-doc in sync with > > the Linux copy. > > > > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> [...] > > @@ -1906,7 +1914,9 @@ sub process_name($$) { > > ++$warnings; > > } > > > > - if ($identifier =~ m/^struct\b/) { > > + if ($identifier =~ m/^[A-Z]/) { > > + $decl_type = 'type name'; > > + } elsif ($identifier =~ m/^struct\b/) { > > $decl_type = 'struct'; > > } elsif ($identifier =~ m/^union\b/) { > > $decl_type = 'union'; > > The match for 'type name' is pretty wide but I guess > we can find out through experience if we need to narrow it.
This change seems to make it impossible to document any macros with uppercase names. (for example, most of the macros in object.h are not included in the generated docs) What exactly is the purpose of the hunk above? -- Eduardo