qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 01/29] include: Make headers more self-contai


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH v4 01/29] include: Make headers more self-contained
Date: Mon, 12 Aug 2019 17:58:56 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0

On 8/12/19 7:23 AM, Markus Armbruster wrote:
> Back in 2016, we discussed[1] 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.
> 
> This patch gets include/ closer to obeying 2.
> 
> It's actually extracted from my "[RFC] Baby steps towards saner
> headers" series[2], which demonstrates a possible path towards
> checking 2 automatically.  It passes the RFC test there.
> 
> [1] Message-ID: <address@hidden>
>     https://lists.nongnu.org/archive/html/qemu-devel/2016-03/msg03345.html
> [2] Message-Id: <address@hidden>
>     https://lists.nongnu.org/archive/html/qemu-devel/2019-07/msg02715.html
> 
> Signed-off-by: Markus Armbruster <address@hidden>
> Reviewed-by: Alistair Francis <address@hidden>

Tested-by: Philippe Mathieu-Daudé <address@hidden>

> ---
>  include/block/raw-aio.h               | 2 ++
>  include/block/write-threshold.h       | 2 ++
>  include/disas/disas.h                 | 1 +
>  include/exec/cputlb.h                 | 3 +++
>  include/exec/exec-all.h               | 1 +
>  include/exec/ioport.h                 | 2 ++
>  include/exec/memory-internal.h        | 2 ++
>  include/exec/ram_addr.h               | 1 +
>  include/exec/softmmu-semi.h           | 2 ++
>  include/exec/tb-hash.h                | 2 ++
>  include/exec/user/thunk.h             | 2 ++
>  include/fpu/softfloat-macros.h        | 2 ++
>  include/hw/acpi/pci.h                 | 3 +++
>  include/hw/acpi/tco.h                 | 3 +++
>  include/hw/adc/stm32f2xx_adc.h        | 2 ++
>  include/hw/arm/allwinner-a10.h        | 1 +
>  include/hw/arm/aspeed_soc.h           | 1 +
>  include/hw/arm/bcm2836.h              | 1 +
>  include/hw/arm/exynos4210.h           | 3 +--
>  include/hw/arm/fsl-imx25.h            | 1 +
>  include/hw/arm/fsl-imx31.h            | 1 +
>  include/hw/arm/sharpsl.h              | 3 +++
>  include/hw/arm/xlnx-zynqmp.h          | 1 +
>  include/hw/block/fdc.h                | 2 ++
>  include/hw/block/flash.h              | 1 +
>  include/hw/char/escc.h                | 1 +
>  include/hw/char/xilinx_uartlite.h     | 2 ++
>  include/hw/core/generic-loader.h      | 1 +
>  include/hw/cris/etraxfs.h             | 1 +
>  include/hw/cris/etraxfs_dma.h         | 3 +++
>  include/hw/display/i2c-ddc.h          | 1 +
>  include/hw/empty_slot.h               | 2 ++
>  include/hw/gpio/bcm2835_gpio.h        | 1 +
>  include/hw/i2c/aspeed_i2c.h           | 2 ++
>  include/hw/i386/apic_internal.h       | 1 +
>  include/hw/i386/ioapic_internal.h     | 1 +
>  include/hw/intc/allwinner-a10-pic.h   | 2 ++
>  include/hw/intc/heathrow_pic.h        | 2 ++
>  include/hw/intc/mips_gic.h            | 1 +
>  include/hw/isa/vt82c686.h             | 2 ++
>  include/hw/mips/cps.h                 | 1 +
>  include/hw/misc/macio/cuda.h          | 2 ++
>  include/hw/misc/macio/gpio.h          | 3 +++
>  include/hw/misc/macio/macio.h         | 2 ++
>  include/hw/misc/macio/pmu.h           | 3 +++
>  include/hw/misc/mips_cmgcr.h          | 2 ++
>  include/hw/misc/mips_cpc.h            | 2 ++
>  include/hw/misc/pvpanic.h             | 3 +++
>  include/hw/net/allwinner_emac.h       | 1 +
>  include/hw/net/lance.h                | 1 +
>  include/hw/nvram/chrp_nvram.h         | 2 ++
>  include/hw/pci-host/sabre.h           | 2 ++
>  include/hw/pci-host/uninorth.h        | 2 +-
>  include/hw/pci/pcie_aer.h             | 1 +
>  include/hw/ppc/pnv_core.h             | 1 +
>  include/hw/ppc/ppc4xx.h               | 4 ++++
>  include/hw/ppc/spapr_irq.h            | 3 +++
>  include/hw/ppc/spapr_vio.h            | 1 +
>  include/hw/ppc/spapr_xive.h           | 2 ++
>  include/hw/ppc/xive_regs.h            | 3 +++
>  include/hw/riscv/boot.h               | 2 ++
>  include/hw/riscv/riscv_hart.h         | 3 +++
>  include/hw/riscv/sifive_clint.h       | 2 ++
>  include/hw/riscv/sifive_e.h           | 1 +
>  include/hw/riscv/sifive_plic.h        | 2 +-
>  include/hw/riscv/sifive_prci.h        | 2 ++
>  include/hw/riscv/sifive_test.h        | 2 ++
>  include/hw/riscv/sifive_u.h           | 1 +
>  include/hw/riscv/sifive_uart.h        | 3 +++
>  include/hw/riscv/spike.h              | 3 +++
>  include/hw/riscv/virt.h               | 3 +++
>  include/hw/s390x/ap-device.h          | 3 +++
>  include/hw/s390x/css-bridge.h         | 3 ++-
>  include/hw/s390x/css.h                | 1 +
>  include/hw/s390x/tod.h                | 2 +-
>  include/hw/semihosting/console.h      | 2 ++
>  include/hw/sh4/sh_intc.h              | 1 +
>  include/hw/sparc/sparc64.h            | 2 ++
>  include/hw/ssi/aspeed_smc.h           | 1 +
>  include/hw/ssi/xilinx_spips.h         | 1 +
>  include/hw/timer/allwinner-a10-pit.h  | 1 +
>  include/hw/timer/i8254_internal.h     | 1 +
>  include/hw/timer/m48t59.h             | 2 ++
>  include/hw/timer/mc146818rtc_regs.h   | 2 ++
>  include/hw/timer/xlnx-zynqmp-rtc.h    | 1 +
>  include/hw/virtio/virtio-access.h     | 1 +
>  include/hw/virtio/virtio-gpu-bswap.h  | 1 +
>  include/hw/virtio/virtio-rng.h        | 1 +
>  include/hw/watchdog/wdt_aspeed.h      | 1 +
>  include/libdecnumber/decNumberLocal.h | 1 +
>  include/migration/cpu.h               | 3 +++
>  include/monitor/hmp-target.h          | 2 ++
>  include/qemu/atomic128.h              | 2 ++
>  include/qemu/ratelimit.h              | 2 ++
>  include/qemu/thread-win32.h           | 2 +-
>  include/sysemu/balloon.h              | 1 +
>  include/sysemu/cryptodev-vhost-user.h | 3 +++
>  include/sysemu/hvf.h                  | 1 +
>  include/sysemu/iothread.h             | 1 +
>  include/sysemu/kvm_int.h              | 2 ++
>  include/sysemu/memory_mapping.h       | 2 ++
>  include/sysemu/xen-mapcache.h         | 2 ++
>  include/ui/egl-helpers.h              | 3 +++
>  include/ui/input.h                    | 1 +
>  include/ui/spice-display.h            | 1 +
>  target/hppa/cpu.h                     | 2 +-
>  106 files changed, 183 insertions(+), 8 deletions(-)



reply via email to

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