mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-04 23:24:56 +00:00
HV:treewide:fix rest of violations related parameter changed
Misra c required parameter should not changed in the scope of function,use local variable to replace it. Signed-off-by: Huihuang Shi <huihuang.shi@intel.com> Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
@@ -177,8 +177,9 @@ void free_io_emulation_resource(struct vm *vm)
|
||||
free(vm->arch_vm.iobitmap[1]);
|
||||
}
|
||||
|
||||
void allow_guest_io_access(struct vm *vm, uint32_t address, uint32_t nbytes)
|
||||
void allow_guest_io_access(struct vm *vm, uint32_t address_arg, uint32_t nbytes)
|
||||
{
|
||||
uint32_t address = address_arg;
|
||||
uint32_t *b;
|
||||
uint32_t i;
|
||||
uint32_t a;
|
||||
@@ -194,8 +195,9 @@ void allow_guest_io_access(struct vm *vm, uint32_t address, uint32_t nbytes)
|
||||
}
|
||||
}
|
||||
|
||||
static void deny_guest_io_access(struct vm *vm, uint32_t address, uint32_t nbytes)
|
||||
static void deny_guest_io_access(struct vm *vm, uint32_t address_arg, uint32_t nbytes)
|
||||
{
|
||||
uint32_t address = address_arg;
|
||||
uint32_t *b;
|
||||
uint32_t i;
|
||||
uint32_t a;
|
||||
|
||||
@@ -230,12 +230,13 @@ void check_tsc(void)
|
||||
CPU_CR_WRITE(cr4, (temp64 & ~CR4_TSD));
|
||||
}
|
||||
|
||||
static uint64_t pit_calibrate_tsc(uint16_t cal_ms)
|
||||
static uint64_t pit_calibrate_tsc(uint16_t cal_ms_arg)
|
||||
{
|
||||
#define PIT_TICK_RATE 1193182U
|
||||
#define PIT_TARGET 0x3FFFU
|
||||
#define PIT_MAX_COUNT 0xFFFFU
|
||||
|
||||
uint16_t cal_ms = cal_ms_arg;
|
||||
uint32_t initial_pit;
|
||||
uint16_t current_pit;
|
||||
uint16_t max_cal_ms;
|
||||
|
||||
Reference in New Issue
Block a user