qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH RFC 0/5] Baby steps towards saner headers


From: Markus Armbruster
Subject: [Qemu-devel] [PATCH RFC 0/5] Baby steps towards saner headers
Date: Thu, 23 Jun 2016 18:12:05 +0200

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: <address@hidden>
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




reply via email to

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