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

Marc Zyngier maz at kernel.org
Fri Jul 25 09:53:19 PDT 2025


On Fri, 25 Jul 2025 17:26:54 +0100,
Nathan Chancellor <nathan at kernel.org> wrote:
> 
> 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.

5.15 would be rather challenging, I'm afraid, and I wouldn't want to
review such a thing.

> 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?

Exactly. Which was a rather bad move when it was introduced over a
decade ago (in v3.11), and we only got 'round to killing it entirely
in v6.15.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.



More information about the linux-arm-kernel mailing list