hwmon: (pmbus/core) Use s64 instead of long for calculations
authorJosh Lehan <krellan@google.com>
Fri, 26 Jun 2020 00:13:43 +0000 (17:13 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 24 Jul 2020 14:44:57 +0000 (07:44 -0700)
commit8ba75b2028496777a7d595ed5ba03cc85f86bdbb
tree3b75eadddf861bb8386d2a54af9d7cfbb6ee6b7e
parent5c9353f5f81340f350320b5fcfc4c09756ba6da4
hwmon: (pmbus/core) Use s64 instead of long for calculations

Using s64 type, instead of long type, for internal calculations and for
the sysfs interface.

This allows 64-bit values to appear correctly on 32-bit kernels.
As wattage is reported in microwatts, monitoring a power supply over
2KW requires this.

Although it may seem unlikely to run a 32-bit kernel on such a large
machine, enterprise servers often include a BMC, and the BMC might be
running a 32-bit kernel.

Signed-off-by: Josh Lehan <krellan@google.com>
[groeck: Removed Change-Id and other tags, reformatted description]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/pmbus_core.c