[PATCH] arm64/signal: Silence spurious sparse warning storing GCSPR_EL0
Mark Brown
broonie at kernel.org
Tue Dec 10 06:45:53 PST 2024
On Tue, Dec 10, 2024 at 02:17:58PM +0000, Catalin Marinas wrote:
> On Tue, Dec 10, 2024 at 12:42:53AM +0000, Mark Brown wrote:
> > - write_sysreg_s(gcspr_el0 + 1, SYS_GCSPR_EL0);
> > + write_sysreg_s((unsigned long)(gcspr_el0 + 1), SYS_GCSPR_EL0);
> Would we now get a warning here?
No, like the changelog mentions converting to an unsigned long is
regarded by sparse as a (the AFAICT) valid way of discarding the
__userness of a pointer so it's that change that silences the warning.
It does the right thing with whatever sparse I have here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20241210/10d41d1d/attachment.sig>
More information about the linux-arm-kernel
mailing list