Header cleanup patches for 2023-02-06

-----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmPjQRUSHGFybWJydUBy
 ZWRoYXQuY29tAAoJEDhwtADrkYZTWHwQAI5D2HTRt3peFSPg/tFuYqSGtOobzM5x
 xdZxjWCtGV+dZ4TsyQ7yJkQ2i6aPjs0LzmTnTIsmf+p1OJSthvp4fQUzfXQauiJy
 OnNA76v7WjiXB8u8tcXtEkkHNmccp8n4KMjk33TfK/HQVx7lZ2EFurlCkvBr5wki
 FuDVad6R43ChmvBWdCUOi6G1IklAihm8AN4lBJu3iC7U8bjW4FmLLMitcu5OyKgt
 v9V4XFAe4eYUIPZ6uH5Lpr5m/qtrRXLe9KOdRUR2vDVL18Cf6Zl7mrUNtv7iV5TI
 hBOA12ZP5XXf81FXl7e8y3Xi2KXvb/el0wQ7SvtE7XB3Pdbfa5WSGKOc3VxYLmBA
 4xUnEbzAogrrruovdk1bmh2LnVzCH66m72xaLCHBvjOU3M6V2B0eeaZ35FxNuFcB
 toHPAjeuzWkDAscVYcYKuPwnkNOMNqHxEdihrgy6mYLr6nauIYr7Lqgs3SqGqpct
 /HGy683+J+AqnHFTk1MTRftDxqk/Nku6ntAxLXndkpm3uDvu+iV5d3BfK3A9t7d1
 A2Y983DU6SiVwpMIv2eDL8sXYxuwIs56ZmPYIcSbqzpCXtdFqwWOTeFET/4vD+8t
 V3YKJ27jmWQ9bxbLHGPPYSKheuCVBIGsqxouE/Pbj5nXRKm/TeGp+20a4dWdE08r
 2WTLAQbVQGD4
 =5TPW
 -----END PGP SIGNATURE-----

Merge tag 'pull-include-2023-02-06-v2' of https://repo.or.cz/qemu/armbru into staging

Header cleanup patches for 2023-02-06

# -----BEGIN PGP SIGNATURE-----
#
# iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmPjQRUSHGFybWJydUBy
# ZWRoYXQuY29tAAoJEDhwtADrkYZTWHwQAI5D2HTRt3peFSPg/tFuYqSGtOobzM5x
# xdZxjWCtGV+dZ4TsyQ7yJkQ2i6aPjs0LzmTnTIsmf+p1OJSthvp4fQUzfXQauiJy
# OnNA76v7WjiXB8u8tcXtEkkHNmccp8n4KMjk33TfK/HQVx7lZ2EFurlCkvBr5wki
# FuDVad6R43ChmvBWdCUOi6G1IklAihm8AN4lBJu3iC7U8bjW4FmLLMitcu5OyKgt
# v9V4XFAe4eYUIPZ6uH5Lpr5m/qtrRXLe9KOdRUR2vDVL18Cf6Zl7mrUNtv7iV5TI
# hBOA12ZP5XXf81FXl7e8y3Xi2KXvb/el0wQ7SvtE7XB3Pdbfa5WSGKOc3VxYLmBA
# 4xUnEbzAogrrruovdk1bmh2LnVzCH66m72xaLCHBvjOU3M6V2B0eeaZ35FxNuFcB
# toHPAjeuzWkDAscVYcYKuPwnkNOMNqHxEdihrgy6mYLr6nauIYr7Lqgs3SqGqpct
# /HGy683+J+AqnHFTk1MTRftDxqk/Nku6ntAxLXndkpm3uDvu+iV5d3BfK3A9t7d1
# A2Y983DU6SiVwpMIv2eDL8sXYxuwIs56ZmPYIcSbqzpCXtdFqwWOTeFET/4vD+8t
# V3YKJ27jmWQ9bxbLHGPPYSKheuCVBIGsqxouE/Pbj5nXRKm/TeGp+20a4dWdE08r
# 2WTLAQbVQGD4
# =5TPW
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 08 Feb 2023 06:28:37 GMT
# gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg:                issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* tag 'pull-include-2023-02-06-v2' of https://repo.or.cz/qemu/armbru:
  Drop duplicate #include
  Don't include headers already included by qemu/osdep.h
  Fix non-first inclusions of qemu/osdep.h
  accel: Clean up includes
  block: Clean up includes
  riscv: Clean up includes
  target/hexagon: Clean up includes
  net: Clean up includes
  migration: Clean up includes
  qga: Clean up includes
  hw/tricore: Clean up includes
  hw/input: Clean up includes
  hw/cxl: Clean up includes
  crypto: Clean up includes
  bsd-user: Clean up includes
  scripts/clean-includes: Improve --git commit message
  scripts/clean-includes: Skip symbolic links
  scripts/clean-includes: Don't claim duplicate headers found when not
  scripts/clean-includes: Fully skip / ignore files

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
master
Peter Maydell 2023-02-08 10:40:06 +00:00
commit ae2b5d8381
89 changed files with 38 additions and 123 deletions

View File

@ -28,7 +28,6 @@
#include "exec/exec-all.h" #include "exec/exec-all.h"
#include "tcg/tcg.h" #include "tcg/tcg.h"
#include "qemu/atomic.h" #include "qemu/atomic.h"
#include "qemu/compiler.h"
#include "qemu/timer.h" #include "qemu/timer.h"
#include "qemu/rcu.h" #include "qemu/rcu.h"
#include "exec/log.h" #include "exec/log.h"

