Re: [PATCH v3] RAS/AMD/ATL: Fix unintended sign extension issue from coverity

From: Borislav Petkov
Date: Mon Dec 16 2024 - 12:37:34 EST


On Mon, Dec 16, 2024 at 10:43:58AM -0500, Yazen Ghannam wrote:
> Right, the warning is highlighting the implicit sign-extension, and it
> doesn't seem to be a functional bug.
>
> The 'temp' variable in this function is there to avoid these types of
> warnings. But the 'pc' case was missed.
>
> What do you recommend? Should we adjust the code to be more explicit and
> avoid the warning? Or just ignore it?

If there's no way for this to happen in the current code, then I'd suggest
to ignore it. Tools are not always right.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette