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:
Yang, Yu-chu
2018-07-25 14:55:25 -07:00
committed by wenlingz
parent 6f1c5fa007
commit 2fbf70780e
22 changed files with 72 additions and 72 deletions

View File

@@ -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);

View File

@@ -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;
}