View File

@ -14,9 +14,9 @@
* to recording, which is what guest systems expect. * to recording, which is what guest systems expect.
*/ */
#include "qemu/osdep.h"
#include <poll.h> #include <poll.h>
#include <sndio.h> #include <sndio.h>
#include "qemu/osdep.h"
#include "qemu/main-loop.h" #include "qemu/main-loop.h"
#include "audio.h" #include "audio.h"
#include "trace.h" #include "trace.h"

View File

@ -9,9 +9,9 @@
* This work is licensed under the terms of the GNU GPL, version 2 or later. * This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory. * See the COPYING file in the top-level directory.
*/ */
#include <sys/ioctl.h>
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include <sys/ioctl.h>
#include "qom/object_interfaces.h" #include "qom/object_interfaces.h"
#include "qapi/error.h" #include "qapi/error.h"
#include "sysemu/hostmem.h" #include "sysemu/hostmem.h"

View File

@ -35,7 +35,6 @@
#include "sysemu/runstate.h" #include "sysemu/runstate.h"
#include "sysemu/tpm_backend.h" #include "sysemu/tpm_backend.h"
#include "sysemu/tpm_util.h" #include "sysemu/tpm_util.h"
#include "sysemu/runstate.h"
#include "tpm_int.h" #include "tpm_int.h"
#include "tpm_ioctl.h" #include "tpm_ioctl.h"
#include "migration/blocker.h" #include "migration/blocker.h"

View File

@ -12,8 +12,6 @@
# define __USE_LINUX_IOCTL_DEFS # define __USE_LINUX_IOCTL_DEFS
#endif #endif
#include <stdint.h>
#include <sys/types.h>
#ifndef _WIN32 #ifndef _WIN32
#include <sys/uio.h> #include <sys/uio.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>

View File

@ -10,9 +10,9 @@
* later. See the COPYING file in the top-level directory. * later. See the COPYING file in the top-level directory.
*/ */
#include "qemu/osdep.h"
#include <sys/eventfd.h> #include <sys/eventfd.h>
#include "qemu/osdep.h"
#include "qapi/error.h" #include "qapi/error.h"
#include "block/export.h" #include "block/export.h"
#include "qemu/error-report.h" #include "qemu/error-report.h"

View File

