]> Git Repo - J-linux.git/commitdiff
RDMA/usnic: Use iommu_paging_domain_alloc()
authorLu Baolu <[email protected]>
Mon, 10 Jun 2024 08:55:48 +0000 (16:55 +0800)
committerWill Deacon <[email protected]>
Thu, 4 Jul 2024 13:09:33 +0000 (14:09 +0100)
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 <[email protected]>
Acked-by: Jason Gunthorpe <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
drivers/infiniband/hw/usnic/usnic_uiom.c

index 84e0f41e7dfa9ce581411bf56e386d3b8a22b776..f948b76f984dbb5e816fa006b07c5a16b6a1df1d 100644 (file)
@@ -443,11 +443,11 @@ struct usnic_uiom_pd *usnic_uiom_alloc_pd(struct device *dev)
        if (!pd)
                return ERR_PTR(-ENOMEM);
 
-       pd->domain = domain = iommu_domain_alloc(dev->bus);
-       if (!domain) {
+       pd->domain = domain = iommu_paging_domain_alloc(dev);
+       if (IS_ERR(domain)) {
                usnic_err("Failed to allocate IOMMU domain");
                kfree(pd);
-               return ERR_PTR(-ENOMEM);
+               return ERR_CAST(domain);
        }
 
        iommu_set_fault_handler(pd->domain, usnic_uiom_dma_fault, NULL);
This page took 0.058162 seconds and 4 git commands to generate.