2023-06-06 07:14:34

by Naresh Kamboju

[permalink] [raw]
Subject: perf: arch/x86/tests/amd-ibs-via-core-pmu.c:47:25: error: 'pmus' undeclared

Following warnings and errors noticed while building perf x86_64,

Reported-by: Linux Kernel Functional Testing <[email protected]>

Build log:
---------
arch/x86/tests/amd-ibs-via-core-pmu.c: In function 'test__amd_ibs_via_core_pmu':
arch/x86/tests/amd-ibs-via-core-pmu.c:47:25: error: 'pmus' undeclared
(first use in this function)
47 | if (list_empty(&pmus))
| ^~~~
arch/x86/tests/amd-ibs-via-core-pmu.c:47:25: note: each undeclared
identifier is reported only once for each function it appears in
arch/x86/tests/amd-ibs-via-core-pmu.c:48:17: error: implicit
declaration of function 'perf_pmu__scan'; did you mean
'perf_pmus__scan'? [-Werror=implicit-function-declaration]
48 | perf_pmu__scan(NULL);
| ^~~~~~~~~~~~~~
| perf_pmus__scan
arch/x86/tests/amd-ibs-via-core-pmu.c:50:19: error: implicit
declaration of function 'perf_pmu__find'; did you mean
'perf_pmus__find'? [-Werror=implicit-function-declaration]
50 | ibs_pmu = perf_pmu__find("ibs_op");
| ^~~~~~~~~~~~~~
| perf_pmus__find
arch/x86/tests/amd-ibs-via-core-pmu.c:50:17: error: assignment to
'struct perf_pmu *' from 'int' makes pointer from integer without a
cast [-Werror=int-conversion]
50 | ibs_pmu = perf_pmu__find("ibs_op");
| ^
cc1: all warnings being treated as errors

Links:
======
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230606/testrun/17346999/suite/build/test/gcc-11-lkftconfig-perf/log
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230606/testrun/17346999/suite/build/test/gcc-11-lkftconfig-perf/history/


--
Linaro LKFT
https://lkft.linaro.org


2023-06-06 07:52:20

by Ravi Bangoria

[permalink] [raw]
Subject: Re: perf: arch/x86/tests/amd-ibs-via-core-pmu.c:47:25: error: 'pmus' undeclared

On 06-Jun-23 12:19 PM, Naresh Kamboju wrote:
> Following warnings and errors noticed while building perf x86_64,
>
> Reported-by: Linux Kernel Functional Testing <[email protected]>

Thanks. Here is the fix:

https://lore.kernel.org/lkml/[email protected]