Skip to contentSkip to conversation

iommu/arm-smmu-v3: remove set but not used variable 'smmu'

PATCH Applied Chen Zhou 2 participants 2 messages May 8, 2020 – May 18, 2020 IOMMU

lore
Share & tools
lore

Chen Zhou

author
#0 lore raw

PATCH 1/1 iommu/arm-smmu-v3: remove set but not used variable 'smmu'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/iommu/arm-smmu-v3.c:2989:26:
warning: variable ‘smmu’ set but not used [-Wunused-but-set-variable]
struct arm_smmu_device *smmu;

---
 drivers/iommu/arm-smmu-v3.c | 2 --
 1 file changed, 2 deletions(-)
drivers/iommu/arm-smmu-v3.c +0 -2
index 42e1ee7e5197..89ee9c5d8b88 100644
@@ -2986,13 +2986,11 @@ static void arm_smmu_release_device(struct device *dev)
 {
 	struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
 	struct arm_smmu_master *master;
-	struct arm_smmu_device *smmu;
 
 	if (!fwspec || fwspec->ops != &arm_smmu_ops)
 		return;
 
 	master = dev_iommu_priv_get(dev);
-	smmu = master->smmu;
 	arm_smmu_detach_dev(master);
 	arm_smmu_disable_pasid(master);
 	kfree(master);
Signature · 7 lines
2.20.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Applied
#1 lore raw
Quoted 5 lines · Chen Zhou

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/iommu/arm-smmu-v3.c:2989:26:
warning: variable ‘smmu’ set but not used [-Wunused-but-set-variable]
struct arm_smmu_device *smmu;

Applied to will (for-joerg/arm-smmu/updates), thanks!

[1/1] iommu/arm-smmu-v3: remove set but not used variable 'smmu'

      https://git.kernel.org/will/c/06020196c82e

Cheers,

Signature · 5 lines
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev