mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 17:58:30 +00:00
HV: Logical conjunction needs brackets
The bracket is required when the level of precedence of the operators is less than 13. Add the bracket to logical conjunctions. The commit applys the rule to the files under Signed-off-by: Yang, Yu-chu <yu-chu.yang@intel.com> Reviewed-by: Junjie Mao <junjie.mao@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -392,7 +392,7 @@ int32_t hcall_notify_ioreq_finish(uint16_t vmid, uint16_t vcpu_id)
|
||||
struct vm *target_vm = get_vm_from_vmid(vmid);
|
||||
|
||||
/* make sure we have set req_buf */
|
||||
if ((target_vm == NULL) || target_vm->sw.io_shared_page == NULL) {
|
||||
if ((target_vm == NULL) || (target_vm->sw.io_shared_page == NULL)) {
|
||||
pr_err("%s, invalid parameter\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -742,7 +742,7 @@ int32_t hcall_set_ptdev_intr_info(struct vm *vm, uint16_t vmid, uint64_t param)
|
||||
irq.virt_bdf, irq.phys_bdf,
|
||||
irq.is.intx.virt_pin, irq.is.intx.phys_pin,
|
||||
irq.is.intx.pic_pin);
|
||||
} else if (irq.type == IRQ_MSI || irq.type == IRQ_MSIX) {
|
||||
} else if ((irq.type == IRQ_MSI) || (irq.type == IRQ_MSIX)) {
|
||||
ret = ptdev_add_msix_remapping(target_vm,
|
||||
irq.virt_bdf, irq.phys_bdf,
|
||||
irq.is.msix.vector_cnt);
|
||||
@@ -776,7 +776,7 @@ hcall_reset_ptdev_intr_info(struct vm *vm, uint16_t vmid, uint64_t param)
|
||||
ptdev_remove_intx_remapping(target_vm,
|
||||
irq.is.intx.virt_pin,
|
||||
irq.is.intx.pic_pin);
|
||||
} else if (irq.type == IRQ_MSI || irq.type == IRQ_MSIX) {
|
||||
} else if ((irq.type == IRQ_MSI) || (irq.type == IRQ_MSIX)) {
|
||||
ptdev_remove_msix_remapping(target_vm,
|
||||
irq.virt_bdf,
|
||||
irq.is.msix.vector_cnt);
|
||||
|
@@ -66,8 +66,8 @@ acrn_insert_request_wait(struct vcpu *vcpu, struct io_request *io_req)
|
||||
"vhm_request page broken!");
|
||||
|
||||
|
||||
if (vcpu == NULL || io_req == NULL ||
|
||||
vcpu->vm->sw.io_shared_page == NULL) {
|
||||
if ((vcpu == NULL) || (io_req == NULL) ||
|
||||
(vcpu->vm->sw.io_shared_page == NULL)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user