[PATCH 6.1.y] KVM: arm64: silence -Wuninitialized-const-pointer warning

Nathan Chancellor nathan at kernel.org
Fri Jul 25 09:26:54 PDT 2025


On Fri, Jul 25, 2025 at 08:30:21AM +0100, Marc Zyngier wrote:
> The correct fix would be to backport the series described in
> e8789ab7047a8, which should be easy enough to apply. it would also
> make 6.1 less of a terrible kernel.

If doing that is reasonable to clear this up, I think that would be fine
to do. This is the only stable-only instance of that warning that I have
seen in the build logs, I have sent patches to deal with all the other
instances upstream. We would need this in 5.15 to avoid failures from
-Werror as well but if it is too hard to backport that series there, we
could just disable this warning for this file since we know it is a
false positive.

The whole reason the warning occurs is due to the constness of the
sys_reg_desc parameter in the function created by FUNCTION_INVARIANT(),
which I am guessing cannot be removed because it is present in
->access() and it proliferates out from there?

Cheers,
Nathan



More information about the linux-arm-kernel mailing list