aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/event_analyzing_sample.py
diff options
context:
space:
mode:
authorNicolin Chen <[email protected]>2018-11-14 03:48:54 +0000
committerGuenter Roeck <[email protected]>2018-11-14 17:11:24 +0000
commit38cd989ee38c16388cde89db5b734f9d55b905f9 (patch)
tree25f99e7cc6454e8ad3d89a1c29b6cf4aab5803cb /tools/perf/scripts/python/event_analyzing_sample.py
parenthwmon: (raspberrypi) Fix initial notify (diff)
downloadkernel-38cd989ee38c16388cde89db5b734f9d55b905f9.tar.gz
kernel-38cd989ee38c16388cde89db5b734f9d55b905f9.zip
hwmon: (ina2xx) Fix current value calculation
The current register (04h) has a sign bit at MSB. The comments for this calculation also mention that it's a signed register. However, the regval is unsigned type so result of calculation turns out to be an incorrect value when current is negative. This patch simply fixes this by adding a casting to s16. Fixes: 5d389b125186c ("hwmon: (ina2xx) Make calibration register value fixed") Signed-off-by: Nicolin Chen <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions