[arm64:for-next/perf 5/28] drivers/perf/dwc_pcie_pmu.c:418 dwc_pcie_pmu_validate_group() error: uninitialized symbol 'time_event'.
Ilkka Koskinen
ilkka at os.amperecomputing.com
Tue Sep 23 14:16:27 PDT 2025
On Tue, 23 Sep 2025, Will Deacon wrote:
> On Tue, Sep 23, 2025 at 09:35:18AM +0100, Will Deacon wrote:
>> On Tue, Sep 23, 2025 at 11:27:21AM +0300, Dan Carpenter wrote:
>>> On Tue, Sep 23, 2025 at 12:55:01AM -0700, Ilkka Koskinen wrote:
>>>> That's cleary a bug and I don't know how I missed it.
>>>
>>> Because we disabled uninitialized variable warnings for GCC and because
>>> everyone has CONFIG_INIT_STACK_ALL_ZERO set so it wouldn't show up in
>>> testing either.
>>
>> The more annoying thing is that I run smatch on my tree before pushing
>> but somehow I didn't notice this. I'll run it again to see whether it
>> detected it in the first place...
>
> bah, there it is:
>
> +drivers/perf/dwc_pcie_pmu.c:418 dwc_pcie_pmu_validate_group() error: uninitialized symbol 'time_event'. [smatch]
>
> so not sure why I missed this. Maybe I used the wrong .config (this
> driver isn't enabled in defconfig).
>
> Will
Interestingly, the gcc version I was using to doesn't raise a warning even
if I have -Wmaybe-initialized set. It does warn though if I move the if
line outside the loop.
Anyways, I'm glad Dan and the test bot caught the bug.
Cheers, Ilkka
More information about the linux-arm-kernel
mailing list