Re: [PATCH 1/7] iommu/dma: fix trival coding style mistake

2018-06-04 Thread Leizhen (ThunderTown)
On 2018/5/31 21:03, Robin Murphy wrote: > On 31/05/18 08:42, Zhen Lei wrote: >> The static function iova_reserve_iommu_regions is only called by function >> iommu_dma_init_domain, and the 'if (!dev)' check in iommu_dma_init_domain >> affect it only, so we can safely move the check into it. I thi

Re: [PATCH 1/7] iommu/dma: fix trival coding style mistake

2018-05-31 Thread Robin Murphy
On 31/05/18 08:42, Zhen Lei wrote: The static function iova_reserve_iommu_regions is only called by function iommu_dma_init_domain, and the 'if (!dev)' check in iommu_dma_init_domain affect it only, so we can safely move the check into it. I think it looks more natural. As before, I disagree -

[PATCH 1/7] iommu/dma: fix trival coding style mistake

2018-05-31 Thread Zhen Lei
The static function iova_reserve_iommu_regions is only called by function iommu_dma_init_domain, and the 'if (!dev)' check in iommu_dma_init_domain affect it only, so we can safely move the check into it. I think it looks more natural. In addition, the local variable 'ret' is only assigned in the