diff options
author | Guenter Roeck <[email protected]> | 2016-06-24 19:41:57 -0700 |
---|---|---|
committer | Guenter Roeck <[email protected]> | 2016-06-27 18:58:04 -0700 |
commit | 9ad0df1adac20d694fbb8e7cb7bac04e0645a927 (patch) | |
tree | 49f518ce469dd8fc3636d65ffccd28899741c098 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 51b8c2cd92f1b59657a13339dffcca79c76126d1 (diff) |
hwmon: (ina3221) Fix negative limits
The result of an integer divide by an unsigned is undefined.
This causes unexpected results when writing negative values
into the limit registers.
Maintain the shunt_resistors variables as signed integer to avoid
the problem. Also, for simplicity and ease of use, clamp shunt
resistor value on writes instead of rejecting bad values.
Cc: Andrew F. Davis <[email protected]>
Acked-by: Andrew F. Davis <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions