* [PATCH -next] perf/marvell: cn10k Fix build error without CONFIG_OF
@ 2022-03-09 14:06 YueHaibing
2022-03-09 14:11 ` Arnd Bergmann
0 siblings, 1 reply; 3+ messages in thread
From: YueHaibing @ 2022-03-09 14:06 UTC (permalink / raw)
To: will, mark.rutland, bbhushan2, bbudiredla
Cc: linux-arm-kernel, linux-kernel, YueHaibing
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,
^~~~~~~~~~~~~~~~~~~~~~
Use of_match_ptr() to fix this.
Fixes: 7cf83e222bce ("perf/marvell: CN10k DDR performance monitor support")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/perf/marvell_cn10k_ddr_pmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/perf/marvell_cn10k_ddr_pmu.c b/drivers/perf/marvell_cn10k_ddr_pmu.c
index 7f3146e71f99..665b382a0ee3 100644
--- a/drivers/perf/marvell_cn10k_ddr_pmu.c
+++ b/drivers/perf/marvell_cn10k_ddr_pmu.c
@@ -720,7 +720,7 @@ MODULE_DEVICE_TABLE(of, cn10k_ddr_pmu_of_match);
static struct platform_driver cn10k_ddr_pmu_driver = {
.driver = {
.name = "cn10k-ddr-pmu",
- .of_match_table = cn10k_ddr_pmu_of_match,
+ .of_match_table = of_match_ptr(cn10k_ddr_pmu_of_match),
.suppress_bind_attrs = true,
},
.probe = cn10k_ddr_perf_probe,
--
2.17.1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH -next] perf/marvell: cn10k Fix build error without CONFIG_OF
2022-03-09 14:06 [PATCH -next] perf/marvell: cn10k Fix build error without CONFIG_OF YueHaibing
@ 2022-03-09 14:11 ` Arnd Bergmann
2022-03-10 6:42 ` YueHaibing
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2022-03-09 14:11 UTC (permalink / raw)
To: YueHaibing
Cc: Will Deacon, Mark Rutland, Bharat Bhushan, bbudiredla, Linux ARM,
Linux Kernel Mailing List
On Wed, Mar 9, 2022 at 3:06 PM YueHaibing <yuehaibing@huawei.com> wrote:
>
> 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,
> ^~~~~~~~~~~~~~~~~~~~~~
>
> Use of_match_ptr() to fix this.
>
> Fixes: 7cf83e222bce ("perf/marvell: CN10k DDR performance monitor support")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
It's generally better to remove the #ifdef around the match table
definition instead,
which improves readability, and has no downsides on the machines this actually
runs on, because CONFIG_OF is always enabled on arm64.
Arnd
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH -next] perf/marvell: cn10k Fix build error without CONFIG_OF
2022-03-09 14:11 ` Arnd Bergmann
@ 2022-03-10 6:42 ` YueHaibing
0 siblings, 0 replies; 3+ messages in thread
From: YueHaibing @ 2022-03-10 6:42 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Will Deacon, Mark Rutland, Bharat Bhushan, bbudiredla, Linux ARM,
Linux Kernel Mailing List
On 2022/3/9 22:11, Arnd Bergmann wrote:
> On Wed, Mar 9, 2022 at 3:06 PM YueHaibing <yuehaibing@huawei.com> wrote:
>>
>> 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,
>> ^~~~~~~~~~~~~~~~~~~~~~
>>
>> Use of_match_ptr() to fix this.
>>
>> Fixes: 7cf83e222bce ("perf/marvell: CN10k DDR performance monitor support")
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>
> It's generally better to remove the #ifdef around the match table
> definition instead,
> which improves readability, and has no downsides on the machines this actually
> runs on, because CONFIG_OF is always enabled on arm64.
Ok, will do this in v2, thanks!
>
> Arnd
> .
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-03-10 6:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-09 14:06 [PATCH -next] perf/marvell: cn10k Fix build error without CONFIG_OF YueHaibing
2022-03-09 14:11 ` Arnd Bergmann
2022-03-10 6:42 ` YueHaibing
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®