hwmon: (pmbus) Use 64bit math for DIRECT format values
authorRobert Lippert <roblip@gmail.com>
Mon, 27 Nov 2017 23:51:55 +0000 (15:51 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Feb 2018 16:39:09 +0000 (17:39 +0100)
commit1271aeb0027cad65ae21737d9b0c60440dae9638
treecee13f1be7686dadc089cce19f8839b4fbcf4cfe
parent02cfbaa6cd42cb7bb041519ffd8cd7f3e5a16863
hwmon: (pmbus) Use 64bit math for DIRECT format values

[ Upstream commit bd467e4eababe4c04272c1e646f066db02734c79 ]

Power values in the 100s of watt range can easily blow past
32bit math limits when processing everything in microwatts.

Use 64bit math instead to avoid these issues on common 32bit ARM
BMC platforms.

Fixes: 442aba78728e ("hwmon: PMBus device driver")
Signed-off-by: Robert Lippert <rlippert@google.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwmon/pmbus/pmbus_core.c