iommu/vt-d: Fix a variable set but not used
authorQian Cai <cai@lca.pw>
Fri, 31 May 2019 20:16:02 +0000 (16:16 -0400)
committerJoerg Roedel <jroedel@suse.de>
Mon, 3 Jun 2019 09:55:58 +0000 (11:55 +0200)
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]

Signed-off-by: Qian Cai <cai@lca.pw>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel-iommu.c

index d9d7d669de813a2ddffbbb4cd3cc8d632e17b02d..876096c1f91b8593f348ae6c3e32ab717d70754b 100644 (file)
@@ -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);