public inbox for qemu-devel@nongnu.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Clean up header guards again
@ 2026-01-19 10:05 Markus Armbruster
  2026-01-19 10:05 ` [PATCH 1/5] scripts/clean-header-guards: Update exclusions Markus Armbruster
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Markus Armbruster @ 2026-01-19 10:05 UTC (permalink / raw)
  To: qemu-devel

Our use of header guards is rather sloppy.  Sloppiness there can lead
to confusing compilation errors.  This series cleans up existing
header guards.  In particular, it normalizes guard symbols to follow a
common pattern, in the hope of making clashes less likely.  It doesn't
add new header guards.  We have more than 300 headers without a
recognizable header guard.  A few of them are for multiple inclusion,
many don't need header guards because they don't do anything but
include, but quite a few probably should have one.  Left for another
day.

Previously cleaned up in merge commit ec11dc41eec (2022), merge commit
01807c8b0e9 (2019), and merge commit ca3d87d4c84 (2016).

Markus Armbruster (5):
  scripts/clean-header-guards: Update exclusions
  Clean up header guards that don't match their file name
  Clean up ill-advised or unusual header guards
  Normalize header guard symbol definition
  Clean up decorations and whitespace around header guards

 accel/accel-internal.h                      | 2 +-
 accel/tcg/tb-internal.h                     | 4 ++--
 backends/tpm/tpm_ioctl.h                    | 7 ++++---
 bsd-user/bsd-proc.h                         | 6 +++---
 crypto/akcipherpriv.h                       | 2 +-
 crypto/der.h                                | 2 +-
 crypto/tlscredsbox.h                        | 6 +++---
 hw/i386/tdvf-hob.h                          | 4 ++--
 hw/net/e1000x_regs.h                        | 2 +-
 hw/net/igb_regs.h                           | 4 ++--
 hw/riscv/riscv-iommu-bits.h                 | 2 +-
 hw/riscv/riscv-iommu.h                      | 4 ++--
 include/accel/accel-cpu-target.h            | 2 +-
 include/exec/page-protection.h              | 5 +++--
 include/exec/replay-core.h                  | 4 ++--
 include/exec/target_long.h                  | 6 +++---
 include/exec/tb-flush.h                     | 7 ++++---
 include/exec/tlb-common.h                   | 3 ++-
 include/exec/tswap.h                        | 2 +-
 include/gdbstub/helpers.h                   | 6 +++---
 include/gdbstub/syscalls.h                  | 6 +++---
 include/hw/acpi/ich9_tco.h                  | 6 +++---
 include/hw/arm/raspberrypi-fw-defs.h        | 7 +++----
 include/hw/arm/stm32l4x5_soc.h              | 4 ++--
 include/hw/audio/virtio-snd.h               | 4 ++--
 include/hw/char/max78000_uart.h             | 2 +-
 include/hw/core/hw-error.h                  | 4 ++--
 include/hw/core/qdev.h                      | 4 ++--
 include/hw/core/sysemu-cpu-ops.h            | 6 +++---
 include/hw/fsi/fsi-master.h                 | 3 ++-
 include/hw/gpio/pcf8574.h                   | 6 +++---
 include/hw/intc/loongarch_extioi_common.h   | 2 +-
 include/hw/intc/loongarch_pic_common.h      | 2 +-
 include/hw/loongarch/virt.h                 | 4 ++--
 include/hw/misc/allwinner-a10-ccm.h         | 2 +-
 include/hw/misc/sifive_e_aon.h              | 4 ++--
 include/hw/misc/xlnx-cfi-if.h               | 3 ++-
 include/hw/misc/xlnx-versal-cfu.h           | 5 +++--
 include/hw/net/xlnx-versal-canfd.h          | 4 ++--
 include/hw/pci-bridge/cxl_upstream_port.h   | 7 ++++---
 include/hw/pci-host/fsl_imx8m_phy.h         | 4 ++--
 include/hw/ppc/pnv_n1_chiplet.h             | 2 +-
 include/hw/ppc/pnv_nest_pervasive.h         | 6 +++---
 include/hw/ssi/pnv_spi_regs.h               | 4 ++--
 include/hw/virtio/vdpa-dev.h                | 5 +++--
 include/hw/virtio/vhost-user-gpio.h         | 6 +++---
 include/hw/virtio/vhost-user-scmi.h         | 6 +++---
 include/hw/xen/xen-pvh-common.h             | 4 ++--
 include/io/channel-null.h                   | 4 ++--
 include/qapi/qmp-registry.h                 | 4 ++--
 include/qemu/mem-reentrancy.h               | 2 +-
 include/qemu/target-info-qapi.h             | 4 ++--
 include/semihosting/uaccess.h               | 2 +-
 include/system/cpu-timers-internal.h        | 6 +++---
 include/system/dirtylimit.h                 | 5 +++--
 include/system/ioport.h                     | 2 +-
 include/system/spdm-socket.h                | 4 ++--
 include/tcg/insn-start-words.h              | 6 +++---
 include/tcg/tcg-temp-internal.h             | 2 +-
 include/user/tswap-target.h                 | 5 +++--
 qga/cutils.h                                | 6 +++---
 target/arm/cpu-features.h                   | 4 ++--
 target/arm/tcg/mte_helper.h                 | 6 +++---
 target/hexagon/idef-parser/parser-helpers.h | 2 +-
 target/i386/confidential-guest.h            | 5 +++--
 target/i386/emulate/x86.h                   | 4 ++--
 target/i386/emulate/x86_decode.h            | 4 ++--
 target/i386/emulate/x86_flags.h             | 6 +++---
 target/i386/kvm/xen-compat.h                | 2 +-
 target/loongarch/cpu-mmu.h                  | 2 +-
 target/loongarch/tcg/tcg_loongarch.h        | 4 +++-
 target/riscv/cpu_vendorid.h                 | 2 +-
 target/sparc/translate.h                    | 5 +++--
 target/xtensa/core-lx106/core-isa.h         | 7 +++----
 scripts/clean-header-guards.pl              | 5 +++--
 75 files changed, 163 insertions(+), 149 deletions(-)

-- 
2.52.0



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-01-19 15:16 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-19 10:05 [PATCH 0/5] Clean up header guards again Markus Armbruster
2026-01-19 10:05 ` [PATCH 1/5] scripts/clean-header-guards: Update exclusions Markus Armbruster
2026-01-19 10:33   ` Daniel P. Berrangé
2026-01-19 10:05 ` [PATCH 2/5] Clean up header guards that don't match their file name Markus Armbruster
2026-01-19 10:35   ` Daniel P. Berrangé
2026-01-19 10:05 ` [PATCH 3/5] Clean up ill-advised or unusual header guards Markus Armbruster
2026-01-19 10:35   ` Daniel P. Berrangé
2026-01-19 15:09   ` Warner Losh
2026-01-19 10:05 ` [PATCH 4/5] Normalize header guard symbol definition Markus Armbruster
2026-01-19 10:35   ` Daniel P. Berrangé
2026-01-19 10:05 ` [PATCH 5/5] Clean up decorations and whitespace around header guards Markus Armbruster
2026-01-19 10:36   ` Daniel P. Berrangé
2026-01-19 10:46 ` [PATCH 0/5] Clean up header guards again Daniel P. Berrangé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox