Skip to content

Commit 3b10f25

Browse files
LuBaoluwilldeacon
authored andcommitted
RDMA/usnic: Use iommu_paging_domain_alloc()
usnic_uiom_alloc_pd() allocates a paging domain for a given device. In this case, iommu_domain_alloc(dev->bus) is equivalent to  iommu_paging_domain_alloc(dev). Replace it as iommu_domain_alloc() has been deprecated. Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Acked-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/20240610085555.88197-15-baolu.lu@linux.intel.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent ef50d41 commit 3b10f25

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/infiniband/hw/usnic/usnic_uiom.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -443,11 +443,11 @@ struct usnic_uiom_pd *usnic_uiom_alloc_pd(struct device *dev)
443443
if (!pd)
444444
return ERR_PTR(-ENOMEM);
445445

446-
pd->domain = domain = iommu_domain_alloc(dev->bus);
447-
if (!domain) {
446+
pd->domain = domain = iommu_paging_domain_alloc(dev);
447+
if (IS_ERR(domain)) {
448448
usnic_err("Failed to allocate IOMMU domain");
449449
kfree(pd);
450-
return ERR_PTR(-ENOMEM);
450+
return ERR_CAST(domain);
451451
}
452452

453453
iommu_set_fault_handler(pd->domain, usnic_uiom_dma_fault, NULL);

0 commit comments

Comments
 (0)