mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
HV:fix rest integer violations
Fix integer related violations. V1->V2: clean all memset/calloc integer violations excpet bsp/boot directory 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:
@@ -38,7 +38,7 @@ int32_t hcall_sos_offline_cpu(struct vm *vm, uint64_t lapicid)
|
||||
foreach_vcpu(i, vm, vcpu) {
|
||||
if (vlapic_get_apicid(vcpu->arch_vcpu.vlapic) == lapicid) {
|
||||
/* should not offline BSP */
|
||||
if (vcpu->vcpu_id == 0)
|
||||
if (vcpu->vcpu_id == 0U)
|
||||
return -1;
|
||||
pause_vcpu(vcpu, VCPU_ZOMBIE);
|
||||
reset_vcpu(vcpu);
|
||||
|
@@ -68,7 +68,7 @@ alloc_entry(struct vm *vm, enum ptdev_intr_type type)
|
||||
struct ptdev_remapping_info *entry;
|
||||
|
||||
/* allocate */
|
||||
entry = calloc(1, sizeof(*entry));
|
||||
entry = calloc(1U, sizeof(*entry));
|
||||
ASSERT(entry != NULL, "alloc memory failed");
|
||||
entry->type = type;
|
||||
entry->vm = vm;
|
||||
|
Reference in New Issue
Block a user