From: Rasmus Villemoes Date: Thu, 12 Feb 2015 14:15:17 +0000 (+0100) Subject: hwmon: (ibmpex) Allow format string checking X-Git-Tag: omap-for-v4.1/fixes-rc1~180^2~41 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0fc74d42d2215496302a0e2c03e9f2db30cc1b7;p=pandora-kernel.git hwmon: (ibmpex) Allow format string checking The only difference between the three power_sensor_name_templates is whether there is a suffix of "", "_lowest" or "_highest". We might as well pull those into an array and use a literal format string, allowing gcc to do type checking of the arguments to sprintf. Incidentially, the same three suffixes are used in the temp_sensor_name_templates case, so we end up eliminating one static array. Signed-off-by: Rasmus Villemoes [Guenter Roeck: Fixed line length over 80 characters] Signed-off-by: Guenter Roeck --- Reading git-diff-tree failed