mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-08 12:19:06 +00:00
hv: fix 'No brackets to then/else'
- add missing brackets for 'if/else' statements based on MISRA-C requirements v1 -> v2: * add brackets for each conditions in 'if' statements to improve the readability * modify 'ptdev_init' to make the logic clearer Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
This commit is contained in:
@@ -538,12 +538,11 @@ int vioapic_mmio_access_handler(struct vcpu *vcpu, struct io_request *io_req)
|
||||
if (mmio->direction == REQUEST_READ) {
|
||||
vioapic_mmio_rw(vioapic, gpa, &data, true);
|
||||
mmio->value = (uint64_t)data;
|
||||
|
||||
} else if (mmio->direction == REQUEST_WRITE) {
|
||||
vioapic_mmio_rw(vioapic, gpa, &data, false);
|
||||
|
||||
} else
|
||||
} else {
|
||||
ret = -EINVAL;
|
||||
}
|
||||
} else {
|
||||
pr_err("All RW to IOAPIC must be 32-bits in size");
|
||||
ret = -EINVAL;
|
||||
|
Reference in New Issue
Block a user