mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
hv: arch: fix 'Unused procedure parameter'
MISRA-C requires that there should be no unused parameters in functions. In some cases, we will keep the unused parameters. vmexit handler is one example. It is used as function pointer. Some of the vmexit handlers use the input parameter 'vcpu', some of them don't. We still need to keep the unused parameters 'vcpu' for those handlers don't use 'vcpu'. This patch removes the unused parameters that is not being used unconditionally. v1 -> v2: * remove the non-implemented API 'vlapic_id_write_handler' Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -15,9 +15,8 @@ int ptdev_msix_remap(struct vm *vm, uint16_t virt_bdf,
|
||||
uint16_t entry_nr, struct ptdev_msi_info *info);
|
||||
int ptdev_intx_pin_remap(struct vm *vm, uint8_t virt_pin,
|
||||
enum ptdev_vpin_source vpin_src);
|
||||
int ptdev_add_intx_remapping(struct vm *vm, __unused uint16_t virt_bdf,
|
||||
__unused uint16_t phys_bdf, uint8_t virt_pin, uint8_t phys_pin,
|
||||
bool pic_pin);
|
||||
int ptdev_add_intx_remapping(struct vm *vm, uint8_t virt_pin, uint8_t phys_pin,
|
||||
bool pic_pin);
|
||||
void ptdev_remove_intx_remapping(struct vm *vm, uint8_t virt_pin, bool pic_pin);
|
||||
int ptdev_add_msix_remapping(struct vm *vm, uint16_t virt_bdf,
|
||||
uint16_t phys_bdf, uint32_t vector_count);
|
||||
|
@@ -314,7 +314,7 @@ extern struct cpuinfo_x86 boot_cpu_data;
|
||||
#define MAX_CX_ENTRY (MAX_CSTATE - 1U)
|
||||
|
||||
/* Function prototypes */
|
||||
void cpu_do_idle(__unused uint16_t pcpu_id);
|
||||
void cpu_do_idle(void);
|
||||
void cpu_dead(uint16_t pcpu_id);
|
||||
void trampoline_start16(void);
|
||||
bool is_apicv_intr_delivery_supported(void);
|
||||
|
@@ -178,7 +178,7 @@ void vlapic_init(struct acrn_vlapic *vlapic);
|
||||
void vlapic_reset(struct acrn_vlapic *vlapic);
|
||||
void vlapic_restore(struct acrn_vlapic *vlapic, struct lapic_regs *regs);
|
||||
bool vlapic_enabled(struct acrn_vlapic *vlapic);
|
||||
uint64_t vlapic_apicv_get_apic_access_addr(__unused struct vm *vm);
|
||||
uint64_t vlapic_apicv_get_apic_access_addr(void);
|
||||
uint64_t vlapic_apicv_get_apic_page_addr(struct acrn_vlapic *vlapic);
|
||||
void vlapic_apicv_inject_pir(struct acrn_vlapic *vlapic);
|
||||
int apic_access_vmexit_handler(struct vcpu *vcpu);
|
||||
|
@@ -35,12 +35,10 @@ struct vm;
|
||||
struct vcpu;
|
||||
|
||||
typedef
|
||||
uint32_t (*io_read_fn_t)(struct vm_io_handler *handler, struct vm *vm,
|
||||
uint16_t port, size_t size);
|
||||
uint32_t (*io_read_fn_t)(struct vm *vm, uint16_t port, size_t size);
|
||||
|
||||
typedef
|
||||
void (*io_write_fn_t)(struct vm_io_handler *handler, struct vm *vm,
|
||||
uint16_t port, size_t size, uint32_t val);
|
||||
void (*io_write_fn_t)(struct vm *vm, uint16_t port, size_t size, uint32_t val);
|
||||
|
||||
/* Describes a single IO handler description entry. */
|
||||
struct vm_io_handler_desc {
|
||||
|
Reference in New Issue
Block a user