thermal: trip: Use READ_ONCE() for lockless access to trip properties

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>
This commit is contained in:
Rafael J. Wysocki 2024-05-28 18:52:13 +02:00
commit a52641bc62
2 changed files with 4 additions and 4 deletions