mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-21 13:08:42 +00:00
hv: fix "Else alternative missing in if."
All if . . else if constructs shall be terminated with an else statement. 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:
parent
7cff124b96
commit
b316bf8a39
@ -330,6 +330,8 @@ static int32_t check_vmx_mmu_cap(void)
|
|||||||
} else if (!cpu_has_vmx_ept_cap(VMX_EPT_1GB_PAGE)) {
|
} else if (!cpu_has_vmx_ept_cap(VMX_EPT_1GB_PAGE)) {
|
||||||
pr_fatal("%s, ept not support 1GB large page\n", __func__);
|
pr_fatal("%s, ept not support 1GB large page\n", __func__);
|
||||||
ret = -ENODEV;
|
ret = -ENODEV;
|
||||||
|
} else {
|
||||||
|
/* No other state currently, do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -430,6 +430,8 @@ static uint64_t vm_get_register(const struct acrn_vcpu *vcpu, enum cpu_reg_name
|
|||||||
} else {
|
} else {
|
||||||
reg_val = (uint64_t)exec_vmread16(field);
|
reg_val = (uint64_t)exec_vmread16(field);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
/* No other state currently, do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
return reg_val;
|
return reg_val;
|
||||||
@ -457,6 +459,8 @@ static void vm_set_register(struct acrn_vcpu *vcpu, enum cpu_reg_name reg,
|
|||||||
} else {
|
} else {
|
||||||
exec_vmwrite16(field, (uint16_t)val);
|
exec_vmwrite16(field, (uint16_t)val);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
/* No other state currently, do nothing */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,6 +177,8 @@ static bool pm1ab_io_write(struct acrn_vm *vm, uint16_t addr, size_t width, uint
|
|||||||
}
|
}
|
||||||
|
|
||||||
to_write = false;
|
to_write = false;
|
||||||
|
} else {
|
||||||
|
/* No other state currently, do nothing */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1132,6 +1132,8 @@ vlapic_calc_dest(struct acrn_vm *vm, uint64_t *dmask, uint32_t dest, bool phys,
|
|||||||
lowprio_dest = vlapic;
|
lowprio_dest = vlapic;
|
||||||
} else if (lowprio_dest->apic_page.ppr.v > vlapic->apic_page.ppr.v) {
|
} else if (lowprio_dest->apic_page.ppr.v > vlapic->apic_page.ppr.v) {
|
||||||
lowprio_dest = vlapic;
|
lowprio_dest = vlapic;
|
||||||
|
} else {
|
||||||
|
/* No other state currently, do nothing */
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
bitmap_set_nolock(vcpu_id, dmask);
|
bitmap_set_nolock(vcpu_id, dmask);
|
||||||
@ -1782,6 +1784,8 @@ vlapic_set_apicbase(struct acrn_vlapic *vlapic, uint64_t new)
|
|||||||
"NOT support to change APIC_BASE MSR from %#lx to %#lx",
|
"NOT support to change APIC_BASE MSR from %#lx to %#lx",
|
||||||
vlapic->msr_apicbase, new);
|
vlapic->msr_apicbase, new);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
} else {
|
||||||
|
/* No other state currently, do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -66,6 +66,8 @@ bool check_cpu_security_cap(void)
|
|||||||
} else if ((!cpu_has_cap(X86_FEATURE_IBRS_IBPB)) &&
|
} else if ((!cpu_has_cap(X86_FEATURE_IBRS_IBPB)) &&
|
||||||
(!cpu_has_cap(X86_FEATURE_STIBP))) {
|
(!cpu_has_cap(X86_FEATURE_STIBP))) {
|
||||||
ret = false;
|
ret = false;
|
||||||
|
} else {
|
||||||
|
/* No other state currently, do nothing */
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ret = false;
|
ret = false;
|
||||||
|
@ -67,6 +67,8 @@ bool handle_dbg_cmd(const char *cmd, int32_t len)
|
|||||||
uart16550_set_property(true, false, (uint64_t)(cmd+tmp));
|
uart16550_set_property(true, false, (uint64_t)(cmd+tmp));
|
||||||
} else if (i == IDX_SET_VUART) {
|
} else if (i == IDX_SET_VUART) {
|
||||||
vuart_set_property(cmd+tmp);
|
vuart_set_property(cmd+tmp);
|
||||||
|
} else {
|
||||||
|
/* No other state currently, do nothing */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,6 +64,8 @@ static inline int32_t npk_write(const char *value, void *addr, size_t sz)
|
|||||||
} else if (sz >= 1U) {
|
} else if (sz >= 1U) {
|
||||||
mmio_write8(*(uint8_t *)value, addr);
|
mmio_write8(*(uint8_t *)value, addr);
|
||||||
ret = 1;
|
ret = 1;
|
||||||
|
} else {
|
||||||
|
/* No other state currently, do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -398,6 +398,8 @@ static int32_t shell_process_cmd(const char *p_input_line)
|
|||||||
shell_puts("\r\nError: Invalid parameters.\r\n");
|
shell_puts("\r\nError: Invalid parameters.\r\n");
|
||||||
} else if (status != 0) {
|
} else if (status != 0) {
|
||||||
shell_puts("\r\nCommand launch failed.\r\n");
|
shell_puts("\r\nCommand launch failed.\r\n");
|
||||||
|
} else {
|
||||||
|
/* No other state currently, do nothing */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -326,6 +326,8 @@ static int32_t vmsix_table_mmio_access_handler(struct io_request *io_req, void *
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
clac();
|
clac();
|
||||||
|
} else {
|
||||||
|
/* No other state currently, do nothing */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user