Skip to content

Commit 7175323

Browse files
bjorn-helgaasjoergroedel
authored andcommitted
iommu/vt-d: Remove unused dmar_remove_one_dev_info() argument
domain_remove_dev_info() takes a struct dmar_domain * argument, but doesn't use it. Remove it. No functional change intended. The last use of this argument was removed by 127c761 ("iommu/vt-d: Pass device_domain_info to __dmar_remove_one_dev_info"). Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent e083ea5 commit 7175323

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

drivers/iommu/intel-iommu.c

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,7 @@ static int g_num_of_iommus;
343343

344344
static void domain_exit(struct dmar_domain *domain);
345345
static void domain_remove_dev_info(struct dmar_domain *domain);
346-
static void dmar_remove_one_dev_info(struct dmar_domain *domain,
347-
struct device *dev);
346+
static void dmar_remove_one_dev_info(struct device *dev);
348347
static void __dmar_remove_one_dev_info(struct device_domain_info *info);
349348
static void domain_context_clear(struct intel_iommu *iommu,
350349
struct device *dev);
@@ -2546,7 +2545,7 @@ static struct dmar_domain *dmar_insert_one_dev_info(struct intel_iommu *iommu,
25462545
ret = intel_pasid_alloc_table(dev);
25472546
if (ret) {
25482547
dev_err(dev, "PASID table allocation failed\n");
2549-
dmar_remove_one_dev_info(domain, dev);
2548+
dmar_remove_one_dev_info(dev);
25502549
return NULL;
25512550
}
25522551

@@ -2561,14 +2560,14 @@ static struct dmar_domain *dmar_insert_one_dev_info(struct intel_iommu *iommu,
25612560
spin_unlock(&iommu->lock);
25622561
if (ret) {
25632562
dev_err(dev, "Setup RID2PASID failed\n");
2564-
dmar_remove_one_dev_info(domain, dev);
2563+
dmar_remove_one_dev_info(dev);
25652564
return NULL;
25662565
}
25672566
}
25682567

25692568
if (dev && domain_context_mapping(domain, dev)) {
25702569
dev_err(dev, "Domain context map failed\n");
2571-
dmar_remove_one_dev_info(domain, dev);
2570+
dmar_remove_one_dev_info(dev);
25722571
return NULL;
25732572
}
25742573

@@ -3621,7 +3620,7 @@ static int iommu_no_mapping(struct device *dev)
36213620
* 32 bit DMA is removed from si_domain and fall back
36223621
* to non-identity mapping.
36233622
*/
3624-
dmar_remove_one_dev_info(si_domain, dev);
3623+
dmar_remove_one_dev_info(dev);
36253624
dev_info(dev, "32bit DMA uses non-identity mapping\n");
36263625
return 0;
36273626
}
@@ -4576,7 +4575,7 @@ static int device_notifier(struct notifier_block *nb,
45764575
if (!domain)
45774576
return 0;
45784577

4579-
dmar_remove_one_dev_info(domain, dev);
4578+
dmar_remove_one_dev_info(dev);
45804579
if (!domain_type_is_vm_or_si(domain) && list_empty(&domain->devices))
45814580
domain_exit(domain);
45824581

@@ -4989,8 +4988,7 @@ static void __dmar_remove_one_dev_info(struct device_domain_info *info)
49894988
free_devinfo_mem(info);
49904989
}
49914990

4992-
static void dmar_remove_one_dev_info(struct dmar_domain *domain,
4993-
struct device *dev)
4991+
static void dmar_remove_one_dev_info(struct device *dev)
49944992
{
49954993
struct device_domain_info *info;
49964994
unsigned long flags;
@@ -5079,7 +5077,7 @@ static int intel_iommu_attach_device(struct iommu_domain *domain,
50795077
old_domain = find_domain(dev);
50805078
if (old_domain) {
50815079
rcu_read_lock();
5082-
dmar_remove_one_dev_info(old_domain, dev);
5080+
dmar_remove_one_dev_info(dev);
50835081
rcu_read_unlock();
50845082

50855083
if (!domain_type_is_vm_or_si(old_domain) &&
@@ -5126,7 +5124,7 @@ static int intel_iommu_attach_device(struct iommu_domain *domain,
51265124
static void intel_iommu_detach_device(struct iommu_domain *domain,
51275125
struct device *dev)
51285126
{
5129-
dmar_remove_one_dev_info(to_dmar_domain(domain), dev);
5127+
dmar_remove_one_dev_info(dev);
51305128
}
51315129

51325130
static int intel_iommu_map(struct iommu_domain *domain,

0 commit comments

Comments
 (0)