mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
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:
@@ -32,7 +32,7 @@ static inline int npk_write(const char *value, void *addr, size_t sz)
|
||||
|
||||
void npk_log_setup(struct hv_npk_log_param *param)
|
||||
{
|
||||
int i;
|
||||
uint16_t i;
|
||||
|
||||
pr_info("HV_NPK_LOG: cmd %d param 0x%llx\n", param->cmd,
|
||||
param->mmio_addr);
|
||||
@@ -57,8 +57,9 @@ void npk_log_setup(struct hv_npk_log_param *param)
|
||||
}
|
||||
if ((base != 0UL) && (param->cmd == HV_NPK_LOG_CMD_ENABLE)) {
|
||||
if (!npk_log_enabled) {
|
||||
for (i = 0; i < phys_cpu_num; i++)
|
||||
per_cpu(npk_log_ref, i) = 0;
|
||||
for (i = 0U; i < phys_cpu_num; i++) {
|
||||
per_cpu(npk_log_ref, i) = 0U;
|
||||
}
|
||||
}
|
||||
param->res = HV_NPK_LOG_RES_OK;
|
||||
npk_log_enabled = 1;
|
||||
|
Reference in New Issue
Block a user