[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 0/2] Clean up includes
From: |
Markus Armbruster |
Subject: |
[PATCH 0/2] Clean up includes |
Date: |
Sat, 10 Dec 2022 14:39:13 +0100 |
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 series fixes a number of rule violations.
It is based on
[PATCH 0/4] hw/ppc: Clean up includes
[PATCH 0/5] include/hw/pci include/hw/cxl: Clean up includes
[PATCH 0/3] block: Clean up includes
[PATCH 0/4] coroutine: Clean up includes
With all of these applied, just three inclusion loops remain reachable
from include/:
target/microblaze/cpu.h target/microblaze/mmu.h
target/nios2/cpu.h target/nios2/mmu.h
target/riscv/cpu.h target/riscv/pmp.h
Breaking them would be nice, but I'm out of steam.
[1] Message-ID: <87h9g8j57d.fsf@blackfin.pond.sub.org>
https://lists.nongnu.org/archive/html/qemu-devel/2016-03/msg03345.html
Based-on: <20221210112140.4057731-1-armbru@redhat.com>
Markus Armbruster (2):
include/hw/virtio: Break inclusion loop
include: Include headers where needed
include/exec/plugin-gen.h | 1 +
include/hw/acpi/erst.h | 3 +++
include/hw/char/cmsdk-apb-uart.h | 1 +
include/hw/char/goldfish_tty.h | 1 +
include/hw/char/xilinx_uartlite.h | 1 +
include/hw/cris/etraxfs.h | 1 +
include/hw/display/macfb.h | 3 ++-
include/hw/dma/sifive_pdma.h | 2 ++
include/hw/i386/ioapic_internal.h | 1 +
include/hw/i386/sgx-epc.h | 1 +
include/hw/intc/goldfish_pic.h | 2 ++
include/hw/intc/loongarch_pch_msi.h | 2 ++
include/hw/intc/loongarch_pch_pic.h | 2 ++
include/hw/intc/nios2_vic.h | 2 ++
include/hw/misc/mchp_pfsoc_dmc.h | 2 ++
include/hw/misc/mchp_pfsoc_ioscb.h | 2 ++
include/hw/misc/mchp_pfsoc_sysreg.h | 2 ++
include/hw/misc/pvpanic.h | 1 +
include/hw/misc/sifive_e_prci.h | 3 ++-
include/hw/misc/sifive_u_otp.h | 3 ++-
include/hw/misc/sifive_u_prci.h | 3 ++-
include/hw/misc/virt_ctrl.h | 2 ++
include/hw/misc/xlnx-versal-pmc-iou-slcr.h | 1 +
include/hw/net/lasi_82596.h | 2 +-
include/hw/net/xlnx-zynqmp-can.h | 1 +
include/hw/ppc/pnv_psi.h | 2 +-
include/hw/riscv/boot_opensbi.h | 2 ++
include/hw/riscv/microchip_pfsoc.h | 3 +++
include/hw/riscv/numa.h | 1 +
include/hw/riscv/sifive_u.h | 2 ++
include/hw/riscv/spike.h | 2 +-
include/hw/riscv/virt.h | 2 +-
include/hw/ssi/sifive_spi.h | 3 +++
include/hw/timer/sse-timer.h | 1 +
include/hw/usb/hcd-dwc3.h | 1 +
include/hw/usb/hcd-musb.h | 2 ++
include/hw/usb/xlnx-usb-subsystem.h | 2 ++
include/hw/usb/xlnx-versal-usb2-ctrl-regs.h | 3 +++
include/hw/virtio/virtio-mmio.h | 2 +-
include/hw/virtio/virtio.h | 1 -
include/qemu/plugin-memory.h | 3 +++
include/sysemu/dirtyrate.h | 2 ++
include/sysemu/dump.h | 1 +
include/user/syscall-trace.h | 1 +
hw/virtio/virtio.c | 1 +
45 files changed, 72 insertions(+), 10 deletions(-)
--
2.37.3
- [PATCH 0/2] Clean up includes,
Markus Armbruster <=