mirror of
https://github.com/qemu/qemu.git
synced 2026-02-03 21:29:17 +00:00
misc: Clean up includes
This commit deals with various .c files that included system headers that are already pulled in by osdep.h, where the .c file includes osdep.h already itself. This commit was created with scripts/clean-includes: ./scripts/clean-includes '--git' 'misc' 'hw/core' 'semihosting' 'target/arm' 'target/i386/kvm/kvm.c' 'target/loongarch' 'target/riscv' 'tools' 'util' 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: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-id: 20260116125830.926296-4-peter.maydell@linaro.org
This commit is contained in:
@@ -30,7 +30,6 @@
|
||||
#include "system/runstate.h"
|
||||
#include "system/system.h"
|
||||
#include "hw/s390x/storage-keys.h"
|
||||
#include <sys/stat.h>
|
||||
|
||||
/*
|
||||
* QMP query for enabled and present accelerators
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "semihosting/semihost.h"
|
||||
#include <glib.h>
|
||||
|
||||
bool semihosting_arm_compatible(void)
|
||||
{
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "target/arm/cpu.h"
|
||||
#include "target/arm/internals.h"
|
||||
#include <glib.h>
|
||||
|
||||
void arm_cpu_sme_finalize(ARMCPU *cpu, Error **errp)
|
||||
{
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <sys/utsname.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <linux/kvm.h>
|
||||
#include <linux/kvm_para.h>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
/*
|
||||
* Copyright (c) 2025 Loongson Technology Corporation Limited
|
||||
*/
|
||||
#include <stddef.h>
|
||||
#include "qemu/osdep.h"
|
||||
#include "cpu.h"
|
||||
#include "csr.h"
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include "qapi/error.h"
|
||||
#include "tcg/insn-start-words.h"
|
||||
#include "internals.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
/* CSR function table public API */
|
||||
void riscv_get_csr_ops(int csrno, riscv_csr_operations *ops)
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include <getopt.h>
|
||||
#include <stdbool.h>
|
||||
#include <sys/ioctl.h>
|
||||
#ifdef CONFIG_LIBCAP_NG
|
||||
#include <cap-ng.h>
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#if defined(__OpenBSD__) && !defined(CONFIG_ELF_AUX_INFO)
|
||||
# include <machine/armreg.h>
|
||||
# include <machine/cpu.h>
|
||||
# include <sys/types.h>
|
||||
# include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user