* [PATCH] hwmon: abx500: fix format string warnings
@ 2015-01-21 8:03 Asaf Vertz
2015-01-21 14:08 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: Asaf Vertz @ 2015-01-21 8:03 UTC (permalink / raw)
To: jdelvare; +Cc: linux, lm-sensors, linux-kernel
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>
---
drivers/hwmon/abx500.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/hwmon/abx500.c b/drivers/hwmon/abx500.c
index 1387596..6cb89c0 100644
--- a/drivers/hwmon/abx500.c
+++ b/drivers/hwmon/abx500.c
@@ -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,
@@ -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,
@@ -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,
--
1.7.0.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] hwmon: abx500: fix format string warnings
2015-01-21 8:03 [PATCH] hwmon: abx500: fix format string warnings Asaf Vertz
@ 2015-01-21 14:08 ` Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2015-01-21 14:08 UTC (permalink / raw)
To: Asaf Vertz, jdelvare; +Cc: lm-sensors, linux-kernel
On 01/21/2015 12:03 AM, Asaf Vertz wrote:
> 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>
> ---
Applied.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-21 14:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-21 8:03 [PATCH] hwmon: abx500: fix format string warnings Asaf Vertz
2015-01-21 14:08 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome