qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/8] docs: tweak kernel-doc for QEMU coding standards


From: Eduardo Habkost
Subject: Re: [PATCH 2/8] docs: tweak kernel-doc for QEMU coding standards
Date: Fri, 2 Oct 2020 14:34:55 -0400

On Mon, Dec 02, 2019 at 06:01:16PM +0000, Peter Maydell wrote:
> On Fri, 29 Nov 2019 at 14:02, Paolo Bonzini <pbonzini@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 <pbonzini@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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]