mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-06 11:20:32 +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:
@@ -46,8 +46,7 @@ static uint8_t cmos_get_reg_val(uint8_t addr)
|
||||
return reg;
|
||||
}
|
||||
|
||||
static uint32_t vrtc_read(__unused struct vm_io_handler *hdlr, struct vm *vm,
|
||||
uint16_t addr, __unused size_t width)
|
||||
static uint32_t vrtc_read(struct vm *vm, uint16_t addr, __unused size_t width)
|
||||
{
|
||||
uint8_t reg;
|
||||
uint8_t offset;
|
||||
@@ -62,8 +61,8 @@ static uint32_t vrtc_read(__unused struct vm_io_handler *hdlr, struct vm *vm,
|
||||
return reg;
|
||||
}
|
||||
|
||||
static void vrtc_write(__unused struct vm_io_handler *hdlr, struct vm *vm, uint16_t addr,
|
||||
size_t width, uint32_t value)
|
||||
static void vrtc_write(struct vm *vm, uint16_t addr, size_t width,
|
||||
uint32_t value)
|
||||
{
|
||||
|
||||
if (width != 1U)
|
||||
|
Reference in New Issue
Block a user