qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Headers without multiple inclusion guards


From: Eduardo Habkost
Subject: Re: [Qemu-devel] Headers without multiple inclusion guards
Date: Tue, 28 May 2019 16:23:17 -0300
User-agent: Mutt/1.11.3 (2019-02-01)

On Tue, May 28, 2019 at 08:12:24PM +0200, Markus Armbruster wrote:
> We have a bunch of headers without multiple inclusion guards.  Some are
> clearly intentional, some look accidental.  Too many for me to find out
> by examining each of them, so I'm asking their maintainers.
> 
> Why do I ask?  I'd like to mark the intentional ones and fix the
> accidental ones, so they don't flunk "make check-headers" from "[RFC v4
> 0/7] Baby steps towards saner headers" just because they lack multiple
> inclusion guards.
> 
> Just in case: what's a multiple inclusion guard?  It's
> 
>     #ifndef UNIQUE_GUARD_SYMBOL_H
>     #define UNIQUE_GUARD_SYMBOL_H
>     ...
>     #endif
> 
> with nothing but comments outside the conditional, so that the header
> can safely be included more than once.
> 
> I append the alphabetical list of headers without multiple inclusion
> guards (as reported by scripts/clean-header-guards -nv), followed by the
> same list sorted into maintainer buckets.  If you're cc'ed, please find
> your bucket(s), and tell me which headers intentionally lack guards.
> 
[...]
> X86
> M: Paolo Bonzini <address@hidden>
> M: Richard Henderson <address@hidden>
> M: Eduardo Habkost <address@hidden>
> target/i386/cc_helper_template.h

Intentional.  See usage at target/i386/cc_helper.c.

> target/i386/helper.h

I believe helper.h intentionally lack guards on all
architectures.  See helper-proto.h, helper-tcg.h,
helper-gen.h.

> target/i386/ops_sse.h

Intentional, see usage at target/i386/fpu_helper.c.

> target/i386/ops_sse_header.h

Intentional, see usage at target/i386/helper.h.

> target/i386/shift_helper_template.h

Intentional, see usage at target/i386/int_helper.c.

> target/i386/whp-dispatch.h

Seems unintentional.

[...]
> Guest CPU Cores (KVM):
> ----------------------
> 
> Overall
> M: Paolo Bonzini <address@hidden>
> include/hw/kvm/clock.h

Seems unintentional.

[...]
> Guest CPU Cores (Xen):
> ----------------------
> 
> X86
> M: Stefano Stabellini <address@hidden>
> M: Anthony Perard <address@hidden>
> M: Paul Durrant <address@hidden>
> include/hw/xen/io/ring.h

I see a __XEN_PUBLIC_IO_RING_H__ guard there.  Probably
clean-header-guards.pl is confused by the comments at the end of
the file?

> [...]

-- 
Eduardo



reply via email to

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