[PATCH 1/4] iommu/vt-d: Remove iommu_attach_domain_with_id()

From: Joerg Roedel
Date: Thu Jun 11 2015 - 09:48:13 EST


From: Joerg Roedel <jroedel@xxxxxxx>

We don't re-use domain-ids from the old kernel, so this
function is not needed anymore. Remove it.

Signed-off-by: Joerg Roedel <jroedel@xxxxxxx>
---
drivers/iommu/intel-iommu.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 58abddb..b0fd5f2 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -1648,16 +1648,6 @@ static int iommu_attach_domain(struct dmar_domain *domain,
return num;
}

-static int iommu_attach_domain_with_id(struct dmar_domain *domain,
- struct intel_iommu *iommu,
- int domain_number)
-{
- if (domain_number >= 0)
- return domain_number;
-
- return iommu_attach_domain(domain, iommu);
-}
-
static int iommu_attach_vm_domain(struct dmar_domain *domain,
struct intel_iommu *iommu)
{
@@ -2326,7 +2316,6 @@ static struct dmar_domain *get_domain_for_dev(struct device *dev, int gaw)
u16 dma_alias;
unsigned long flags;
u8 bus, devfn;
- int did = -1; /* Default to "no domain_id supplied" */

domain = find_domain(dev);
if (domain)
@@ -2361,7 +2350,7 @@ static struct dmar_domain *get_domain_for_dev(struct device *dev, int gaw)
if (!domain)
return NULL;

- domain->id = iommu_attach_domain_with_id(domain, iommu, did);
+ domain->id = iommu_attach_domain(domain, iommu);
if (domain->id < 0) {
free_domain_mem(domain);
return NULL;
--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/