HV:fixed "Pointer param should be declared pointer to const"

Pointer param should be declared pointer to const if
the parameter is keeped read-only.
This patch changes pointer param whose name is vm.

Tracked-On:#861
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-10-18 16:18:45 +08:00
committed by Xie, Nanlin
parent 40dbdcde4f
commit 60b216a460
13 changed files with 25 additions and 25 deletions

View File

@@ -72,7 +72,7 @@ int32_t hcall_get_api_version(struct vm *vm, uint64_t param)
*@pre Pointer vm shall point to VM0
*/
static int32_t
handle_virt_irqline(struct vm *vm, uint16_t target_vmid,
handle_virt_irqline(const struct vm *vm, uint16_t target_vmid,
struct acrn_irqline *param, uint32_t operation)
{
int32_t ret = 0;
@@ -333,7 +333,7 @@ int32_t hcall_set_vcpu_regs(struct vm *vm, uint16_t vmid, uint64_t param)
/**
*@pre Pointer vm shall point to VM0
*/
int32_t hcall_set_irqline(struct vm *vm, uint16_t vmid,
int32_t hcall_set_irqline(const struct vm *vm, uint16_t vmid,
struct acrn_irqline_ops *ops)
{
struct vm *target_vm = get_vm_from_vmid(vmid);
@@ -1073,7 +1073,7 @@ int32_t hcall_vm_intr_monitor(struct vm *vm, uint16_t vmid, uint64_t param)
/**
*@pre Pointer vm shall point to VM0
*/
int32_t hcall_set_callback_vector(struct vm *vm, uint64_t param)
int32_t hcall_set_callback_vector(const struct vm *vm, uint64_t param)
{
if (!is_vm0(vm)) {
pr_err("%s: Targeting to service vm", __func__);

View File

@@ -119,7 +119,7 @@ release_entry(struct ptdev_remapping_info *entry)
/* require ptdev_lock protect */
static void
release_all_entries(struct vm *vm)
release_all_entries(const struct vm *vm)
{
struct ptdev_remapping_info *entry;
struct list_head *pos, *tmp;
@@ -202,7 +202,7 @@ void ptdev_init(void)
register_softirq(SOFTIRQ_PTDEV, ptdev_softirq);
}
void ptdev_release_all_entries(struct vm *vm)
void ptdev_release_all_entries(const struct vm *vm)
{
/* VM already down */
spinlock_obtain(&ptdev_lock);