]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9872913ff17dd315102e399d970a09217e737258
tree3b75eadddf861bb8386d2a54af9d7cfbb6ee6b7e
parentce4e49ba3c349f1b28c6caeadb54b43b4a772560
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