From: Guenter Roeck Date: Mon, 30 Jun 2014 14:34:30 +0000 (-0700) Subject: hwmon: (w83791d) Fix smatch warning X-Git-Tag: omap-for-v3.17/fixes-against-rc2~159^2~55 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40ebdb9274ba71b6211f500904a3935af81a00ca;p=pandora-kernel.git hwmon: (w83791d) Fix smatch warning smatch complains as follows when checking w83791d.c. drivers/hwmon/w83791d.c:996 store_temp23() warn: '32768' 32768 can't fit into 32767 'data->temp_add[nr][index]' Fix by using DIV_ROUND_CLOSEST and clamp_val to convert the values. While we are at it, modify other macros as well for consistency and to make the code easier to understand. Signed-off-by: Guenter Roeck --- Reading git-diff-tree failed