From da9ed0eda900fc8b76d566ad666c5141172b8e17 Mon Sep 17 00:00:00 2001 From: Mingqiang Chi Date: Mon, 6 May 2019 11:10:03 +0800 Subject: [PATCH] hv:remove some unnecessary includes remove some unnecessary includes Tracked-On: #1842 Signed-off-by: Mingqiang Chi --- hypervisor/arch/x86/boot/trampoline.S | 2 -- hypervisor/arch/x86/cat.c | 1 - hypervisor/arch/x86/configs/vm_config.c | 1 - hypervisor/arch/x86/guest/vm.c | 2 -- hypervisor/arch/x86/guest/vmx_asm.S | 5 ----- hypervisor/arch/x86/pm.c | 1 - hypervisor/arch/x86/seed/seed_abl.c | 1 - hypervisor/arch/x86/static_checks.c | 1 - hypervisor/arch/x86/wakeup.S | 2 -- hypervisor/bsp/firmware_uefi.c | 1 - hypervisor/bsp/firmware_wrapper.c | 1 - hypervisor/common/hypercall.c | 1 - hypervisor/common/stack_protector.c | 1 - hypervisor/common/trusty_hypercall.c | 1 - hypervisor/debug/sbuf.c | 1 - hypervisor/debug/shell.c | 1 - hypervisor/dm/vioapic.c | 2 -- hypervisor/dm/vpci/vhostbridge.c | 1 - hypervisor/include/arch/x86/cpu.h | 1 + hypervisor/include/lib/util.h | 1 + hypervisor/release/sbuf.c | 1 - hypervisor/scenarios/logical_partition/pt_dev.c | 1 - 22 files changed, 2 insertions(+), 28 deletions(-) diff --git a/hypervisor/arch/x86/boot/trampoline.S b/hypervisor/arch/x86/boot/trampoline.S index ef7731d43..f994402ad 100644 --- a/hypervisor/arch/x86/boot/trampoline.S +++ b/hypervisor/arch/x86/boot/trampoline.S @@ -14,8 +14,6 @@ * The real page table and gdt will be setup in C main entry. */ -#include - /* NOTE: * * MISRA C requires that all unsigned constants should have the suffix 'U' diff --git a/hypervisor/arch/x86/cat.c b/hypervisor/arch/x86/cat.c index 50d2a1b53..fbc18b6c6 100644 --- a/hypervisor/arch/x86/cat.c +++ b/hypervisor/arch/x86/cat.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include diff --git a/hypervisor/arch/x86/configs/vm_config.c b/hypervisor/arch/x86/configs/vm_config.c index c07e0db59..965235632 100644 --- a/hypervisor/arch/x86/configs/vm_config.c +++ b/hypervisor/arch/x86/configs/vm_config.c @@ -5,7 +5,6 @@ */ #include -#include #include #include #include diff --git a/hypervisor/arch/x86/guest/vm.c b/hypervisor/arch/x86/guest/vm.c index dd82c75ce..c978b1697 100644 --- a/hypervisor/arch/x86/guest/vm.c +++ b/hypervisor/arch/x86/guest/vm.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -22,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/hypervisor/arch/x86/guest/vmx_asm.S b/hypervisor/arch/x86/guest/vmx_asm.S index 1cd0621a2..86d9c96fc 100644 --- a/hypervisor/arch/x86/guest/vmx_asm.S +++ b/hypervisor/arch/x86/guest/vmx_asm.S @@ -5,13 +5,8 @@ */ #include -#include -#include #include -#include -#include #include -#include /* NOTE: * diff --git a/hypervisor/arch/x86/pm.c b/hypervisor/arch/x86/pm.c index ee749896a..657c9f92e 100644 --- a/hypervisor/arch/x86/pm.c +++ b/hypervisor/arch/x86/pm.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/hypervisor/arch/x86/seed/seed_abl.c b/hypervisor/arch/x86/seed/seed_abl.c index d876968c1..477e77ee7 100644 --- a/hypervisor/arch/x86/seed/seed_abl.c +++ b/hypervisor/arch/x86/seed/seed_abl.c @@ -9,7 +9,6 @@ #include #include #include -#include "seed_abl.h" #define ABL_SEED_LEN 32U struct abl_seed_info { diff --git a/hypervisor/arch/x86/static_checks.c b/hypervisor/arch/x86/static_checks.c index 8c3d7686c..8b81895b5 100644 --- a/hypervisor/arch/x86/static_checks.c +++ b/hypervisor/arch/x86/static_checks.c @@ -4,7 +4,6 @@ * SPDX-License-Identifier: BSD-3-Clause */ -#include #include #include #include diff --git a/hypervisor/arch/x86/wakeup.S b/hypervisor/arch/x86/wakeup.S index 1a1c2eecf..5cab6fa7f 100644 --- a/hypervisor/arch/x86/wakeup.S +++ b/hypervisor/arch/x86/wakeup.S @@ -2,8 +2,6 @@ * Copyright (C) <2018> Intel Corporation * SPDX-License-Identifier: BSD-3-Clause */ -#include -#include /* NOTE: * diff --git a/hypervisor/bsp/firmware_uefi.c b/hypervisor/bsp/firmware_uefi.c index c1a0a1de3..8db583536 100644 --- a/hypervisor/bsp/firmware_uefi.c +++ b/hypervisor/bsp/firmware_uefi.c @@ -15,7 +15,6 @@ #include #include #include -#include #include static struct uefi_context uefi_ctx; diff --git a/hypervisor/bsp/firmware_wrapper.c b/hypervisor/bsp/firmware_wrapper.c index 15bc86f3a..6b6af7251 100644 --- a/hypervisor/bsp/firmware_wrapper.c +++ b/hypervisor/bsp/firmware_wrapper.c @@ -11,7 +11,6 @@ #include #include #include -#include "platform_acpi_info.h" static struct firmware_operations *firmware_ops; diff --git a/hypervisor/common/hypercall.c b/hypervisor/common/hypercall.c index 39427dc4d..672618e8d 100644 --- a/hypervisor/common/hypercall.c +++ b/hypervisor/common/hypercall.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include diff --git a/hypervisor/common/stack_protector.c b/hypervisor/common/stack_protector.c index 33581dc10..b03a16d5b 100644 --- a/hypervisor/common/stack_protector.c +++ b/hypervisor/common/stack_protector.c @@ -3,7 +3,6 @@ * * SPDX-License-Identifier: BSD-3-Clause */ -#include #include void __stack_chk_fail(void) diff --git a/hypervisor/common/trusty_hypercall.c b/hypervisor/common/trusty_hypercall.c index d39103fd3..46f2c9b6a 100644 --- a/hypervisor/common/trusty_hypercall.c +++ b/hypervisor/common/trusty_hypercall.c @@ -6,7 +6,6 @@ #include #include -#include #include #define ACRN_DBG_TRUSTY_HYCALL 6U diff --git a/hypervisor/debug/sbuf.c b/hypervisor/debug/sbuf.c index a53a60b84..7362999ff 100644 --- a/hypervisor/debug/sbuf.c +++ b/hypervisor/debug/sbuf.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include diff --git a/hypervisor/debug/shell.c b/hypervisor/debug/shell.c index 6954aaf41..2205f9f11 100644 --- a/hypervisor/debug/shell.c +++ b/hypervisor/debug/shell.c @@ -7,7 +7,6 @@ #include #include #include -#include #include "shell_priv.h" #include #include diff --git a/hypervisor/dm/vioapic.c b/hypervisor/dm/vioapic.c index 59b6db511..b8893f566 100644 --- a/hypervisor/dm/vioapic.c +++ b/hypervisor/dm/vioapic.c @@ -34,8 +34,6 @@ #include #include #include -#include -#include #include #define RTBL_RO_BITS ((uint32_t)0x00004000U | (uint32_t)0x00001000U) /*Remote IRR and Delivery Status bits*/ diff --git a/hypervisor/dm/vpci/vhostbridge.c b/hypervisor/dm/vpci/vhostbridge.c index 3766f1dbf..b2516516c 100644 --- a/hypervisor/dm/vpci/vhostbridge.c +++ b/hypervisor/dm/vpci/vhostbridge.c @@ -35,7 +35,6 @@ */ #include -#include #include #include "vpci_priv.h" diff --git a/hypervisor/include/arch/x86/cpu.h b/hypervisor/include/arch/x86/cpu.h index 633e64a04..96d900251 100644 --- a/hypervisor/include/arch/x86/cpu.h +++ b/hypervisor/include/arch/x86/cpu.h @@ -37,6 +37,7 @@ #ifndef CPU_H #define CPU_H +#include /* Define CPU stack alignment */ #define CPU_STACK_ALIGN 16UL diff --git a/hypervisor/include/lib/util.h b/hypervisor/include/lib/util.h index f558b780b..80d91b246 100644 --- a/hypervisor/include/lib/util.h +++ b/hypervisor/include/lib/util.h @@ -6,6 +6,7 @@ #ifndef UTIL_H #define UTIL_H +#include #define offsetof(st, m) __builtin_offsetof(st, m) #define va_start __builtin_va_start diff --git a/hypervisor/release/sbuf.c b/hypervisor/release/sbuf.c index fd8dd3386..90ca5e3dd 100644 --- a/hypervisor/release/sbuf.c +++ b/hypervisor/release/sbuf.c @@ -5,6 +5,5 @@ */ #include -#include void sbuf_reset(__unused uint16_t pcpu_id) {} diff --git a/hypervisor/scenarios/logical_partition/pt_dev.c b/hypervisor/scenarios/logical_partition/pt_dev.c index 248abbc74..04b3b27b3 100644 --- a/hypervisor/scenarios/logical_partition/pt_dev.c +++ b/hypervisor/scenarios/logical_partition/pt_dev.c @@ -5,7 +5,6 @@ */ #include -#include #include struct acrn_vm_pci_ptdev_config vm0_pci_ptdevs[VM0_CONFIG_PCI_PTDEV_NUM] = {