From: Guenter Roeck Date: Sat, 25 Aug 2012 00:25:01 +0000 (-0700) Subject: linux/kernel.h: Fix DIV_ROUND_CLOSEST to support negative dividends X-Git-Tag: v3.6-rc5~7^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6d86d3d6d6e4c9b588d81615c81b5a8292b62ed;p=pandora-kernel.git 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 Acked-by: Jean Delvare --- Reading git-diff-tree failed