From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37346) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bG7Ep-0006qe-Sz for qemu-devel@nongnu.org; Thu, 23 Jun 2016 12:12:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bG7Ek-0004aR-F1 for qemu-devel@nongnu.org; Thu, 23 Jun 2016 12:12:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57979) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bG7Ek-0004a4-5x for qemu-devel@nongnu.org; Thu, 23 Jun 2016 12:12:14 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2B7AC7267D for ; Thu, 23 Jun 2016 16:12:13 +0000 (UTC) From: Markus Armbruster Date: Thu, 23 Jun 2016 18:12:05 +0200 Message-Id: <1466698330-6021-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH RFC 0/5] Baby steps towards saner headers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: eblake@redhat.com, mst@redhat.com, pbonzini@redhat.com 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