Skip to contentSkip to conversation

hwmon: (ad7414) fix checkpath issues

PATCH In review Frans Meulenbroeks 3 participants 4 messages Jan 8, 2012 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/17 hwmon: (ad7414) fix checkpath issues

fixed:
WARNING: simple_strtol is obsolete, use kstrtol instead #133: FILE: ad7414.c:133:
+ long temp = simple_strtol(buf, NULL, 10);

---
 drivers/hwmon/ad7414.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
drivers/hwmon/ad7414.c +5 -1
index df29a7f..7c4939a 100644
@@ -130,7 +130,11 @@ static ssize_t set_max_min(struct device *dev,
 	struct ad7414_data *data = i2c_get_clientdata(client);
 	int index = to_sensor_dev_attr(attr)->index;
 	u8 reg = AD7414_REG_LIMIT[index];
-	long temp = simple_strtol(buf, NULL, 10);
+	long temp;
+	int ret = kstrtol(buf, 10, &temp);
+
+	if (ret < 0)
+		return ret;
 
 	temp = SENSORS_LIMIT(temp, -40000, 85000);
 	temp = (temp + (temp < 0 ? -500 : 500)) / 1000;
Signature · 7 lines
1.7.8.2


_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#1 lore raw

Re: [lm-sensors] [PATCH 01/17 v2] hwmon: (ad7414) fix checkpath

Quoted 6 lines · Frans Meulenbroeks

fixed:
WARNING: simple_strtol is obsolete, use kstrtol instead #133: FILE: ad7414.c:133:

(quoted diff) +1 -0
+	long temp = simple_strtol(buf, NULL, 10);

Series looks good.

Jean, do you want to take any of those ? Otherwise I'll apply the entire series for one of the rc candidates, together with Frans' earlier patches.

Thanks,
Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#2 lore raw

Re: [lm-sensors] [PATCH 01/17 v2] hwmon: (ad7414) fix checkpath

In reply to Frans Meulenbroeks
Quoted 6 lines · Guenter Roeck
Quoted 5 lines · Frans Meulenbroeks

fixed:
WARNING: simple_strtol is obsolete, use kstrtol instead #133: FILE: ad7414.c:133:

(quoted diff) +1 -0
+	long temp = simple_strtol(buf, NULL, 10);
Quoted 6 lines
Quoted 1 line

Series looks good.

Jean, do you want to take any of those ? Otherwise I'll apply the entire series for one of the rc candidates, together with Frans' earlier patches.

Please take them all, my hwmon patch queue for kernel 3.3 is almost empty so risks of collisions are limited.

Thanks,

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#3 lore raw

Re: [lm-sensors] [PATCH 01/17 v2] hwmon: (ad7414) fix checkpath

In reply to Frans Meulenbroeks
Quoted 11 lines · Jean Delvare
Quoted 10 lines · Guenter Roeck
Quoted 6 lines · Frans Meulenbroeks

fixed:
WARNING: simple_strtol is obsolete, use kstrtol instead #133: FILE: ad7414.c:133:

(quoted diff) +1 -0
+	long temp = simple_strtol(buf, NULL, 10);

Series looks good.

Quoted 6 lines
Quoted 2 lines

Jean, do you want to take any of those ? Otherwise I'll apply the entire series for one of the rc candidates, together with Frans' earlier patches.

Please take them all, my hwmon patch queue for kernel 3.3 is almost empty so risks of collisions are limited.

Ok.

Thanks,
Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors