Skip to content

Commit 5492f0c

Browse files
committed
iommu/tegra241-cmdqv: Fix unused variable warning
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>
1 parent 229e6ee commit 5492f0c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,9 @@ static int tegra241_cmdqv_init_structures(struct arm_smmu_device *smmu)
800800
return 0;
801801
}
802802

803+
#ifdef CONFIG_IOMMU_DEBUGFS
803804
static struct dentry *cmdqv_debugfs_dir;
805+
#endif
804806

805807
static struct arm_smmu_device *
806808
__tegra241_cmdqv_probe(struct arm_smmu_device *smmu, struct resource *res,

0 commit comments

Comments
 (0)