mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-23 22:18:17 +00:00
hv: io: fix MISRA-C violations related to style
This patch fixes the MISRA-C violations in arch/x86/io.c. * add the required brackets for logical conjunctions * add the required 'else' for 'if ... else if' case 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:
parent
f27aa70fb5
commit
c03bad1fef
@ -378,6 +378,8 @@ int32_t pio_instr_vmexit_handler(struct acrn_vcpu *vcpu)
|
|||||||
emulate_pio_post(vcpu, io_req);
|
emulate_pio_post(vcpu, io_req);
|
||||||
} else if (status == IOREQ_PENDING) {
|
} else if (status == IOREQ_PENDING) {
|
||||||
status = 0;
|
status = 0;
|
||||||
|
} else {
|
||||||
|
/* do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
@ -480,7 +482,7 @@ int32_t register_mmio_emulation_handler(struct acrn_vm *vm,
|
|||||||
int32_t status = -EINVAL;
|
int32_t status = -EINVAL;
|
||||||
struct mem_io_node *mmio_node;
|
struct mem_io_node *mmio_node;
|
||||||
|
|
||||||
if ((vm->hw.created_vcpus > 0U) && vm->hw.vcpu_array[0].launched) {
|
if ((vm->hw.created_vcpus > 0U) && (vm->hw.vcpu_array[0].launched)) {
|
||||||
ASSERT(false, "register mmio handler after vm launched");
|
ASSERT(false, "register mmio handler after vm launched");
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user