summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/exported-sql-viewer.py
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-09-24 13:11:51 +0300
committerGuenter Roeck <linux@roeck-us.net>2022-09-26 00:22:11 +0300
commitf9c0cf8f26de367c58e48b02b1cdb9c377626e6f (patch)
treef8bb9261a7baf1362456d9f1c6e66f052aabd677 /tools/perf/scripts/python/exported-sql-viewer.py
parent1b2f9b1e6dd36a64b84f65078322109ffc453f0c (diff)
downloadlinux-f9c0cf8f26de367c58e48b02b1cdb9c377626e6f.tar.xz
hwmon: (sht4x) do not overflow clamping operation on 32-bit platforms
On 32-bit platforms, long is 32 bits, so (long)UINT_MAX is less than (long)SHT4X_MIN_POLL_INTERVAL, which means the clamping operation is bogus. Fix this by clamping at INT_MAX, so that the upperbound is the same on all platforms. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Link: https://lore.kernel.org/r/20220924101151.4168414-1-Jason@zx2c4.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions