Skip to contentSkip to conversation

iommu/amd: fix variable "iommu" set but not used

PATCH Applied Qian Cai 2 participants 2 messages May 9, 2020 – May 13, 2020 IOMMU

lore
Share & tools
lore

Qian Cai

author
#0 lore raw

PATCH 1/1 iommu/amd: fix variable "iommu" set but not used

The commit dce8d6964ebd ("iommu/amd: Convert to probe/release_device() call-backs") introduced an unused variable,

drivers/iommu/amd_iommu.c: In function 'amd_iommu_uninit_device':
drivers/iommu/amd_iommu.c:422:20: warning: variable 'iommu' set but not used [-Wunused-but-set-variable]

  struct amd_iommu *iommu;
                    ^~~~~
---
 drivers/iommu/amd_iommu.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/iommu/amd_iommu.c +0 -3
index fef3689ee535..2b8eb58d2bea 100644
@@ -419,15 +419,12 @@ static void iommu_ignore_device(struct device *dev)
 static void amd_iommu_uninit_device(struct device *dev)
 {
 	struct iommu_dev_data *dev_data;
-	struct amd_iommu *iommu;
 	int devid;
 
 	devid = get_device_id(dev);
 	if (devid < 0)
 		return;
 
-	iommu = amd_iommu_rlookup_table[devid];
-
 	dev_data = search_dev_data(devid);
 	if (!dev_data)
 		return;
Signature · 1 line
2.21.0 (Apple Git-122.2)
maintainer Applied
#1 lore raw
Quoted 6 lines · Qian Cai

The commit dce8d6964ebd ("iommu/amd: Convert to probe/release_device() call-backs") introduced an unused variable,

drivers/iommu/amd_iommu.c: In function 'amd_iommu_uninit_device':
drivers/iommu/amd_iommu.c:422:20: warning: variable 'iommu' set but not used [-Wunused-but-set-variable]

Quoted 7 lines
  struct amd_iommu *iommu;
                    ^~~~~
---
 drivers/iommu/amd_iommu.c | 3 ---
 1 file changed, 3 deletions(-)

Applied, thanks.