HV:treewide:fix "Attempt to change parameter passed by value"

In the function scope,the parameter should not be
changed as Misra required.
V1->V2 recover some violations because of ldra's false positive.
V2->V3 sync local variable' type to parameter's type with the prefix of const.

Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Huihuang Shi
2018-07-25 11:19:52 +08:00
committed by lijinxia
parent e71a0887a0
commit 5189bcd272
26 changed files with 96 additions and 59 deletions

View File

@@ -485,12 +485,15 @@ int ept_misconfig_vmexit_handler(__unused struct vcpu *vcpu)
return status;
}
int ept_mr_add(struct vm *vm, uint64_t hpa,
uint64_t gpa, uint64_t size, uint32_t prot)
int ept_mr_add(struct vm *vm, uint64_t hpa_arg,
uint64_t gpa_arg, uint64_t size, uint32_t prot_arg)
{
struct map_params map_params;
uint16_t i;
struct vcpu *vcpu;
uint64_t hpa = hpa_arg;
uint64_t gpa = gpa_arg;
uint32_t prot = prot_arg;
/* Setup memory map parameters */
map_params.page_table_type = PTT_EPT;
@@ -536,12 +539,14 @@ int ept_mr_modify(struct vm *vm, uint64_t *pml4_page,
return ret;
}
int ept_mr_del(struct vm *vm, uint64_t hpa,
uint64_t gpa, uint64_t size)
int ept_mr_del(struct vm *vm, uint64_t hpa_arg,
uint64_t gpa_arg, uint64_t size)
{
struct map_params map_params;
uint16_t i;
struct vcpu *vcpu;
uint64_t hpa = hpa_arg;
uint64_t gpa = gpa_arg;
/* Setup memory map parameters */
map_params.page_table_type = PTT_EPT;