HomeFreeBSD

LinuxKPI: fix WRITE_ONCE()

Description

LinuxKPI: fix WRITE_ONCE()

Fix a gcc warning: "to be safe all intermediate pointers in cast from
'...' to '...' must be 'const' qualified [-Wcast-qual]".
Doing what is essentially a __DECONST() adding the uintptr_t gets
rid of the massive amount of warnings we get in LinuxKPI and lets
us see the actual problems a lot better.
This is a follow-up to 74e908b3c63b28de1d590dc42502fbe959a6da2e which
fixed READ_ONCE().

Sponsored by: The FreeBSD Foundation
Suggested by: jhb
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D40084

(cherry picked from commit 046d8d89ed1956944b12ec4f0580c30bc202bbfb)

Details

Provenance
bzAuthored on May 13 2023, 3:17 PM
Reviewer
hselasky
Differential Revision
D40084: LinuxKPI: fix WRITE_ONCE()
Parents
rG38f969d41c54: LinuxKPI: fix READ_ONCE() -Wcast-equal warnings
Branches
Unknown
Tags
Unknown