Skip to contentSkip to conversation

Remove wrong default domain comments

PATCH Applied Tom Murphy 2 participants 2 messages Aug 26, 2019 – Aug 30, 2019 IOMMU

lore
Share & tools
lore

Tom Murphy

author
#0 lore raw

PATCH 1/1 Remove wrong default domain comments

These comments are wrong. request_default_domain_for_dev doesn't just handle direct mapped domains.

---
 drivers/iommu/iommu.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/iommu/iommu.c +1 -3
index ea95080372e7..3b6807e7a2d8 100644
@@ -2179,7 +2179,6 @@ request_default_domain_for_dev(struct device *dev, unsigned long type)
 
 	mutex_lock(&group->mutex);
 
-	/* Check if the default domain is already direct mapped */
 	ret = 0;
 	if (group->default_domain && group->default_domain->type == type)
 		goto out;
@@ -2189,7 +2188,6 @@ request_default_domain_for_dev(struct device *dev, unsigned long type)
 	if (iommu_group_device_count(group) != 1)
 		goto out;
 
-	/* Allocate a direct mapped domain */
 	ret = -ENOMEM;
 	domain = __iommu_domain_alloc(dev->bus, type);
 	if (!domain)
@@ -2204,7 +2202,7 @@ request_default_domain_for_dev(struct device *dev, unsigned long type)
 
 	iommu_group_create_direct_mappings(group, dev);
 
-	/* Make the direct mapped domain the default for this group */
+	/* Make the domain the default for this group */
 	if (group->default_domain)
 		iommu_domain_free(group->default_domain);
 	group->default_domain = domain;
Signature · 1 line
2.20.1
maintainer Applied
#1 lore raw
Quoted 2 lines · Tom Murphy
 drivers/iommu/iommu.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Applied, thanks.