]> git.baikalelectronics.ru Git - kernel.git/commit
perf/smmuv3: Fix unused variable warning when CONFIG_OF=n
authorWill Deacon <will@kernel.org>
Tue, 4 Jan 2022 13:34:12 +0000 (13:34 +0000)
committerWill Deacon <will@kernel.org>
Tue, 4 Jan 2022 13:38:16 +0000 (13:38 +0000)
commitbba1b2989c0f39f5d224762c5303f6817c642ec0
tree3cd2325156af48b721e0ec3a0e549b460878d90c
parente82cf728cd29111aabd0285c141c41e830700f5e
perf/smmuv3: Fix unused variable warning when CONFIG_OF=n

The kbuild robot reports that building the SMMUv3 PMU driver with
CONFIG_OF=n results in a warning for W=1 builds:

>> drivers/perf/arm_smmuv3_pmu.c:889:34: warning: unused variable 'smmu_pmu_of_match' [-Wunused-const-variable]
   static const struct of_device_id smmu_pmu_of_match[] = {
                                    ^

Guard the match table with #ifdef CONFIG_OF.

Link: https://lore.kernel.org/r/202201041700.01KZEzhb-lkp@intel.com
Fixes: 92beba6f5671 ("perf/smmuv3: Add devicetree support")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/arm_smmuv3_pmu.c