[PULL 14/22] all: Clean up includes

Maintainers: Magnus Kulke <magnus.kulke@linux.microsoft.com>, Wei Liu <wei.liu@kernel.org>, Warner Losh <imp@bsdimp.com>, Kyle Evans <kevans@freebsd.org>, "Alex Bennée" <alex.bennee@linaro.org>, "Daniel P. Berrangé" <berrange@redhat.com>, Thomas Huth <thuth@redhat.com>, Markus Armbruster <armbru@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Yi Liu <yi.l.liu@intel.com>, Eric Auger <eric.auger@redhat.com>, Zhenzhong Duan <zhenzhong.duan@intel.com>, Ninad Palsule <ninad@linux.ibm.com>, "Cédric Le Goater" <clg@kaod.org>, Peter Maydell <peter.maydell@linaro.org>, Steven Lee <steven_lee@aspeedtech.com>, Troy Lee <leetroy@gmail.com>, Jamin Lin <jamin_lin@aspeedtech.com>, Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>, Bernhard Beschow <shentey@gmail.com>, Alexandre Iooss <erdnaxe@crans.org>, Alistair Francis <alistair@alistair23.me>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Yanan Wang <wangyanan55@huawei.com>, Zhao Liu <zhao1.liu@intel.com>, Richard Henderson <richard.henderson@linaro.org>, Helge Deller <deller@gmx.de>, Fam Zheng <fam@euphon.net>, "Michael S. Tsirkin" <mst@redhat.com>, Aditya Gupta <adityag@linux.ibm.com>, Sourabh Jain <sourabhjain@linux.ibm.com>, Nicholas Piggin <npiggin@gmail.com>, Harsh Prateek Bora <harshpb@linux.ibm.com>, Palmer Dabbelt <palmer@dabbelt.com>, Weiwei Li <liwei1518@gmail.com>, Daniel Henrique Barboza <dbarboza@ventanamicro.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, Michael Roth <michael.roth@amd.com>, Kostiantyn Kostiuk <kkostiuk@redhat.com>, John Snow <jsnow@redhat.com>, Mauro Carvalho Chehab <mchehab+huawei@kernel.org>, Marcelo Tosatti <mtosatti@redhat.com>, Song Gao <gaosong@loongson.cn>
There is a newer version of this series
[PULL 14/22] all: Clean up includes
Posted by Peter Maydell 1 day, 19 hours ago
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
---
 hw/scsi/lasi_ncr710.h          | 1 -
 hw/scsi/ncr53c710.h            | 1 -
 include/hw/core/loader.h       | 1 -
 include/hw/i386/tdvf.h         | 1 -
 include/hw/ppc/spapr_fadump.h  | 1 -
 include/hw/riscv/iommu.h       | 1 -
 include/system/accel-irq.h     | 1 -
 linux-user/alpha/target_proc.h | 1 -
 qga/commands-windows-ssh.h     | 1 -
 qga/vss-win32/vss-debug.h      | 1 -
 target/i386/kvm/vmsr_energy.h  | 2 --
 11 files changed, 12 deletions(-)

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"
 
-- 
2.47.3