summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2026-10-31 18:42:37 -0700
committerGuenter Roeck <linux@roeck-us.net>2026-11-02 07:00:05 -0800
commit1a30ea0be623b7443edb6adc79e07632418cefdc (patch)
treebed518bc43c43a44ccb851bd84e044fec2cb138b /tools/perf/scripts/python
parent9a6aa085c94c7f2817c4d50a7264e6fb51286f40 (diff)
hwmon: (sht4x) Convert update_interval to jiffies in pending data check
In sht4x_read_values(), the check for whether a pending post-heater measurement is still fresh compares get_jiffies_64() against data->heating_complete + data->update_interval. However, data->heating_complete is stored in jiffies whereas data->update_interval is stored in milliseconds. Whenever HZ != 1000, adding data->update_interval directly without msecs_to_jiffies() mixes incompatible time units. For example, with the default 2000 ms update_interval, the validity window is inflated to 8 seconds at HZ=250 and 20 seconds at HZ=100 instead of 2 seconds. A read within that extended window skips triggering a fresh measurement and instead returns and caches the stale post-heating measurement left in the sensor's output buffer. Convert data->update_interval to jiffies using msecs_to_jiffies() when computing the pending measurement expiration deadline, matching the next_update calculation right below it. Reported-by: Sashiko <sashiko-bot@kernel.org> Fixes: 0eed6fc3d2b9 ("hwmon: (sht4x): add heater support") Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions