Commit 75f48413bb for qemu.org
commit 75f48413bb55f765c9ac8b36da3c993733c66d13
Author: Peter Maydell <peter.maydell@linaro.org>
Date: Fri Jan 16 12:58:30 2026 +0000
all: Clean up includes
This commit was created with scripts/clean-includes:
./scripts/clean-includes '--git' 'all' '--all'
and manually edited to remove one change to hw/virtio/cbor-helpers.c.
All these changes are header files that include osdep.h or some
system header that osdep.h pulls in; they don't need to do this.
All .c should include qemu/osdep.h first. The script performs three
related cleanups:
* Ensure .c files include qemu/osdep.h first.
* Including it in a .h is redundant, since the .c already includes
it. Drop such inclusions.
* Likewise, including headers qemu/osdep.h includes is redundant.
Drop these, too.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20260116125830.926296-5-peter.maydell@linaro.org
diff --git a/hw/scsi/lasi_ncr710.h b/hw/scsi/lasi_ncr710.h
index 99be001fc3..450fb7e1c3 100644
--- a/hw/scsi/lasi_ncr710.h
+++ b/hw/scsi/lasi_ncr710.h
@@ -15,7 +15,6 @@
#define HW_LASI_NCR710_H
#include "hw/core/sysbus.h"
-#include "qemu/osdep.h"
#include "exec/memattrs.h"
#include "hw/scsi/scsi.h"
#include "hw/scsi/ncr53c710.h"
diff --git a/hw/scsi/ncr53c710.h b/hw/scsi/ncr53c710.h
index a8dc92f4ef..00b6a01577 100644
--- a/hw/scsi/ncr53c710.h
+++ b/hw/scsi/ncr53c710.h
@@ -15,7 +15,6 @@
#ifndef HW_NCR53C710_H
#define HW_NCR53C710_H
-#include "qemu/osdep.h"
#include "hw/core/sysbus.h"
#include "hw/scsi/scsi.h"
#include "qemu/fifo8.h"
diff --git a/include/hw/core/loader.h b/include/hw/core/loader.h
index dd22cbb5e8..d9431e8a8d 100644
--- a/include/hw/core/loader.h
+++ b/include/hw/core/loader.h
@@ -1,7 +1,6 @@
#ifndef LOADER_H
#define LOADER_H
#include "hw/nvram/fw_cfg.h"
-#include "qemu/typedefs.h"
/* loader.c */
/**
diff --git a/include/hw/i386/tdvf.h b/include/hw/i386/tdvf.h
index e75c8d1acc..4d7362ad65 100644
--- a/include/hw/i386/tdvf.h
+++ b/include/hw/i386/tdvf.h
@@ -9,7 +9,6 @@
#ifndef HW_I386_TDVF_H
#define HW_I386_TDVF_H
-#include "qemu/osdep.h"
#define TDVF_SECTION_TYPE_BFV 0
#define TDVF_SECTION_TYPE_CFV 1
diff --git a/include/hw/ppc/spapr_fadump.h b/include/hw/ppc/spapr_fadump.h
index fde2830e94..82681fb9a6 100644
--- a/include/hw/ppc/spapr_fadump.h
+++ b/include/hw/ppc/spapr_fadump.h
@@ -6,7 +6,6 @@
#ifndef PPC_SPAPR_FADUMP_H
#define PPC_SPAPR_FADUMP_H
-#include "qemu/osdep.h"
#include "cpu.h"
/* Fadump commands */
diff --git a/include/hw/riscv/iommu.h b/include/hw/riscv/iommu.h
index 25f1a8b159..999384fc89 100644
--- a/include/hw/riscv/iommu.h
+++ b/include/hw/riscv/iommu.h
@@ -19,7 +19,6 @@
#ifndef HW_RISCV_IOMMU_H
#define HW_RISCV_IOMMU_H
-#include "qemu/osdep.h"
#include "qom/object.h"
#define TYPE_RISCV_IOMMU "riscv-iommu"
diff --git a/include/system/accel-irq.h b/include/system/accel-irq.h
index 671fb7dfdb..a2caa06f54 100644
--- a/include/system/accel-irq.h
+++ b/include/system/accel-irq.h
@@ -12,7 +12,6 @@
#ifndef SYSTEM_ACCEL_IRQ_H
#define SYSTEM_ACCEL_IRQ_H
#include "hw/pci/msi.h"
-#include "qemu/osdep.h"
#include "system/kvm.h"
#include "system/mshv.h"
diff --git a/linux-user/alpha/target_proc.h b/linux-user/alpha/target_proc.h
index 6b491ffa3a..71949d380d 100644
--- a/linux-user/alpha/target_proc.h
+++ b/linux-user/alpha/target_proc.h
@@ -6,7 +6,6 @@
#ifndef ALPHA_TARGET_PROC_H
#define ALPHA_TARGET_PROC_H
-#include "qemu/osdep.h"
#include "target/alpha/cpu.h"
static uint8_t alpha_phys_addr_space_bits(CPUAlphaState *env)
diff --git a/qga/commands-windows-ssh.h b/qga/commands-windows-ssh.h
index 40ac67c4d9..c35d945a89 100644
--- a/qga/commands-windows-ssh.h
+++ b/qga/commands-windows-ssh.h
@@ -11,7 +11,6 @@
*/
#include <glib/gstrfuncs.h>
-#include <stdbool.h>
typedef struct WindowsUserInfo {
char *sshDirectory;
char *authorizedKeyFile;
diff --git a/qga/vss-win32/vss-debug.h b/qga/vss-win32/vss-debug.h
index 7800457392..506cee6698 100644
--- a/qga/vss-win32/vss-debug.h
+++ b/qga/vss-win32/vss-debug.h
@@ -10,7 +10,6 @@
* See the COPYING file in the top-level directory.
*/
-#include "qemu/osdep.h"
#include <vss-handles.h>
#ifndef VSS_DEBUG_H
diff --git a/target/i386/kvm/vmsr_energy.h b/target/i386/kvm/vmsr_energy.h
index 151bcbd642..415d64f51c 100644
--- a/target/i386/kvm/vmsr_energy.h
+++ b/target/i386/kvm/vmsr_energy.h
@@ -14,8 +14,6 @@
#ifndef VMSR_ENERGY_H
#define VMSR_ENERGY_H
-#include <stdint.h>
-#include "qemu/osdep.h"
#include "io/channel-socket.h"
#include "hw/i386/topology.h"