[PATCH v2 -next] perf/marvell: cn10k Fix build error without CONFIG_OF

YueHaibing yuehaibing at huawei.com
Wed Mar 9 22:50:45 PST 2022


drivers/perf/marvell_cn10k_ddr_pmu.c:723:21: error: ‘cn10k_ddr_pmu_of_match’ undeclared here (not in a function); did you mean ‘cn10k_ddr_pmu_driver’?
    	 .of_match_table = cn10k_ddr_pmu_of_match,
      	                   ^~~~~~~~~~~~~~~~~~~~~~

Remove the #ifdef around the match table, because CONFIG_OF is always enabled on arm64.

Fixes: 7cf83e222bce ("perf/marvell: CN10k DDR performance monitor support")
Signed-off-by: YueHaibing <yuehaibing at huawei.com>
---
v2: Remove the #ifdef macro as Arnd suggested
---
 drivers/perf/marvell_cn10k_ddr_pmu.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/perf/marvell_cn10k_ddr_pmu.c b/drivers/perf/marvell_cn10k_ddr_pmu.c
index 7f3146e71f99..bef0cee3a46a 100644
--- a/drivers/perf/marvell_cn10k_ddr_pmu.c
+++ b/drivers/perf/marvell_cn10k_ddr_pmu.c
@@ -709,13 +709,11 @@ static int cn10k_ddr_perf_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_OF
 static const struct of_device_id cn10k_ddr_pmu_of_match[] = {
 	{ .compatible = "marvell,cn10k-ddr-pmu", },
 	{ },
 };
 MODULE_DEVICE_TABLE(of, cn10k_ddr_pmu_of_match);
-#endif
 
 static struct platform_driver cn10k_ddr_pmu_driver = {
 	.driver	= {
-- 
2.17.1




More information about the linux-arm-kernel mailing list