Page MenuHomeFreeBSD

LinuxKPI: fix READ_ONCE() -Wcast-equal warnings
ClosedPublic

Authored by bz on Apr 19 2023, 9:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 7, 7:20 AM
Unknown Object (File)
Sat, Oct 4, 4:15 AM
Unknown Object (File)
Tue, Sep 30, 10:19 AM
Unknown Object (File)
Tue, Sep 30, 5:13 AM
Unknown Object (File)
Mon, Sep 29, 3:29 PM
Unknown Object (File)
Aug 19 2025, 7:04 PM
Unknown Object (File)
Aug 10 2025, 1:05 AM
Unknown Object (File)
Aug 5 2025, 7:30 AM

Details

Summary

Rather than using ACCESS_ONCE() in READ_ONCE() add a missing cast
to const in order to satisfy -Wcast-equal by gcc.
Sadly we cannot do the same to WRITE_ONCE() which still is very
noisy.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable