mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 10:17:28 +00:00
fix parted of "missing for discarded return value"
MISRA C required that return value should be used, missing for it should add "(void)" prefix before the function call. Some function can be declared without return value to avoid this problem. Signed-off-by: Huihuang Shi <huihuang.shi@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -237,7 +237,7 @@ int shutdown_vcpu(__unused struct vcpu *vcpu)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int destroy_vcpu(struct vcpu *vcpu)
|
||||
void destroy_vcpu(struct vcpu *vcpu)
|
||||
{
|
||||
ASSERT(vcpu != NULL, "Incorrect arguments");
|
||||
|
||||
@@ -254,8 +254,6 @@ int destroy_vcpu(struct vcpu *vcpu)
|
||||
per_cpu(ever_run_vcpu, vcpu->pcpu_id) = NULL;
|
||||
free_pcpu(vcpu->pcpu_id);
|
||||
free(vcpu);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* NOTE:
|
||||
|
@@ -606,7 +606,7 @@ bool vioapic_get_rte(struct vm *vm, int pin, void *rte)
|
||||
return false;
|
||||
}
|
||||
|
||||
int get_vioapic_info(char *str, int str_max, int vmid)
|
||||
void get_vioapic_info(char *str, int str_max, int vmid)
|
||||
{
|
||||
int pin, len, size = str_max, vector, delmode;
|
||||
uint64_t rte;
|
||||
@@ -650,5 +650,4 @@ int get_vioapic_info(char *str, int str_max, int vmid)
|
||||
}
|
||||
END:
|
||||
snprintf(str, size, "\r\n");
|
||||
return 0;
|
||||
}
|
||||
|
@@ -260,20 +260,18 @@ int start_vm(struct vm *vm)
|
||||
* DM only pause vm for shutdown/reboot. If we need to
|
||||
* extend the pause vm for DM, this API should be extended.
|
||||
*/
|
||||
int pause_vm(struct vm *vm)
|
||||
void pause_vm(struct vm *vm)
|
||||
{
|
||||
int i;
|
||||
struct vcpu *vcpu = NULL;
|
||||
|
||||
if (vm->state == VM_PAUSED)
|
||||
return 0;
|
||||
return;
|
||||
|
||||
vm->state = VM_PAUSED;
|
||||
|
||||
foreach_vcpu(i, vm, vcpu)
|
||||
pause_vcpu(vcpu, VCPU_ZOMBIE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int vm_resume(struct vm *vm)
|
||||
|
Reference in New Issue
Block a user