[PATCH v2 35/42][SRU][U] iommu/amd: Fix variable "iommu" set but not used
You-Sheng Yang
vicamo.yang at canonical.com
Tue Jun 2 07:48:36 UTC 2020
From: Qian Cai <cai at lca.pw>
BugLink: https://bugs.launchpad.net/bugs/1876707
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;
^~~~~
Signed-off-by: Qian Cai <cai at lca.pw>
Link: https://lore.kernel.org/r/20200509015645.3236-1-cai@lca.pw
Fixes: dce8d6964ebd ("iommu/amd: Convert to probe/release_device() call-backs")
Signed-off-by: Joerg Roedel <jroedel at suse.de>
(cherry picked from commit cfcccbe8879f79bc9f8a162bcb482c74b8768094
linux-next)
Signed-off-by: You-Sheng Yang <vicamo.yang at canonical.com>
---
drivers/iommu/amd_iommu.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 3d158239bb67..1b36c40d0712 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -420,15 +420,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;
--
2.25.1
More information about the kernel-team
mailing list