projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ca84ed7
)
iommu/dma: Remove redundant "!dev" checks
author
Robin Murphy
<robin.murphy@arm.com>
Wed, 11 Aug 2021 12:21:27 +0000
(13:21 +0100)
committer
Joerg Roedel
<jroedel@suse.de>
Wed, 18 Aug 2021 11:25:32 +0000
(13:25 +0200)
iommu_dma_init_domain() is now only called from iommu_setup_dma_ops(),
which has already assumed dev to be non-NULL.
Reviewed-by: John Garry <john.garry@huawei.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link:
https://lore.kernel.org/r/06024523c080364390016550065e3cfe8031367e.1628682049.git.robin.murphy@arm.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/dma-iommu.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/iommu/dma-iommu.c
b/drivers/iommu/dma-iommu.c
index 98ba927aee1a6903c7bc8619e41160618292f952..afaa1f9b593530557bb98096608cf103a2f9a4fa 100644
(file)
--- a/
drivers/iommu/dma-iommu.c
+++ b/
drivers/iommu/dma-iommu.c
@@
-370,7
+370,7
@@
static int iommu_dma_init_domain(struct iommu_domain *domain, dma_addr_t base,
init_iova_domain(iovad, 1UL << order, base_pfn);
- if (!cookie->fq_domain &&
(!dev || !dev_is_untrusted(dev)
) &&
+ if (!cookie->fq_domain &&
!dev_is_untrusted(dev
) &&
domain->ops->flush_iotlb_all && !iommu_get_dma_strict(domain)) {
if (init_iova_flush_queue(iovad, iommu_dma_flush_iotlb_all,
iommu_dma_entry_dtor))
@@
-379,9
+379,6
@@
static int iommu_dma_init_domain(struct iommu_domain *domain, dma_addr_t base,
cookie->fq_domain = domain;
}
- if (!dev)
- return 0;
-
return iova_reserve_iommu_regions(dev, domain);
}