@ -40,7 +40,6 @@
#include "qapi/qmp/qstring.h" #include "qapi/qmp/qstring.h"
#include "qemu/qemu-print.h" #include "qemu/qemu-print.h"
#include "sysemu/block-backend.h" #include "sysemu/block-backend.h"
#include "qemu/cutils.h"
BlockDeviceInfo *bdrv_block_device_info(BlockBackend *blk, BlockDeviceInfo *bdrv_block_device_info(BlockBackend *blk,
BlockDriverState *bs, BlockDriverState *bs,

View File

@ -17,6 +17,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/ */
#include "qemu/osdep.h"
#include "qemu.h" #include "qemu.h"
/* /*

View File

@ -16,6 +16,8 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/ */
#include "qemu/osdep.h"
#include "target_arch.h" #include "target_arch.h"
void target_cpu_set_tls(CPUARMState *env, target_ulong newtls) void target_cpu_set_tls(CPUARMState *env, target_ulong newtls)

View File

@ -20,11 +20,7 @@
#ifndef BSD_PROC_H_ #ifndef BSD_PROC_H_
#define BSD_PROC_H_ #define BSD_PROC_H_
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/resource.h> #include <sys/resource.h>
#include <unistd.h>
/* exit(2) */ /* exit(2) */
static inline abi_long do_bsd_exit(void *cpu_env, abi_long arg1) static inline abi_long do_bsd_exit(void *cpu_env, abi_long arg1)

View File

@ -17,6 +17,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/ */
#include "qemu/osdep.h"
#include "qemu.h" #include "qemu.h"
#include "target_arch_sysarch.h" #include "target_arch_sysarch.h"

View File

@ -17,6 +17,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/ */
#include "qemu/osdep.h"
#include "qemu.h" #include "qemu.h"
/* /*

View File

@ -17,9 +17,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/ */
#include <sys/types.h>
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "cpu.h" #include "cpu.h"
#include "qemu.h" #include "qemu.h"
#include "qemu/timer.h" #include "qemu/timer.h"

View File

@ -18,12 +18,10 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/ */
#include <sys/types.h> #include "qemu/osdep.h"
#include <sys/time.h>
#include <sys/resource.h> #include <sys/resource.h>
#include <sys/sysctl.h> #include <sys/sysctl.h>
#include "qemu/osdep.h"
#include "qemu/help-texts.h" #include "qemu/help-texts.h"
#include "qemu/units.h" #include "qemu/units.h"
#include "qemu/accel.h" #include "qemu/accel.h"

View File

@ -17,7 +17,6 @@
#ifndef QEMU_H #ifndef QEMU_H
#define QEMU_H #define QEMU_H
#include "qemu/osdep.h"
#include "cpu.h" #include "cpu.h"
#include "qemu/units.h" #include "qemu/units.h"
#include "exec/cpu_ldst.h" #include "exec/cpu_ldst.h"

View File

@ -20,7 +20,6 @@
#include <sys/select.h> #include <sys/select.h>
#include <sys/syscall.h> #include <sys/syscall.h>
#include <sys/ioccom.h> #include <sys/ioccom.h>
#include <ctype.h>
#include "qemu.h" #include "qemu.h"

View File

@ -16,6 +16,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/ */
#include "qemu/osdep.h"
#include "qemu.h" #include "qemu.h"
/* /*

View File

@ -17,9 +17,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/ */
#include <sys/types.h>
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "cpu.h" #include "cpu.h"
#include "qemu.h" #include "qemu.h"
#include "qemu/timer.h" #include "qemu/timer.h"

View File

@ -18,7 +18,6 @@
* *
*/ */
#include "qemu/osdep.h"
#include "qapi/error.h" #include "qapi/error.h"
#include "qemu/bswap.h" #include "qemu/bswap.h"

View File

@ -27,8 +27,6 @@
#ifndef QEMU_P9ARRAY_H #ifndef QEMU_P9ARRAY_H
#define QEMU_P9ARRAY_H #define QEMU_P9ARRAY_H
#include "qemu/compiler.h"
/** /**
* P9Array provides a mechanism to access arrays in common C-style (e.g. by * P9Array provides a mechanism to access arrays in common C-style (e.g. by
* square bracket [] operator) in conjunction with reference variables that * square bracket [] operator) in conjunction with reference variables that

View File

@ -19,8 +19,6 @@
#include "qemu/osdep.h" #include "qemu/osdep.h"
#ifdef CONFIG_LINUX #ifdef CONFIG_LINUX
#include <linux/limits.h> #include <linux/limits.h>
#else
#include <limits.h>
#endif #endif
#include <glib/gprintf.h> #include <glib/gprintf.h>
#include "hw/virtio/virtio.h" #include "hw/virtio/virtio.h"

View File

@ -34,7 +34,6 @@
#include "sysemu/xen.h" #include "sysemu/xen.h"
#include "qapi/error.h" #include "qapi/error.h"
#include "qemu/range.h" #include "qemu/range.h"
#include "hw/acpi/pcihp.h"
#include "hw/acpi/cpu_hotplug.h" #include "hw/acpi/cpu_hotplug.h"
#include "hw/acpi/cpu.h" #include "hw/acpi/cpu.h"
#include "hw/hotplug.h" #include "hw/hotplug.h"

View File

@ -18,7 +18,6 @@
#include "net/net.h" #include "net/net.h"
#include "qemu/cutils.h" #include "qemu/cutils.h"
#include "qemu/datadir.h" #include "qemu/datadir.h"
#include "net/net.h"
static uint64_t cpu_alpha_superpage_to_phys(void *opaque, uint64_t addr) static uint64_t cpu_alpha_superpage_to_phys(void *opaque, uint64_t addr)
{ {

View File

@ -33,7 +33,6 @@
#include "qemu/units.h" #include "qemu/units.h"
#include "qemu/option.h" #include "qemu/option.h"
#include "monitor/qdev.h" #include "monitor/qdev.h"
#include "qapi/error.h"
#include "hw/sysbus.h" #include "hw/sysbus.h"
#include "hw/arm/boot.h" #include "hw/arm/boot.h"
#include "hw/arm/primecell.h" #include "hw/arm/primecell.h"

View File

@ -22,7 +22,6 @@
#include "hw/misc/unimp.h" #include "hw/misc/unimp.h"
#include "hw/arm/xlnx-versal.h" #include "hw/arm/xlnx-versal.h"
#include "qemu/log.h" #include "qemu/log.h"
#include "hw/sysbus.h"
#define XLNX_VERSAL_ACPU_TYPE ARM_CPU_TYPE_NAME("cortex-a72") #define XLNX_VERSAL_ACPU_TYPE ARM_CPU_TYPE_NAME("cortex-a72")
#define XLNX_VERSAL_RCPU_TYPE ARM_CPU_TYPE_NAME("cortex-r5f") #define XLNX_VERSAL_RCPU_TYPE ARM_CPU_TYPE_NAME("cortex-r5f")

View File

@ -45,7 +45,6 @@
#include "qapi/error.h" #include "qapi/error.h"
#include "qemu/error-report.h" #include "qemu/error-report.h"
#include "qemu/bitops.h" #include "qemu/bitops.h"
#include "qemu/error-report.h"
#include "qemu/host-utils.h" #include "qemu/host-utils.h"
#include "qemu/log.h" #include "qemu/log.h"
#include "qemu/module.h" #include "qemu/module.h"

View File

@ -39,7 +39,6 @@
#include "exec/confidential-guest-support.h" #include "exec/confidential-guest-support.h"
#include "hw/virtio/virtio.h" #include "hw/virtio/virtio.h"
#include "hw/virtio/virtio-pci.h" #include "hw/virtio/virtio-pci.h"
#include "qom/object_interfaces.h"
GlobalProperty hw_compat_7_2[] = { GlobalProperty hw_compat_7_2[] = {
{ "virtio-mem", "x-early-migration", "false" }, { "virtio-mem", "x-early-migration", "false" },

View File

@ -21,7 +21,6 @@
#include "exec/ramblock.h" #include "exec/ramblock.h"
#include "sysemu/hostmem.h" #include "sysemu/hostmem.h"
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <fcntl.h>
#include <linux/memfd.h> #include <linux/memfd.h>
#include "qemu/memfd.h" #include "qemu/memfd.h"
#include "standard-headers/linux/udmabuf.h" #include "standard-headers/linux/udmabuf.h"

View File

@ -28,7 +28,6 @@
#include "qapi/error.h" #include "qapi/error.h"
#include "net/net.h" #include "net/net.h"
#include "qemu/log.h" #include "qemu/log.h"
#include "net/net.h"
#define MIN_SEABIOS_HPPA_VERSION 6 /* require at least this fw version */ #define MIN_SEABIOS_HPPA_VERSION 6 /* require at least this fw version */

View File

@ -5,8 +5,8 @@
* See the COPYING file in the top-level directory. * See the COPYING file in the top-level directory.
*/ */
#include "qemu/ctype.h"
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "qemu/ctype.h"
#include "qemu/error-report.h" #include "qemu/error-report.h"
#include "qemu/main-loop.h" #include "qemu/main-loop.h"
#include "qemu/sockets.h" #include "qemu/sockets.h"

View File

@ -8,7 +8,6 @@
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include <math.h> #include <math.h>
#include <string.h>
#include "hw/i2c/pmbus_device.h" #include "hw/i2c/pmbus_device.h"
#include "migration/vmstate.h" #include "migration/vmstate.h"
#include "qemu/module.h" #include "qemu/module.h"

View File

@ -76,7 +76,6 @@
#include "hw/acpi/hmat.h" #include "hw/acpi/hmat.h"
#include "hw/acpi/viot.h" #include "hw/acpi/viot.h"
#include "hw/acpi/cxl.h"
#include CONFIG_DEVICES #include CONFIG_DEVICES

View File

@ -20,7 +20,6 @@
*/ */
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "qemu/log.h"
#include "hw/hw.h" #include "hw/hw.h"
#include "audio/audio.h" #include "audio/audio.h"
#include "qemu/timer.h" #include "qemu/timer.h"

View File

@ -22,7 +22,6 @@
/* Supported chipsets: */ /* Supported chipsets: */
#include "hw/pci-host/ls7a.h" #include "hw/pci-host/ls7a.h"
#include "hw/loongarch/virt.h" #include "hw/loongarch/virt.h"
#include "hw/acpi/aml-build.h"
#include "hw/acpi/utils.h" #include "hw/acpi/utils.h"
#include "hw/acpi/pci.h" #include "hw/acpi/pci.h"

View File

@ -28,7 +28,6 @@
#include "hw/qdev-properties.h" #include "hw/qdev-properties.h"
#include "migration/vmstate.h" #include "migration/vmstate.h"
#include "hw/misc/macio/cuda.h" #include "hw/misc/macio/cuda.h"
#include "qapi/error.h"
#include "qemu/timer.h" #include "qemu/timer.h"
#include "sysemu/runstate.h" #include "sysemu/runstate.h"
#include "sysemu/rtc.h" #include "sysemu/rtc.h"

View File

@ -33,7 +33,6 @@
#include "migration/vmstate.h" #include "migration/vmstate.h"
#include "hw/irq.h" #include "hw/irq.h"
#include "hw/misc/macio/pmu.h" #include "hw/misc/macio/pmu.h"
#include "qapi/error.h"
#include "qemu/timer.h" #include "qemu/timer.h"
#include "sysemu/runstate.h" #include "sysemu/runstate.h"
#include "sysemu/rtc.h" #include "sysemu/rtc.h"

View File

@ -31,7 +31,6 @@
#include "net/net.h" #include "net/net.h"
#include "net/checksum.h" #include "net/checksum.h"
#include "hw/hw.h"
#include "hw/irq.h" #include "hw/irq.h"
#include "hw/qdev-properties.h" #include "hw/qdev-properties.h"
#include "hw/stream.h" #include "hw/stream.h"

View File

@ -38,8 +38,6 @@
#include "sysemu/sysemu.h" #include "sysemu/sysemu.h"
#include "exec/address-spaces.h" #include "exec/address-spaces.h"
#include "hw/intc/ppc-uic.h" #include "hw/intc/ppc-uic.h"
#include "hw/qdev-properties.h"
#include "qapi/error.h"
#include "trace.h" #include "trace.h"
/*****************************************************************************/ /*****************************************************************************/

View File

@ -13,7 +13,6 @@
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "qemu/units.h" #include "qemu/units.h"
#include "qemu/error-report.h"
#include "qemu/datadir.h" #include "qemu/datadir.h"
#include "qemu/error-report.h" #include "qemu/error-report.h"
#include "net/net.h" #include "net/net.h"

View File

@ -17,7 +17,6 @@
#include "hw/ppc/spapr_drc.h" #include "hw/ppc/spapr_drc.h"
#include "qom/object.h" #include "qom/object.h"
#include "migration/vmstate.h" #include "migration/vmstate.h"
#include "qapi/error.h"
#include "qapi/qapi-events-qdev.h" #include "qapi/qapi-events-qdev.h"
#include "qapi/visitor.h" #include "qapi/visitor.h"
#include "qemu/error-report.h" #include "qemu/error-report.h"

View File

@ -14,7 +14,6 @@
*/ */
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "qemu/cutils.h"
#include "hw/pci/pci.h" #include "hw/pci/pci.h"
#include "cpu.h" #include "cpu.h"
#include "qemu/cutils.h" #include "qemu/cutils.h"

View File

@ -22,7 +22,6 @@
#include "hw/remote/iohub.h" #include "hw/remote/iohub.h"
#include "hw/remote/iommu.h" #include "hw/remote/iommu.h"
#include "hw/qdev-core.h" #include "hw/qdev-core.h"
#include "hw/remote/iommu.h"
#include "hw/remote/vfio-user-obj.h" #include "hw/remote/vfio-user-obj.h"
#include "hw/pci/msi.h" #include "hw/pci/msi.h"

View File

@ -8,7 +8,6 @@
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "qemu/compiler.h"
#include "qemu/int128.h" #include "qemu/int128.h"
#include "qemu/range.h" #include "qemu/range.h"
#include "exec/memory.h" #include "exec/memory.h"

View File

@ -12,7 +12,6 @@
#include "qemu/error-report.h" #include "qemu/error-report.h"
#include "qemu/notify.h" #include "qemu/notify.h"
#include "qom/object_interfaces.h" #include "qom/object_interfaces.h"
#include "hw/qdev-core.h"
#include "io/channel.h" #include "io/channel.h"
#include "hw/qdev-core.h" #include "hw/qdev-core.h"
#include "hw/remote/machine.h" #include "hw/remote/machine.h"

View File

@ -43,7 +43,6 @@
#include "qapi/error.h" #include "qapi/error.h"
#include "qapi/qapi-events-misc.h" #include "qapi/qapi-events-misc.h"
#include "qapi/visitor.h" #include "qapi/visitor.h"
#include "hw/rtc/mc146818rtc_regs.h"
//#define DEBUG_CMOS //#define DEBUG_CMOS
//#define DEBUG_COALESCED //#define DEBUG_COALESCED

View File

@ -15,7 +15,6 @@
#include "hw/qdev-properties.h" #include "hw/qdev-properties.h"
#include "hw/virtio/virtio-serial.h" #include "hw/virtio/virtio-serial.h"
#include "virtio-ccw.h" #include "virtio-ccw.h"
#include "hw/virtio/virtio-serial.h"
#define TYPE_VIRTIO_SERIAL_CCW "virtio-serial-ccw" #define TYPE_VIRTIO_SERIAL_CCW "virtio-serial-ccw"
OBJECT_DECLARE_SIMPLE_TYPE(VirtioSerialCcw, VIRTIO_SERIAL_CCW) OBJECT_DECLARE_SIMPLE_TYPE(VirtioSerialCcw, VIRTIO_SERIAL_CCW)

View File

@ -8,7 +8,6 @@
*/ */
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include <string.h>
#include "hw/i2c/pmbus_device.h" #include "hw/i2c/pmbus_device.h"
#include "hw/irq.h" #include "hw/irq.h"
#include "migration/vmstate.h" #include "migration/vmstate.h"

View File

@ -8,7 +8,6 @@
*/ */
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "qemu/typedefs.h"
#include "qapi/error.h" #include "qapi/error.h"
#include "hw/usb.h" #include "hw/usb.h"
#include "hw/usb/desc.h" #include "hw/usb/desc.h"

View File

@ -8,7 +8,6 @@
*/ */
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "qemu/typedefs.h"
#include "qapi/error.h" #include "qapi/error.h"
#include "qapi/visitor.h" #include "qapi/visitor.h"
#include "hw/usb.h" #include "hw/usb.h"

View File

@ -20,7 +20,6 @@
#ifndef GRAPH_LOCK_H #ifndef GRAPH_LOCK_H
#define GRAPH_LOCK_H #define GRAPH_LOCK_H
#include "qemu/osdep.h"
#include "qemu/clang-tsa.h" #include "qemu/clang-tsa.h"
/** /**

View File

@ -13,8 +13,6 @@
#ifndef BLOCK_WRITE_THRESHOLD_H #ifndef BLOCK_WRITE_THRESHOLD_H
#define BLOCK_WRITE_THRESHOLD_H #define BLOCK_WRITE_THRESHOLD_H
#include "qemu/typedefs.h"
/* /*
* bdrv_write_threshold_set: * bdrv_write_threshold_set:
* *

View File

@ -30,7 +30,6 @@
#include "hw/timer/imx_gpt.h" #include "hw/timer/imx_gpt.h"
#include "hw/timer/imx_epit.h" #include "hw/timer/imx_epit.h"
#include "hw/i2c/imx_i2c.h" #include "hw/i2c/imx_i2c.h"
#include "hw/gpio/imx_gpio.h"
#include "hw/sd/sdhci.h" #include "hw/sd/sdhci.h"
#include "hw/ssi/imx_spi.h" #include "hw/ssi/imx_spi.h"
#include "hw/net/imx_fec.h" #include "hw/net/imx_fec.h"

View File

@ -32,7 +32,6 @@
#include "hw/timer/imx_gpt.h" #include "hw/timer/imx_gpt.h"
#include "hw/timer/imx_epit.h" #include "hw/timer/imx_epit.h"
#include "hw/i2c/imx_i2c.h" #include "hw/i2c/imx_i2c.h"
#include "hw/gpio/imx_gpio.h"
#include "hw/sd/sdhci.h" #include "hw/sd/sdhci.h"
#include "hw/ssi/imx_spi.h" #include "hw/ssi/imx_spi.h"
#include "hw/net/imx_fec.h" #include "hw/net/imx_fec.h"

View File

@ -15,9 +15,7 @@
#define CXL2_COMPONENT_CM_REGION_SIZE 0x1000 #define CXL2_COMPONENT_CM_REGION_SIZE 0x1000
#define CXL2_COMPONENT_BLOCK_SIZE 0x10000 #define CXL2_COMPONENT_BLOCK_SIZE 0x10000
#include "qemu/compiler.h"
#include "qemu/range.h" #include "qemu/range.h"
#include "qemu/typedefs.h"
#include "hw/cxl/cxl_cdat.h" #include "hw/cxl/cxl_cdat.h"
#include "hw/register.h" #include "hw/register.h"
#include "qapi/error.h" #include "qapi/error.h"

View File

@ -7,7 +7,6 @@
* COPYING file in the top-level directory. * COPYING file in the top-level directory.
*/ */
#include "qemu/osdep.h"
#include "hw/cxl/cxl.h" #include "hw/cxl/cxl.h"
#include "hw/boards.h" #include "hw/boards.h"

View File

@ -10,7 +10,6 @@
#ifndef CXL_PCI_H #ifndef CXL_PCI_H
#define CXL_PCI_H #define CXL_PCI_H
#include "qemu/compiler.h"
#define CXL_VENDOR_ID 0x1e98 #define CXL_VENDOR_ID 0x1e98

View File

@ -10,7 +10,6 @@
#ifndef HW_PL050_H #ifndef HW_PL050_H
#define HW_PL050_H #define HW_PL050_H
#include "qemu/osdep.h"
#include "hw/sysbus.h" #include "hw/sysbus.h"
#include "migration/vmstate.h" #include "migration/vmstate.h"
#include "hw/input/ps2.h" #include "hw/input/ps2.h"

View File

@ -12,8 +12,6 @@
#include "hw/sysbus.h" #include "hw/sysbus.h"
#include <stdint.h>
#define TYPE_ASPEED_LPC "aspeed.lpc" #define TYPE_ASPEED_LPC "aspeed.lpc"
#define ASPEED_LPC(obj) OBJECT_CHECK(AspeedLPCState, (obj), TYPE_ASPEED_LPC) #define ASPEED_LPC(obj) OBJECT_CHECK(AspeedLPCState, (obj), TYPE_ASPEED_LPC)

View File

@ -11,7 +11,6 @@
#define PCIE_DOE_H #define PCIE_DOE_H
#include "qemu/range.h" #include "qemu/range.h"
#include "qemu/typedefs.h"
#include "hw/register.h" #include "hw/register.h"
/* /*

View File

@ -18,7 +18,6 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>. * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/ */
#include "qemu/osdep.h"
#include "qapi/error.h" #include "qapi/error.h"
#include "hw/boards.h" #include "hw/boards.h"
#include "sysemu/sysemu.h" #include "sysemu/sysemu.h"

View File

@ -13,8 +13,6 @@
#ifndef QEMU_ASYNC_TEARDOWN_H #ifndef QEMU_ASYNC_TEARDOWN_H
#define QEMU_ASYNC_TEARDOWN_H #define QEMU_ASYNC_TEARDOWN_H
#include "config-host.h"
#ifdef CONFIG_LINUX #ifdef CONFIG_LINUX
void init_async_teardown(void); void init_async_teardown(void);
#endif #endif

View File

@ -15,7 +15,6 @@
#include "qom/object.h" #include "qom/object.h"
#include "chardev/char.h" #include "chardev/char.h"
#include "qemu/notify.h" #include "qemu/notify.h"
#include "qemu/typedefs.h"
/* glib/gio 2.68 */ /* glib/gio 2.68 */
#define DBUS_METHOD_INVOCATION_HANDLED TRUE #define DBUS_METHOD_INVOCATION_HANDLED TRUE

View File

@ -30,7 +30,6 @@
#ifndef HOST_UTILS_H #ifndef HOST_UTILS_H
#define HOST_UTILS_H #define HOST_UTILS_H
#include "qemu/compiler.h"
#include "qemu/bswap.h" #include "qemu/bswap.h"
#include "qemu/int128.h" #include "qemu/int128.h"

View File

@ -15,7 +15,6 @@
#ifdef CONFIG_LINUX #ifdef CONFIG_LINUX
#include "qemu/osdep.h"
#include "exec/hwaddr.h" #include "exec/hwaddr.h"
#include <linux/userfaultfd.h> #include <linux/userfaultfd.h>

View File

@ -14,7 +14,6 @@
#ifndef ACCEL_BLOCKER_H #ifndef ACCEL_BLOCKER_H
#define ACCEL_BLOCKER_H #define ACCEL_BLOCKER_H
#include "qemu/osdep.h"
#include "sysemu/cpus.h" #include "sysemu/cpus.h"
extern void accel_blocker_init(void); extern void accel_blocker_init(void);

View File

@ -14,7 +14,6 @@
#include "qom/object.h" #include "qom/object.h"
#include "block/aio.h" #include "block/aio.h"
#include "qemu/typedefs.h"
#define TYPE_EVENT_LOOP_BASE "event-loop-base" #define TYPE_EVENT_LOOP_BASE "event-loop-base"
OBJECT_DECLARE_TYPE(EventLoopBase, EventLoopBaseClass, OBJECT_DECLARE_TYPE(EventLoopBase, EventLoopBaseClass,

View File

@ -17,7 +17,6 @@
*/ */
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "qemu/rcu.h"
#include "qemu/madvise.h" #include "qemu/madvise.h"
#include "exec/target_page.h" #include "exec/target_page.h"
#include "migration.h" #include "migration.h"
@ -34,7 +33,6 @@
#include "hw/boards.h" #include "hw/boards.h"
#include "exec/ramblock.h" #include "exec/ramblock.h"
#include "socket.h" #include "socket.h"
#include "qemu-file.h"
#include "yank_functions.h" #include "yank_functions.h"
#include "tls.h" #include "tls.h"
#include "qemu/userfaultfd.h" #include "qemu/userfaultfd.h"

View File

@ -10,7 +10,6 @@
#ifndef VMNET_INT_H #ifndef VMNET_INT_H
#define VMNET_INT_H #define VMNET_INT_H
#include "qemu/osdep.h"
#include "vmnet_int.h" #include "vmnet_int.h"
#include "clients.h" #include "clients.h"

View File

@ -51,7 +51,6 @@
#else #else
#include <net/ethernet.h> #include <net/ethernet.h>
#endif #endif
#include <sys/types.h>
#ifdef CONFIG_SOLARIS #ifdef CONFIG_SOLARIS
#include <sys/sockio.h> #include <sys/sockio.h>
#endif #endif

View File

@ -2,8 +2,9 @@
* This work is licensed under the terms of the GNU GPL, version 2 or later. * This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory. * See the COPYING file in the top-level directory.
*/ */
#include "cutils.h"
#include "qemu/osdep.h"
#include "cutils.h"
#include "qapi/error.h" #include "qapi/error.h"
/** /**

View File

@ -1,8 +1,6 @@
#ifndef CUTILS_H_ #ifndef CUTILS_H_
#define CUTILS_H_ #define CUTILS_H_
#include "qemu/osdep.h"
int qga_open_cloexec(const char *name, int flags, mode_t mode); int qga_open_cloexec(const char *name, int flags, mode_t mode);
#endif /* CUTILS_H_ */ #endif /* CUTILS_H_ */

View File

@ -111,7 +111,12 @@ cat >"$COCCIFILE" <<EOT
) )
EOT EOT
files=
for f in "$@"; do for f in "$@"; do
if [ -L "$f" ]; then
echo "SKIPPING $f (symbolic link)"
continue
fi
case "$f" in case "$f" in
*.c.inc) *.c.inc)
# These aren't standalone C source files # These aren't standalone C source files
@ -144,6 +149,7 @@ for f in "$@"; do
continue continue
;; ;;
esac esac
files="$files $f"
if [ "$MODE" = "c" ]; then if [ "$MODE" = "c" ]; then
# First, use Coccinelle to add qemu/osdep.h before the first existing include # First, use Coccinelle to add qemu/osdep.h before the first existing include
@ -174,25 +180,30 @@ for f in "$@"; do
done done
if [ "$DUPHEAD" = "yes" ]; then if [ "$DUPHEAD" = "yes" ] && [ -n "$files" ]; then
egrep "^[[:space:]]*#[[:space:]]*include" "$@" | tr -d '[:blank:]' \ if egrep "^[[:space:]]*#[[:space:]]*include" $files | tr -d '[:blank:]' \
| sort | uniq -c | awk '{if ($1 > 1) print $0}' | sort | uniq -c | grep -v '^ *1 '; then
if [ $? -eq 0 ]; then
echo "Found duplicate header file includes. Please check the above files manually." echo "Found duplicate header file includes. Please check the above files manually."
exit 1 exit 1
fi fi
fi fi
if [ "$GIT" = "yes" ]; then if [ "$GIT" = "yes" ]; then
git add -- "$@" git add -- $files
git commit --signoff -F - <<EOF git commit --signoff -F - <<EOF
$GITSUBJ: Clean up includes $GITSUBJ: Clean up includes
Clean up includes so that osdep.h is included first and headers
which it implies are not included manually.
This commit was created with scripts/clean-includes. This commit was created with scripts/clean-includes.
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.
EOF EOF
fi fi

