hv:vtd: fix MISRA-C violations on logical conjunctions need brackets

This patch fix MISRA-C violations in arch/x86/vtd.c
on logical conjunctions need brackets.

Tracked-On: #861
Signed-off-by: Tw <wei.tan@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Tw 2018-12-20 09:42:45 +08:00 committed by wenlingz
parent 80b392a854
commit 897ffa2739
1 changed files with 2 additions and 2 deletions

View File

@ -145,7 +145,7 @@ bool iommu_snoop_supported(const struct acrn_vm *vm)
{
bool ret;
if (vm->iommu == NULL || vm->iommu->iommu_snoop) {
if ((vm->iommu == NULL) || (vm->iommu->iommu_snoop)) {
ret = true;
} else {
ret = false;
@ -175,7 +175,7 @@ static int32_t register_hrhd_units(void)
uint32_t i;
int32_t ret = 0;
if (info == NULL || info->drhd_count == 0U) {
if ((info == NULL) || (info->drhd_count == 0U)) {
pr_fatal("%s: can't find dmar info\n", __func__);
return -ENODEV;
}