Skip to content

Commit c3f27c8

Browse files
LuBaolujoergroedel
authored andcommitted
iommu/vt-d: Remove unused domain_get_iommu()
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>
1 parent 5eaafdf commit c3f27c8

2 files changed

Lines changed: 0 additions & 19 deletions

File tree

drivers/iommu/intel/iommu.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -445,24 +445,6 @@ int iommu_calculate_agaw(struct intel_iommu *iommu)
445445
return __iommu_calculate_agaw(iommu, DEFAULT_DOMAIN_ADDRESS_WIDTH);
446446
}
447447

448-
/* This functionin only returns single iommu in a domain */
449-
struct intel_iommu *domain_get_iommu(struct dmar_domain *domain)
450-
{
451-
int iommu_id;
452-
453-
/* si_domain and vm domain should not get here. */
454-
if (WARN_ON(!iommu_is_dma_domain(&domain->domain)))
455-
return NULL;
456-
457-
for_each_domain_iommu(iommu_id, domain)
458-
break;
459-
460-
if (iommu_id < 0 || iommu_id >= g_num_of_iommus)
461-
return NULL;
462-
463-
return g_iommus[iommu_id];
464-
}
465-
466448
static inline bool iommu_paging_structure_coherency(struct intel_iommu *iommu)
467449
{
468450
return sm_supported(iommu) ?

drivers/iommu/intel/iommu.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,6 @@ extern int dmar_ir_support(void);
725725

726726
void *alloc_pgtable_page(int node);
727727
void free_pgtable_page(void *vaddr);
728-
struct intel_iommu *domain_get_iommu(struct dmar_domain *domain);
729728
void iommu_flush_write_buffer(struct intel_iommu *iommu);
730729
int intel_iommu_enable_pasid(struct intel_iommu *iommu, struct device *dev);
731730
struct intel_iommu *device_to_iommu(struct device *dev, u8 *bus, u8 *devfn);

0 commit comments

Comments
 (0)