iommu/vt-d: Remove unused domain_get_iommu()
authorLu Baolu <baolu.lu@linux.intel.com>
Tue, 12 Jul 2022 00:09:03 +0000 (08:09 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 15 Jul 2022 08:21:40 +0000 (10:21 +0200)
It is not used anywhere. Remove it to avoid dead code.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Steve Wahl <steve.wahl@hpe.com>
Link: https://lore.kernel.org/r/20220702015610.2849494-2-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel/iommu.c
drivers/iommu/intel/iommu.h

index 769e850..55a055a 100644 (file)
@@ -445,24 +445,6 @@ int iommu_calculate_agaw(struct intel_iommu *iommu)
        return __iommu_calculate_agaw(iommu, DEFAULT_DOMAIN_ADDRESS_WIDTH);
 }
 
-/* This functionin only returns single iommu in a domain */
-struct intel_iommu *domain_get_iommu(struct dmar_domain *domain)
-{
-       int iommu_id;
-
-       /* si_domain and vm domain should not get here. */
-       if (WARN_ON(!iommu_is_dma_domain(&domain->domain)))
-               return NULL;
-
-       for_each_domain_iommu(iommu_id, domain)
-               break;
-
-       if (iommu_id < 0 || iommu_id >= g_num_of_iommus)
-               return NULL;
-
-       return g_iommus[iommu_id];
-}
-
 static inline bool iommu_paging_structure_coherency(struct intel_iommu *iommu)
 {
        return sm_supported(iommu) ?
index df64d3d..56e0d8c 100644 (file)
@@ -725,7 +725,6 @@ extern int dmar_ir_support(void);
 
 void *alloc_pgtable_page(int node);
 void free_pgtable_page(void *vaddr);
-struct intel_iommu *domain_get_iommu(struct dmar_domain *domain);
 void iommu_flush_write_buffer(struct intel_iommu *iommu);
 int intel_iommu_enable_pasid(struct intel_iommu *iommu, struct device *dev);
 struct intel_iommu *device_to_iommu(struct device *dev, u8 *bus, u8 *devfn);