hv: fix integer violations

fix the following integer violations:
1. Signed/unsigned conversion without cast
2. Literal value requires a U suffix
3. Implicit conversion of underlying type

v3 -> v4:
 * change the type of npk_loglevel/mem_loglevel/console_loglevel
   from uint32_t to uint16_t

v2 -> v3:
 * discard the return value of update_ept
 * discard changes related to npk loglevel

v1 -> v2:
 * remove the unnecessary changes related to the false positive
   issues caused by scanning tool
 * change the type of the local variable 'vlapic_id' from uint8_t
   to uint32_t in function 'vlapic_build_id'
 * change the type of the struct member 'flags' in shared_buf from
   uint64_t to uint32_t

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Shiqing Gao
2018-11-09 11:39:18 +08:00
committed by wenlingz
parent 7e6d0a2176
commit d97224a4b5
17 changed files with 68 additions and 72 deletions

View File

@@ -39,7 +39,7 @@ bool is_hypercall_from_ring0(void)
int32_t hcall_sos_offline_cpu(struct acrn_vm *vm, uint64_t lapicid)
{
struct acrn_vcpu *vcpu;
int i;
uint16_t i;
pr_info("sos offline cpu with lapicid %lld", lapicid);
@@ -1173,7 +1173,7 @@ int32_t hcall_set_callback_vector(const struct acrn_vm *vm, uint64_t param)
return -EINVAL;
}
acrn_vhm_vector = param;
acrn_vhm_vector = (uint32_t)param;
return 0;
}