diff options
author | Guenter Roeck <linux@roeck-us.net> | 2012-08-25 02:25:01 +0200 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2012-09-02 03:58:09 +0200 |
commit | b6d86d3d6d6e4c9b588d81615c81b5a8292b62ed (patch) | |
tree | 814c4ba720911beba197b610d4bd4559a26c3e96 /drivers/pcmcia/i82092.c | |
parent | Linux 3.6-rc4 (diff) | |
download | linux-b6d86d3d6d6e4c9b588d81615c81b5a8292b62ed.tar.xz linux-b6d86d3d6d6e4c9b588d81615c81b5a8292b62ed.zip |
linux/kernel.h: Fix DIV_ROUND_CLOSEST to support negative dividends
DIV_ROUND_CLOSEST returns a bad result for negative dividends:
DIV_ROUND_CLOSEST(-2, 2) = 0
Most of the time this does not matter. However, in the hardware monitoring
subsystem, DIV_ROUND_CLOSEST is sometimes used on integers which can be
negative (such as temperatures).
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/pcmcia/i82092.c')
0 files changed, 0 insertions, 0 deletions