summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/task-analyzer.py
diff options
context:
space:
mode:
authorAndré Draszik <andre.draszik@linaro.org>2026-03-02 13:32:05 +0000
committerSebastian Reichel <sebastian.reichel@collabora.com>2026-03-03 23:58:07 +0100
commit9a44949da669708f19d29141e65b3ac774d08f5a (patch)
treed3c82f06ea54e04163ee569230a54954660d5c3b /tools/perf/scripts/python/task-analyzer.py
parent699f0f71ac98cf79fecdcab0a604b25f11c580b6 (diff)
power: supply: max17042: avoid overflow when determining health
If vmax has the default value of INT_MAX (e.g. because not specified in DT), battery health is reported as over-voltage. This is because adding any value to vmax (the vmax tolerance in this case) causes it to wrap around, making it negative and smaller than the measured battery voltage. Avoid that by using size_add(). Fixes: edd4ab055931 ("power: max17042_battery: add HEALTH and TEMP_* properties support") Cc: stable@vger.kernel.org Signed-off-by: André Draszik <andre.draszik@linaro.org> Link: https://patch.msgid.link/20260302-max77759-fg-v3-6-3c5f01dbda23@linaro.org Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions