]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
iommu/tegra241-cmdqv: Fix unused variable warning
authorWill Deacon <will@kernel.org>
Tue, 29 Oct 2024 15:58:24 +0000 (15:58 +0000)
committerWill Deacon <will@kernel.org>
Tue, 29 Oct 2024 15:58:24 +0000 (15:58 +0000)
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 <will@kernel.org>
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c

index a243c543598ce6d45fd5137ba0653cff8564c8ff..6c7770e79af6debf09ecaefea8605ff59f692a77 100644 (file)
@@ -800,7 +800,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,