From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: eblake@redhat.com, mst@redhat.com, pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH RFC 0/5] Baby steps towards saner headers
Date: Thu, 23 Jun 2016 18:12:05 +0200 [thread overview]
Message-ID: <1466698330-6021-1-git-send-email-armbru@redhat.com> (raw)
Some time ago, we discussed rules for headers, and these were
generally liked:
1. Have a carefully curated header that's included everywhere first. We
got that already thanks to Peter: osdep.h.
2. Headers should normally include everything they need beyond osdep.h.
If exceptions are needed for some reason, they must be documented in
the header. If all that's needed from a header is typedefs, put
those into qemu/typedefs.h instead of including the header.
3. Cyclic inclusion is forbidden.
Message-ID: <87h9g8j57d.fsf@blackfin.pond.sub.org>
http://lists.nongnu.org/archive/html/qemu-devel/2016-03/msg03345.html
Trouble is we're not exactly close to obeying 2. This series
demonstrates a possible path towards obeying it: enforce it in "make
check", except for known-bad headers [PATCH 2]. We start with a large
list of known-bad headers, then whittle it down. Some sample
whittling in PATCH 4+5.
Opinions?
Markus Armbruster (5):
Use #include "..." exactly for our own headers
tests: New make target check-headers
include/qemu/typedefs.h: Restore alphabetical order
include: Move typedef qemu_irq to qemu/typedefs.h
include: Include exec/hwaddr.h where hwaddr is used
block/iscsi.c | 1 -
crypto/pbkdf-gcrypt.c | 2 +-
crypto/pbkdf-nettle.c | 2 +-
exec.c | 2 +-
hw/audio/lm4549.h | 1 +
hw/cris/boot.h | 2 +
hw/net/e1000e_core.h | 7 +
hw/net/vmware_utils.h | 1 +
hw/scsi/mptsas.h | 1 +
hw/scsi/virtio-scsi-dataplane.c | 2 +-
hw/scsi/virtio-scsi.c | 2 +-
include/disas/disas.h | 1 +
include/hw/arm/sharpsl.h | 3 +
include/hw/block/fdc.h | 1 +
include/hw/char/escc.h | 2 +
include/hw/char/pl011.h | 2 +
include/hw/char/xilinx_uartlite.h | 2 +
include/hw/cris/etraxfs_dma.h | 2 +
include/hw/empty_slot.h | 2 +
include/hw/irq.h | 2 -
include/hw/misc/mips_cmgcr.h | 1 +
include/hw/pci-host/apb.h | 1 +
include/hw/sparc/sparc32_dma.h | 2 +
include/hw/timer/m48t59.h | 1 +
include/qemu/typedefs.h | 28 ++-
include/sysemu/xen-mapcache.h | 1 +
linux-user/flatload.c | 2 +-
monitor.c | 2 +-
slirp/bootp.c | 2 +-
slirp/cksum.c | 2 +-
slirp/if.c | 2 +-
slirp/ip_input.c | 2 +-
slirp/ip_output.c | 2 +-
slirp/mbuf.c | 2 +-
slirp/misc.c | 5 +-
slirp/sbuf.c | 4 +-
slirp/socket.c | 2 +-
slirp/tcp_input.c | 2 +-
slirp/tcp_output.c | 2 +-
slirp/tcp_subr.c | 2 +-
slirp/tcp_timer.c | 2 +-
slirp/tftp.c | 2 +-
slirp/udp.c | 2 +-
target-arm/arm-powerctl.c | 4 +-
target-arm/psci.c | 8 +-
target-ppc/mmu-hash32.h | 2 +
target-ppc/translate_init.c | 2 +-
target-s390x/cpu.h | 2 +-
target-unicore32/softmmu.c | 2 +-
tests/Makefile.include | 415 ++++++++++++++++++++++++++++++++++++++
tests/postcopy-test.c | 3 +-
tests/vhost-user-bridge.c | 2 -
tests/vhost-user-test.c | 2 +-
util/mmap-alloc.c | 3 +-
util/oslib-posix.c | 2 +-
55 files changed, 501 insertions(+), 59 deletions(-)
--
2.5.5
next reply other threads:[~2016-06-23 16:12 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-23 16:12 Markus Armbruster [this message]
2016-06-23 16:12 ` [Qemu-devel] [PATCH RFC 1/5] Use #include "..." exactly for our own headers Markus Armbruster
2016-06-23 16:31 ` Peter Maydell
2016-06-23 16:12 ` [Qemu-devel] [PATCH RFC 2/5] tests: New make target check-headers Markus Armbruster
2016-06-23 16:40 ` Paolo Bonzini
2016-06-23 16:47 ` Peter Maydell
2016-06-24 8:10 ` Markus Armbruster
2016-06-23 19:33 ` Eric Blake
2016-06-24 8:11 ` Markus Armbruster
2016-06-23 16:12 ` [Qemu-devel] [PATCH RFC 3/5] include/qemu/typedefs.h: Restore alphabetical order Markus Armbruster
2016-06-23 16:40 ` Peter Maydell
2016-06-24 8:11 ` Markus Armbruster
2016-06-23 16:12 ` [Qemu-devel] [PATCH RFC 4/5] include: Move typedef qemu_irq to qemu/typedefs.h Markus Armbruster
2016-06-23 16:41 ` Peter Maydell
2016-06-24 8:12 ` Markus Armbruster
2016-06-24 8:15 ` Peter Maydell
2016-06-24 8:17 ` Paolo Bonzini
2016-06-24 9:46 ` Peter Maydell
2016-06-24 12:32 ` Markus Armbruster
2016-06-24 12:45 ` Peter Maydell
2016-06-24 13:43 ` Markus Armbruster
2016-06-24 13:45 ` Peter Maydell
2016-06-23 16:12 ` [Qemu-devel] [PATCH RFC 5/5] include: Include exec/hwaddr.h where hwaddr is used Markus Armbruster
2016-06-24 8:17 ` Markus Armbruster
2016-06-24 8:18 ` Paolo Bonzini
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=1466698330-6021-1-git-send-email-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).