Skip to content
Commit a0fc74d4 authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Guenter Roeck
Browse files

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: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
[Guenter Roeck: Fixed line length over 80 characters]
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 1055b5f9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment