hwmon: (ad7414) fix checkpath issues
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
@@ -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
Re: [lm-sensors] [PATCH 01/17 v2] hwmon: (ad7414) fix checkpath
Quoted 6 lines · Frans Meulenbroeks
fixed:
WARNING:simple_strtolis obsolete, use kstrtol instead #133: FILE: ad7414.c:133:(quoted diff) +1
-0+ long temp = simple_strtol(buf, NULL, 10);Signed-off-by Frans Meulenbroeks <[email protected]>
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
Re: [lm-sensors] [PATCH 01/17 v2] hwmon: (ad7414) fix checkpath
In reply to Frans MeulenbroeksQuoted 6 lines · Guenter Roeck
Quoted 5 lines · Frans Meulenbroeks
fixed:
WARNING:simple_strtolis 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
Signed-off-by Frans Meulenbroeks <[email protected]>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
Re: [lm-sensors] [PATCH 01/17 v2] hwmon: (ad7414) fix checkpath
In reply to Frans MeulenbroeksQuoted 11 lines · Jean Delvare
Quoted 10 lines · Guenter Roeck
Quoted 6 lines · Frans Meulenbroeks
fixed:
WARNING:simple_strtolis obsolete, use kstrtol instead #133: FILE: ad7414.c:133:(quoted diff) +1
-0+ long temp = simple_strtol(buf, NULL, 10);Signed-off-by Frans Meulenbroeks <[email protected]>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