From: Will Deacon Date: Tue, 29 Oct 2024 15:58:24 +0000 (+0000) Subject: iommu/tegra241-cmdqv: Fix unused variable warning X-Git-Tag: v6.12.4~138 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=259449873c37da3067822b1608ab04ceee985a89;p=thirdparty%2Fkernel%2Fstable.git iommu/tegra241-cmdqv: Fix unused variable warning commit 5492f0c4085a8fb8820ff974f17b83a7d6dab5a5 upstream. While testing some io-pgtable changes, I ran into a compiler warning from the Tegra CMDQ driver: drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:803:23: warning: unused variable 'cmdqv_debugfs_dir' [-Wunused-variable] 803 | static struct dentry *cmdqv_debugfs_dir; | ^~~~~~~~~~~~~~~~~ 1 warning generated. Guard the variable declaration with CONFIG_IOMMU_DEBUGFS to silence the warning. Signed-off-by: Will Deacon Cc: Jiri Slaby Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c b/drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c index 6b479592140c4..c8ec74f089f3d 100644 --- a/drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c +++ b/drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c @@ -801,7 +801,9 @@ out_fallback: return 0; } +#ifdef CONFIG_IOMMU_DEBUGFS static struct dentry *cmdqv_debugfs_dir; +#endif static struct arm_smmu_device * __tegra241_cmdqv_probe(struct arm_smmu_device *smmu, struct resource *res,