mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-21 16:57:20 +00:00
hv: fix 'Function return value potentially unused'
MISRA-C requires that if the return value of a function call is assigned to a local variable, this value shall be used in all paths. This patch moves the variable assignment right before the moment that the variable is used. 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:
@@ -365,7 +365,9 @@ static void dmar_enable_translation(struct dmar_drhd_rt *dmar_unit)
|
||||
iommu_write32(dmar_unit, DMAR_GCMD_REG, dmar_unit->gcmd);
|
||||
/* 32-bit register */
|
||||
dmar_wait_completion(dmar_unit, DMAR_GSTS_REG, DMA_GSTS_TES, false, &status);
|
||||
#if DBG_IOMMU
|
||||
status = iommu_read32(dmar_unit, DMAR_GSTS_REG);
|
||||
#endif
|
||||
}
|
||||
|
||||
spinlock_release(&(dmar_unit->lock));
|
||||
|
Reference in New Issue
Block a user