Files
Rafael J. Wysocki 5fa5febeaf thermal: trip: Use READ_ONCE() for lockless access to trip properties
[ Upstream commit a52641bc62 ]

When accessing trip temperature and hysteresis without locking, it is
better to use READ_ONCE() to prevent compiler optimizations possibly
affecting the read from being applied.

Of course, for the READ_ONCE() to be effective, WRITE_ONCE() needs to
be used when updating their values.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-09-08 07:56:37 +02:00
..