Skip to contentSkip to conversation

iommu/mediatek-v1: Fix a build warning for a unused variable 'data'

PATCH Applied Yong Wu 2 participants 2 messages May 19, 2020

Subsystems (3)
lore
Share & tools
lore

Yong Wu

author maintainer
#0 lore raw

PATCH 1/1 iommu/mediatek-v1: Fix a build warning for a unused variable 'data'

This patch fixes a build warning:
drivers/iommu/mtk_iommu_v1.c: In function 'mtk_iommu_release_device':

Quoted 2 lines
Quoted 2 lines

drivers/iommu/mtk_iommu_v1.c:467:25: warning: variable 'data' set but not used [-Wunused-but-set-variable]

467 | struct mtk_iommu_data *data;
| ^~~~

It's reported at:
https://lore.kernel.org/linux-iommu/202005191458.gY38V8bU%[email protected]/T/#u

---
 drivers/iommu/mtk_iommu_v1.c | 2 --
 1 file changed, 2 deletions(-)
drivers/iommu/mtk_iommu_v1.c +0 -2
index f353b07..c9d79cf 100644
@@ -469,12 +469,10 @@ static void mtk_iommu_probe_finalize(struct device *dev)
 static void mtk_iommu_release_device(struct device *dev)
 {
 	struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
-	struct mtk_iommu_data *data;
 
 	if (!fwspec || fwspec->ops != &mtk_iommu_ops)
 		return;
 
-	data = dev_iommu_priv_get(dev);
 	iommu_fwspec_free(dev);
 }
 
Signature · 1 line
1.9.1
maintainer Applied
#1 lore raw
Quoted 7 lines · Yong Wu

This patch fixes a build warning:
drivers/iommu/mtk_iommu_v1.c: In function 'mtk_iommu_release_device':

Quoted 2 lines
Quoted 2 lines

drivers/iommu/mtk_iommu_v1.c:467:25: warning: variable 'data' set but not used [-Wunused-but-set-variable]

467 | struct mtk_iommu_data *data;
| ^~~~

Quoted 8 lines

It's reported at:
https://lore.kernel.org/linux-iommu/202005191458.gY38V8bU%[email protected]/T/#u

---
 drivers/iommu/mtk_iommu_v1.c | 2 --
 1 file changed, 2 deletions(-)

Applied, thanks.