mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-06 11:20:32 +00:00
HV:treewide:fix "Reference parameter to procedure is reassigned"
Parameter's type which is pointer should not be changed in the scope of function,assign it's value to local variable to fixed it out. Signed-off-by: Huihuang Shi <huihuang.shi@intel.com> Reviewed-by: Junjie Mao <junjie.mao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -1009,8 +1009,9 @@ static void get_entry_info(struct ptdev_remapping_info *entry, char *type,
|
||||
}
|
||||
}
|
||||
|
||||
void get_ptdev_info(char *str, int str_max)
|
||||
void get_ptdev_info(char *str_arg, int str_max)
|
||||
{
|
||||
char *str = str_arg;
|
||||
struct ptdev_remapping_info *entry;
|
||||
int len, size = str_max;
|
||||
uint32_t irq, vector;
|
||||
|
@@ -352,9 +352,10 @@ static inline uint32_t _copy_gpa(struct vm *vm, void *h_ptr, uint64_t gpa,
|
||||
return len;
|
||||
}
|
||||
|
||||
static inline int copy_gpa(struct vm *vm, void *h_ptr, uint64_t gpa_arg,
|
||||
static inline int copy_gpa(struct vm *vm, void *h_ptr_arg, uint64_t gpa_arg,
|
||||
uint32_t size_arg, bool cp_from_vm)
|
||||
{
|
||||
void *h_ptr = h_ptr_arg;
|
||||
uint32_t len;
|
||||
uint64_t gpa = gpa_arg;
|
||||
uint32_t size = size_arg;
|
||||
@@ -378,9 +379,10 @@ static inline int copy_gpa(struct vm *vm, void *h_ptr, uint64_t gpa_arg,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int copy_gva(struct vcpu *vcpu, void *h_ptr, uint64_t gva_arg,
|
||||
static inline int copy_gva(struct vcpu *vcpu, void *h_ptr_arg, uint64_t gva_arg,
|
||||
uint32_t size_arg, uint32_t *err_code, bool cp_from_vm)
|
||||
{
|
||||
void *h_ptr = h_ptr_arg;
|
||||
uint64_t gpa = 0UL;
|
||||
int32_t ret;
|
||||
uint32_t len;
|
||||
|
@@ -644,8 +644,9 @@ bool vioapic_get_rte(struct vm *vm, uint8_t pin, union ioapic_rte *rte)
|
||||
}
|
||||
|
||||
#ifdef HV_DEBUG
|
||||
void get_vioapic_info(char *str, int str_max, uint16_t vmid)
|
||||
void get_vioapic_info(char *str_arg, int str_max, uint16_t vmid)
|
||||
{
|
||||
char *str = str_arg;
|
||||
int len, size = str_max;
|
||||
union ioapic_rte rte;
|
||||
uint32_t delmode, vector, dest;
|
||||
|
@@ -454,8 +454,9 @@ static void get_rte_info(union ioapic_rte rte, bool *mask, bool *irr,
|
||||
*dest = (uint32_t)(rte.full >> APIC_ID_SHIFT);
|
||||
}
|
||||
|
||||
int get_ioapic_info(char *str, int str_max_len)
|
||||
int get_ioapic_info(char *str_arg, int str_max_len)
|
||||
{
|
||||
char *str = str_arg;
|
||||
uint32_t irq;
|
||||
int len, size = str_max_len;
|
||||
|
||||
|
@@ -685,8 +685,9 @@ pri_register_handler(uint32_t irq,
|
||||
}
|
||||
|
||||
#ifdef HV_DEBUG
|
||||
void get_cpu_interrupt_info(char *str, int str_max)
|
||||
void get_cpu_interrupt_info(char *str_arg, int str_max)
|
||||
{
|
||||
char *str = str_arg;
|
||||
uint16_t pcpu_id;
|
||||
uint32_t irq, vector;
|
||||
int len, size = str_max;
|
||||
|
@@ -889,9 +889,11 @@ static uint64_t break_page_table(struct map_params *map_params, void *paddr,
|
||||
return next_page_size;
|
||||
}
|
||||
|
||||
static int modify_paging(struct map_params *map_params, void *paddr,
|
||||
void *vaddr, uint64_t size, uint32_t flags, bool direct)
|
||||
static int modify_paging(struct map_params *map_params, void *paddr_arg,
|
||||
void *vaddr_arg, uint64_t size, uint32_t flags, bool direct)
|
||||
{
|
||||
void *vaddr = vaddr_arg;
|
||||
void *paddr = paddr_arg;
|
||||
int64_t remaining_size;
|
||||
uint64_t adjust_size;
|
||||
uint64_t attr = flags;
|
||||
|
Reference in New Issue
Block a user