mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-05 23:57:10 +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:
@@ -133,8 +133,8 @@ static void vuart_toggle_intr(struct acrn_vuart *vu)
|
||||
}
|
||||
}
|
||||
|
||||
static void vuart_write(__unused struct vm_io_handler *hdlr, struct vm *vm,
|
||||
uint16_t offset_arg, __unused size_t width, uint32_t value)
|
||||
static void vuart_write(struct vm *vm, uint16_t offset_arg,
|
||||
__unused size_t width, uint32_t value)
|
||||
{
|
||||
uint16_t offset = offset_arg;
|
||||
struct acrn_vuart *vu = vm_vuart(vm);
|
||||
@@ -219,8 +219,8 @@ done:
|
||||
vuart_unlock(vu);
|
||||
}
|
||||
|
||||
static uint32_t vuart_read(__unused struct vm_io_handler *hdlr, struct vm *vm,
|
||||
uint16_t offset_arg, __unused size_t width)
|
||||
static uint32_t vuart_read(struct vm *vm, uint16_t offset_arg,
|
||||
__unused size_t width)
|
||||
{
|
||||
uint16_t offset = offset_arg;
|
||||
uint8_t iir, reg, intr_reason;
|
||||
|
||||
Reference in New Issue
Block a user