Skip to content

Commit

Permalink
hwmon: (abx500) Fix format string warnings
Browse files Browse the repository at this point in the history
Fixed the following warnings (reported by cppcheck):
[drivers/hwmon/abx500.c:224]: (warning) %ld in format string (no. 1)
requires 'long' but the argument type is 'unsigned long'.
[drivers/hwmon/abx500.c:233]: (warning) %ld in format string (no. 1)
requires 'long' but the argument type is 'unsigned long'.
[drivers/hwmon/abx500.c:242]: (warning) %ld in format string (no. 1)
requires 'long' but the argument type is 'unsigned long'.

Signed-off-by: Asaf Vertz <asaf.vertz@tandemg.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Asaf Vertz authored and Guenter Roeck committed Jan 26, 2015
1 parent e2c26f0 commit a14c707
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/hwmon/abx500.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ static ssize_t show_min(struct device *dev,
struct abx500_temp *data = dev_get_drvdata(dev);
struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);

return sprintf(buf, "%ld\n", data->min[attr->index]);
return sprintf(buf, "%lu\n", data->min[attr->index]);
}

static ssize_t show_max(struct device *dev,
Expand All @@ -230,7 +230,7 @@ static ssize_t show_max(struct device *dev,
struct abx500_temp *data = dev_get_drvdata(dev);
struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);

return sprintf(buf, "%ld\n", data->max[attr->index]);
return sprintf(buf, "%lu\n", data->max[attr->index]);
}

static ssize_t show_max_hyst(struct device *dev,
Expand All @@ -239,7 +239,7 @@ static ssize_t show_max_hyst(struct device *dev,
struct abx500_temp *data = dev_get_drvdata(dev);
struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);

return sprintf(buf, "%ld\n", data->max_hyst[attr->index]);
return sprintf(buf, "%lu\n", data->max_hyst[attr->index]);
}

static ssize_t show_min_alarm(struct device *dev,
Expand Down

0 comments on commit a14c707

Please sign in to comment.