All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Dmitry Fleytman" <dmitry.fleytman@gmail.com>,
	"Sagar Karandikar" <sagark@eecs.berkeley.edu>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"James Hogan" <jhogan@kernel.org>,
	"Anthony Green" <green@moxielogic.com>,
	"Palmer Dabbelt" <palmer@sifive.com>,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Max Filippov" <jcmvbkbc@gmail.com>,
	"Alistair Francis" <Alistair.Francis@wdc.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	"Guan Xuetao" <gxt@mprc.pku.edu.cn>,
	"Marek Vasut" <marex@denx.de>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Aleksandar Rikalo" <arikalo@wavecomp.com>,
	"Helge Deller" <deller@gmx.de>,
	"David Hildenbrand" <david@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Halil Pasic" <pasic@linux.ibm.com>,
	"Christian Borntraeger" <borntraeger@de.ibm.com>,
	"Anthony Perard" <anthony.perard@citrix.com>,
	"David Gibson" <david@gibson.dropbear.id.au>,
	"Laszlo Ersek" <lersek@redhat.com>,
	"Jason Wang" <jasowang@redhat.com>,
	"Artyom Tarasenko" <atar4qemu@gmail.com>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Alistair Francis" <alistair@alistair23.me>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Riku Voipio" <riku.voipio@iki.fi>, "Greg Kurz" <groug@kaod.org>,
	"Marcelo Tosatti" <mtosatti@redhat.com>,
	"Beniamino Galvani" <b.galvani@gmail.com>,
	"Eric Auger" <eric.auger@redhat.com>,
	"Paul Durrant" <paul.durrant@citrix.com>,
	"Stafford Horne" <shorne@gmail.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Richard Henderson" <rth@twiddle.net>,
	"Daniel P. Berrange" <berrange@redhat.com>,
	"Claudio Fontana" <claudio.fontana@gmail.com>,
	"Bastian Koppelmann" <kbastian@mail.uni-paderborn.de>,
	"Chris Wulff" <crwulff@gmail.com>,
	"Claudio Fontana" <claudio.fontana@huawei.com>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"Andrew Baumann" <Andrew.Baumann@microsoft.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Michael Walle" <michael@walle.cc>,
	"Aleksandar Markovic" <amarkovic@wavecomp.com>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] Headers without multiple inclusion guards
Date: Wed, 29 May 2019 14:47:50 +0200	[thread overview]
Message-ID: <87o93lfmvd.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <CAFEAcA_DdosM2mSo0FWMLjv2eBHscQGXw-_J6AefiwURZGCCrg@mail.gmail.com> (Peter Maydell's message of "Tue, 28 May 2019 19:32:51 +0100")

Peter Maydell <peter.maydell@linaro.org> writes:

> On Tue, 28 May 2019 at 19:12, Markus Armbruster <armbru@redhat.com> wrote:
>> 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.
>
>> FPU emulation
>> M: Aurelien Jarno <aurelien@aurel32.net>
>> M: Peter Maydell <peter.maydell@linaro.org>
>> M: Alex Bennée <alex.bennee@linaro.org>
>> fpu/softfloat-specialize.h
>> include/fpu/softfloat-macros.h
>
> I think that include/fpu/softfloat-macros.h should ideally
> have header guards.

I'll add one.

> fpu/softfloat-specialize.h is a bit odd as it's intended to be included
> exactly once, by fpu/softfloat.c. Guards wouldn't hurt, I think, but it
> might be cleanest to rename it to fpu/softfloat-specialize.inc.c
> to match our convention for "lump of C which is textually
> included but isn't a header".

Makes me wonder why we bother with a separate file.

Renaming it to .inc.c gets it out of check-headers' way.

>> ARM
>> M: Peter Maydell <peter.maydell@linaro.org>
>> target/arm/helper-a64.h
>> target/arm/helper-sve.h
>> target/arm/helper.h
>> target/arm/op_addsub.h
>
> All intentional -- target/*/helper.h and anything it includes
> is intended to be included multiple times for different
> purposes (the includer #defines various macros appropriately
> to produce different effects).

We have quite a few special headers of this kind.  The ones that require
macros to be defined should be excluded from check-headers.  The ones
that don't could instead skip the "#include a second time works" part of
the test.  We'll see.

>> Allwinner-a10
>> M: Beniamino Galvani <b.galvani@gmail.com>
>> M: Peter Maydell <peter.maydell@linaro.org>
>> include/hw/arm/allwinner-a10.h
>
> This appears to me to have an include guard:
> perhaps your check doesn't recognize the variant
> where the #define appears just before the #endif rather
> than just after the #ifndef ?

You're right, it doesn't.

We got a dozen headers with the #define in unusual places.  I'll
normalize them.

>> ARM PrimeCell and CMSDK devices
>> M: Peter Maydell <peter.maydell@linaro.org>
>> hw/display/pl110_template.h
>
> Intentional, like all the hw/display/*_template.h headers:
> they're included multiple times with various definitions
> of BITS to generate different functions. (Note that there's
> an item on the BiteSizedTasks page which suggests that
> we could clean up all of these because only the 32-bit
> case is used now that our display surfaces are always
> 32-bits-per-pixel.)

Another one for the "special headers" bucket.

>> Raspberry Pi
>> M: Peter Maydell <peter.maydell@linaro.org>
>> R: Andrew Baumann <Andrew.Baumann@microsoft.com>
>> R: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> include/hw/arm/raspi_platform.h
>
> Mistake, should have a guard.

I'll add one.

>> PXA2XX
>> M: Andrzej Zaborowski <balrogg@gmail.com>
>> M: Peter Maydell <peter.maydell@linaro.org>
>> hw/display/pxa2xx_template.h
>
> Intentional, see above.

Another one for the "special headers" bucket.

>> Xilinx ZynqMP
>> M: Alistair Francis <alistair@alistair23.me>
>> M: Edgar E. Iglesias <edgar.iglesias@gmail.com>
>> M: Peter Maydell <peter.maydell@linaro.org>
>> include/hw/arm/xlnx-zynqmp.h
>> include/hw/display/xlnx_dp.h
>> include/hw/dma/xlnx-zynq-devcfg.h
>
> These all have guards in non-standard formats.

I'll normalize.

>> include/hw/timer/xlnx-zynqmp-rtc.h
>
> Mistake, should have a guard.

I'll add one.

>> OMAP
>> M: Peter Maydell <peter.maydell@linaro.org>
>> hw/display/omap_lcd_template.h
>
> Intentional, see above.

Another one for the "special headers" bucket.

>> include/hw/arm/omap.h
>
> Has a guard in a non-standard form.

I'll normalize.

>> UNMAINTAINED
>> ------------
>> hw/display/tc6393xb_template.h
>
> Intentional (see above)

Another one for the "special headers" bucket.

>> include/hw/char/cadence_uart.h
>
> Another with a guard which isn't of a style your check
> detects.

I'll normalize.

Thanks!


  reply	other threads:[~2019-05-29 12:50 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-28 18:12 [Qemu-devel] Headers without multiple inclusion guards Markus Armbruster
2019-05-28 18:32 ` Peter Maydell
2019-05-29 12:47   ` Markus Armbruster [this message]
2019-05-30 10:14     ` Peter Maydell
2019-05-28 19:23 ` Eduardo Habkost
2019-05-29  8:21   ` Paul Durrant
2019-05-29 12:49     ` Markus Armbruster
2019-05-28 19:55 ` Max Filippov
2019-05-29 12:51   ` Markus Armbruster
2019-05-29 13:20     ` Philippe Mathieu-Daudé
2019-05-28 20:08 ` Richard Henderson
2019-05-28 22:14 ` BALATON Zoltan
2019-05-29  1:47 ` David Gibson
2019-05-29  6:30 ` Laurent Vivier
2019-05-29  8:25 ` Bastian Koppelmann
2019-05-29  9:01 ` Cornelia Huck
2019-05-29  9:19 ` Greg Kurz
2019-05-29  9:38 ` Alex Bennée
2019-05-29  9:58 ` Anthony PERARD
2019-05-29 12:55   ` Markus Armbruster
2019-05-29 10:05 ` David Hildenbrand
2019-05-29 13:22 ` Philippe Mathieu-Daudé
2019-05-29 14:10   ` Markus Armbruster
2019-06-03 10:57     ` Laszlo Ersek
2019-06-02  7:06 ` Dmitry Fleytman
2019-06-03 10:55 ` Laszlo Ersek
2019-06-03 12:59   ` Markus Armbruster
2019-06-03 14:24     ` Philippe Mathieu-Daudé
2019-06-03 16:23       ` Laszlo Ersek
2019-06-05 14:23 ` Daniel P. Berrangé
2019-06-05 16:18   ` Laszlo Ersek
2019-06-05 16:23     ` Daniel P. Berrangé
2019-06-05 17:03       ` Laszlo Ersek
2019-06-05 17:52   ` Markus Armbruster
2019-06-07 17:32     ` Daniel P. Berrangé
2019-06-05 20:49 ` Alistair Francis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o93lfmvd.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=Alistair.Francis@wdc.com \
    --cc=Andrew.Baumann@microsoft.com \
    --cc=alex.bennee@linaro.org \
    --cc=alistair@alistair23.me \
    --cc=amarkovic@wavecomp.com \
    --cc=anthony.perard@citrix.com \
    --cc=arikalo@wavecomp.com \
    --cc=atar4qemu@gmail.com \
    --cc=aurelien@aurel32.net \
    --cc=b.galvani@gmail.com \
    --cc=berrange@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=claudio.fontana@gmail.com \
    --cc=claudio.fontana@huawei.com \
    --cc=cohuck@redhat.com \
    --cc=crwulff@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=david@redhat.com \
    --cc=deller@gmx.de \
    --cc=dmitry.fleytman@gmail.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=ehabkost@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=green@moxielogic.com \
    --cc=groug@kaod.org \
    --cc=gxt@mprc.pku.edu.cn \
    --cc=jasowang@redhat.com \
    --cc=jcmvbkbc@gmail.com \
    --cc=jhogan@kernel.org \
    --cc=kbastian@mail.uni-paderborn.de \
    --cc=kraxel@redhat.com \
    --cc=laurent@vivier.eu \
    --cc=lersek@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=marex@denx.de \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=michael@walle.cc \
    --cc=mst@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=palmer@sifive.com \
    --cc=pasic@linux.ibm.com \
    --cc=paul.durrant@citrix.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    --cc=rth@twiddle.net \
    --cc=sagark@eecs.berkeley.edu \
    --cc=shorne@gmail.com \
    --cc=sstabellini@kernel.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.