View File

@ -11,7 +11,6 @@
*/ */
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/main-loop.h" #include "qemu/main-loop.h"
#include "qapi/qapi-commands-migration.h" #include "qapi/qapi-commands-migration.h"
#include "qapi/qmp/qdict.h" #include "qapi/qmp/qdict.h"

View File

@ -41,7 +41,6 @@
#include "qapi/qapi-commands-run-state.h" #include "qapi/qapi-commands-run-state.h"
#include "qapi/qapi-events-run-state.h" #include "qapi/qapi-events-run-state.h"
#include "qemu/error-report.h" #include "qemu/error-report.h"
#include "qemu/log.h"
#include "qemu/job.h" #include "qemu/job.h"
#include "qemu/log.h" #include "qemu/log.h"
#include "qemu/module.h" #include "qemu/module.h"

View File

@ -129,15 +129,12 @@
#include "qapi/qapi-commands-misc.h" #include "qapi/qapi-commands-misc.h"
#include "qapi/qapi-visit-qom.h" #include "qapi/qapi-visit-qom.h"
#include "qapi/qapi-commands-ui.h" #include "qapi/qapi-commands-ui.h"
#include "qapi/qmp/qdict.h"
#include "block/qdict.h" #include "block/qdict.h"
#include "qapi/qmp/qerror.h" #include "qapi/qmp/qerror.h"
#include "sysemu/iothread.h" #include "sysemu/iothread.h"
#include "qemu/guest-random.h" #include "qemu/guest-random.h"
#include "qemu/keyval.h" #include "qemu/keyval.h"
#include "config-host.h"
#define MAX_VIRTIO_CONSOLES 1 #define MAX_VIRTIO_CONSOLES 1
typedef struct BlockdevOptionsQueueEntry { typedef struct BlockdevOptionsQueueEntry {

View File

@ -18,7 +18,6 @@
#ifndef HEXAGON_HEX_ARCH_TYPES_H #ifndef HEXAGON_HEX_ARCH_TYPES_H
#define HEXAGON_HEX_ARCH_TYPES_H #define HEXAGON_HEX_ARCH_TYPES_H
#include "qemu/osdep.h"
#include "mmvec/mmvec.h" #include "mmvec/mmvec.h"
#include "qemu/int128.h" #include "qemu/int128.h"

View File

@ -18,7 +18,6 @@
#ifndef HEXAGON_MMVEC_MACROS_H #ifndef HEXAGON_MMVEC_MACROS_H
#define HEXAGON_MMVEC_MACROS_H #define HEXAGON_MMVEC_MACROS_H
#include "qemu/osdep.h"
#include "qemu/host-utils.h" #include "qemu/host-utils.h"
#include "arch.h" #include "arch.h"
#include "mmvec/system_ext_mmvec.h" #include "mmvec/system_ext_mmvec.h"

View File

@ -12,7 +12,6 @@
#include "exec/helper-proto.h" #include "exec/helper-proto.h"
#include "exec/helper-gen.h" #include "exec/helper-gen.h"
#include "exec/translator.h"
#include "exec/log.h" #include "exec/log.h"
#include "qemu/qemu-print.h" #include "qemu/qemu-print.h"
#include "fpu/softfloat.h" #include "fpu/softfloat.h"

View File

@ -32,7 +32,6 @@
#include "semihosting/semihost.h" #include "semihosting/semihost.h"
#include "trace.h" #include "trace.h"
#include "exec/translator.h"
#include "exec/log.h" #include "exec/log.h"
#include "qemu/qemu-print.h" #include "qemu/qemu-print.h"
#include "fpu_helper.h" #include "fpu_helper.h"

View File

@ -938,8 +938,6 @@ static const char * const cr_regnames[NUM_CR_REGS] = {
}; };
#endif #endif
#include "exec/gen-icount.h"
/* generate intermediate code for basic block 'tb'. */ /* generate intermediate code for basic block 'tb'. */
static void nios2_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs) static void nios2_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs)
{ {

View File

@ -16,7 +16,6 @@
* this program. If not, see <http://www.gnu.org/licenses/>. * this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "qemu/osdep.h"
#include "qemu/log.h" #include "qemu/log.h"
#include "cpu.h" #include "cpu.h"
#include "qemu/main-loop.h" #include "qemu/main-loop.h"

View File

@ -21,7 +21,6 @@
#include "exec/cpu_ldst.h" #include "exec/cpu_ldst.h"
#include "tcg/tcg-op.h" #include "tcg/tcg-op.h"
#include "tcg/tcg-ldst.h" #include "tcg/tcg-ldst.h"
#include "qemu/compiler.h"
#include <ffi.h> #include <ffi.h>

View File

@ -26,7 +26,6 @@
*/ */
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "qemu/units.h"
#include "qemu/cutils.h" #include "qemu/cutils.h"
#include "qemu/units.h" #include "qemu/units.h"

View File

@ -25,7 +25,6 @@
#include "qapi/error.h" #include "qapi/error.h"
#include "qemu/module.h" #include "qemu/module.h"
#include <unistd.h>
#include <sys/syscall.h> #include <sys/syscall.h>
static void test_seccomp_helper(const char *args, bool killed, static void test_seccomp_helper(const char *args, bool killed,

View File

@ -53,7 +53,6 @@
#include <math.h> #include <math.h>
#include "trace.h" #include "trace.h"
#include "qemu/cutils.h"
#include "ui/input.h" #include "ui/input.h"
#include "sysemu/runstate.h" #include "sysemu/runstate.h"
#include "sysemu/sysemu.h" #include "sysemu/sysemu.h"

View File

@ -8,7 +8,6 @@
#include "qapi/error.h" #include "qapi/error.h"
#include "ui/console.h" #include "ui/console.h"
#include <fcntl.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
int udmabuf_fd(void) int udmabuf_fd(void)

View File

@ -10,16 +10,12 @@
* option) any later version. See the COPYING file in the top-level directory. * option) any later version. See the COPYING file in the top-level directory.
* *
*/ */
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <dirent.h>
#include <sys/prctl.h>
#include <signal.h>
#include <sched.h>
#include <unistd.h>
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include <dirent.h>
#include <sys/prctl.h>
#include <sched.h>
#include "qemu/async-teardown.h" #include "qemu/async-teardown.h"
#ifdef _SC_THREAD_STACK_MIN #ifdef _SC_THREAD_STACK_MIN

View File

@ -33,7 +33,6 @@
#include "block/thread-pool.h" #include "block/thread-pool.h"
#include "qemu/error-report.h" #include "qemu/error-report.h"
#include "qemu/queue.h" #include "qemu/queue.h"
#include "qemu/compiler.h"
#include "qom/object.h" #include "qom/object.h"
#ifndef _WIN32 #ifndef _WIN32

View File

@ -40,7 +40,6 @@
#include "qemu/thread.h" #include "qemu/thread.h"
#include <libgen.h> #include <libgen.h>
#include "qemu/cutils.h" #include "qemu/cutils.h"
#include "qemu/compiler.h"
#include "qemu/units.h" #include "qemu/units.h"
#include "qemu/thread-context.h" #include "qemu/thread-context.h"
@ -50,7 +49,6 @@
#ifdef __FreeBSD__ #ifdef __FreeBSD__
#include <sys/thr.h> #include <sys/thr.h>
#include <sys/types.h>
#include <sys/user.h> #include <sys/user.h>
#include <libutil.h> #include <libutil.h>
#endif #endif
@ -61,10 +59,6 @@
#include "qemu/mmap-alloc.h" #include "qemu/mmap-alloc.h"
#ifdef CONFIG_DEBUG_STACK_USAGE
#include "qemu/error-report.h"
#endif
#define MAX_MEM_PREALLOC_THREAD_COUNT 16 #define MAX_MEM_PREALLOC_THREAD_COUNT 16
struct MemsetThread; struct MemsetThread;