Skip to contentSkip to conversation

intel-iommu: fix a variable set but not used

PATCH Applied Qian Cai 2 participants 2 messages May 31, 2019 – Jun 3, 2019 IOMMU

lore
Share & tools
lore

Qian Cai

author
#0 lore raw

PATCH 1/1 intel-iommu: fix a variable set but not used

The commit "iommu/vt-d: Delegate the dma domain to upper layer" left an unused variable,

drivers/iommu/intel-iommu.c: In function 'disable_dmar_iommu':
drivers/iommu/intel-iommu.c:1652:23: warning: variable 'domain' set but not used [-Wunused-but-set-variable]

---
 drivers/iommu/intel-iommu.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/iommu/intel-iommu.c +0 -4
index b431cc6f6ba4..073c547f247a 100644
@@ -1649,16 +1649,12 @@ static void disable_dmar_iommu(struct intel_iommu *iommu)
 
 	spin_lock_irqsave(&device_domain_lock, flags);
 	list_for_each_entry_safe(info, tmp, &device_domain_list, global) {
-		struct dmar_domain *domain;
-
 		if (info->iommu != iommu)
 			continue;
 
 		if (!info->dev || !info->domain)
 			continue;
 
-		domain = info->domain;
-
 		__dmar_remove_one_dev_info(info);
 	}
 	spin_unlock_irqrestore(&device_domain_lock, flags);
Signature · 1 line
1.8.3.1
Applied
#1 lore raw
Quoted 11 lines · Qian Cai

The commit "iommu/vt-d: Delegate the dma domain to upper layer" left an unused variable,

drivers/iommu/intel-iommu.c: In function 'disable_dmar_iommu':
drivers/iommu/intel-iommu.c:1652:23: warning: variable 'domain' set but not used [-Wunused-but-set-variable]

---
 drivers/iommu/intel-iommu.c | 4 ----
 1 file changed, 4 deletions(-)

Applied, thanks.