* [RFC][PATCH 1/2] hwmon: (w83627ehf) Replace deprecated strict_strto*
@ 2012-01-14 1:39 Alex Rio
2012-01-14 17:25 ` Guenter Roeck
0 siblings, 1 reply; 4+ messages in thread
From: Alex Rio @ 2012-01-14 1:39 UTC (permalink / raw)
To: khali, guenter.roeck; +Cc: linux-kernel
Replaces deprecated function strict_strto* to kstrto*. In the future
the strict_strto could disappear so the replacement was done.
I'm not sure if this is being done for all the files in a single
patch, anyway I'm including it here just in case.
Checkpatch.pl now leaves 5 "errors", they are mostly
assignments inside if's statements, taking them out does not
significantly increases readability.
Signed-off-by: Alex Rio <scasbyte@gmail.com>
---
drivers/hwmon/w83627ehf.c | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
index 93f5fc7..0e0af04 100644
--- a/drivers/hwmon/w83627ehf.c
+++ b/drivers/hwmon/w83627ehf.c
@@ -937,7 +937,7 @@ store_in_##reg(struct device *dev, struct
device_attribute *attr, \
int nr = sensor_attr->index; \
unsigned long val; \
int err; \
- err = strict_strtoul(buf, 10, &val); \
+ err = kstrtoul(buf, 10, &val); \
if (err < 0) \
return err; \
mutex_lock(&data->update_lock); \
@@ -1054,7 +1054,7 @@ store_fan_min(struct device *dev, struct
device_attribute *attr,
unsigned int reg;
u8 new_div;
- err = strict_strtoul(buf, 10, &val);
+ err = kstrtoul(buf, 10, &val);
if (err < 0)
return err;
@@ -1199,7 +1199,7 @@ store_##reg(struct device *dev, struct
device_attribute *attr, \
int nr = sensor_attr->index; \
int err; \
long val; \
- err = strict_strtol(buf, 10, &val); \
+ err = kstrtol(buf, 10, &val); \
if (err < 0) \
return err; \
mutex_lock(&data->update_lock); \
@@ -1324,7 +1324,7 @@ store_pwm_mode(struct device *dev, struct
device_attribute *attr,
int err;
u16 reg;
- err = strict_strtoul(buf, 10, &val);
+ err = kstrtoul(buf, 10, &val);
if (err < 0)
return err;
@@ -1351,7 +1351,7 @@ store_pwm(struct device *dev, struct
device_attribute *attr,
unsigned long val;
int err;
- err = strict_strtoul(buf, 10, &val);
+ err = kstrtoul(buf, 10, &val);
if (err < 0)
return err;
@@ -1376,7 +1376,7 @@ store_pwm_enable(struct device *dev, struct
device_attribute *attr,
int err;
u16 reg;
- err = strict_strtoul(buf, 10, &val);
+ err = kstrtoul(buf, 10, &val);
if (err < 0)
return err;
@@ -1430,7 +1430,7 @@ store_target_temp(struct device *dev, struct
device_attribute *attr,
long val;
int err;
- err = strict_strtol(buf, 10, &val);
+ err = kstrtol(buf, 10, &val);
if (err < 0)
return err;
@@ -1455,7 +1455,7 @@ store_tolerance(struct device *dev, struct
device_attribute *attr,
long val;
int err;
- err = strict_strtol(buf, 10, &val);
+ err = kstrtol(buf, 10, &val);
if (err < 0)
return err;
@@ -1556,7 +1556,7 @@ store_##reg(struct device *dev, struct
device_attribute *attr, \
int nr = sensor_attr->index; \
unsigned long val; \
int err; \
- err = strict_strtoul(buf, 10, &val); \
+ err = kstrtoul(buf, 10, &val); \
if (err < 0) \
return err; \
val = SENSORS_LIMIT(val, 1, 255); \
@@ -1595,7 +1595,7 @@ store_##reg(struct device *dev, struct
device_attribute *attr, \
int nr = sensor_attr->index; \
unsigned long val; \
int err; \
- err = strict_strtoul(buf, 10, &val); \
+ err = kstrtoul(buf, 10, &val); \
if (err < 0) \
return err; \
val = step_time_to_reg(val, data->pwm_mode[nr]); \
@@ -1702,7 +1702,7 @@ clear_caseopen(struct device *dev, struct
device_attribute *attr,
unsigned long val;
u16 reg, mask;
- if (strict_strtoul(buf, 10, &val) || val != 0)
+ if (kstrtoul(buf, 10, &val) || val != 0)
return -EINVAL;
mask = to_sensor_dev_attr_2(attr)->nr;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [RFC][PATCH 1/2] hwmon: (w83627ehf) Replace deprecated strict_strto*
2012-01-14 1:39 [RFC][PATCH 1/2] hwmon: (w83627ehf) Replace deprecated strict_strto* Alex Rio
@ 2012-01-14 17:25 ` Guenter Roeck
2012-01-14 17:44 ` Jean Delvare
0 siblings, 1 reply; 4+ messages in thread
From: Guenter Roeck @ 2012-01-14 17:25 UTC (permalink / raw)
To: Alex Rio; +Cc: khali@linux-fr.org, linux-kernel@vger.kernel.org
On Fri, Jan 13, 2012 at 08:39:41PM -0500, Alex Rio wrote:
> Replaces deprecated function strict_strto* to kstrto*. In the future
> the strict_strto could disappear so the replacement was done.
> I'm not sure if this is being done for all the files in a single
> patch, anyway I'm including it here just in case.
> Checkpatch.pl now leaves 5 "errors", they are mostly
> assignments inside if's statements, taking them out does not
> significantly increases readability.
>
> Signed-off-by: Alex Rio <scasbyte@gmail.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean, do you want to take this one ? Otherwise, I'll add it to my pending list
for the next -rc.
Guenter
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC][PATCH 1/2] hwmon: (w83627ehf) Replace deprecated strict_strto*
2012-01-14 17:25 ` Guenter Roeck
@ 2012-01-14 17:44 ` Jean Delvare
2012-01-14 17:46 ` Guenter Roeck
0 siblings, 1 reply; 4+ messages in thread
From: Jean Delvare @ 2012-01-14 17:44 UTC (permalink / raw)
To: Guenter Roeck; +Cc: Alex Rio, linux-kernel
On Sat, 14 Jan 2012 09:25:38 -0800, Guenter Roeck wrote:
> On Fri, Jan 13, 2012 at 08:39:41PM -0500, Alex Rio wrote:
> > Replaces deprecated function strict_strto* to kstrto*. In the future
> > the strict_strto could disappear so the replacement was done.
> > I'm not sure if this is being done for all the files in a single
> > patch, anyway I'm including it here just in case.
> > Checkpatch.pl now leaves 5 "errors", they are mostly
> > assignments inside if's statements, taking them out does not
> > significantly increases readability.
> >
> > Signed-off-by: Alex Rio <scasbyte@gmail.com>
>
> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
>
> Jean, do you want to take this one ? Otherwise, I'll add it to my pending list
> for the next -rc.
Err, I'm confused... Aren't these changes already upstream?
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blobdiff;f=drivers/hwmon/w83627ehf.c;h=0e0af0445222c4346af8fef879831831e49caffa;hp=93f5fc7d60596c3ab27c23c5794fccd4a53a40a5;hb=179c4fdb565dd2157e5dfe89318b74868e3b523d;hpb=24edc0a71badc13a9574b060e6a22e78339ac7a4
--
Jean Delvare
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC][PATCH 1/2] hwmon: (w83627ehf) Replace deprecated strict_strto*
2012-01-14 17:44 ` Jean Delvare
@ 2012-01-14 17:46 ` Guenter Roeck
0 siblings, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2012-01-14 17:46 UTC (permalink / raw)
To: Jean Delvare; +Cc: Alex Rio, linux-kernel@vger.kernel.org
On Sat, Jan 14, 2012 at 12:44:45PM -0500, Jean Delvare wrote:
> On Sat, 14 Jan 2012 09:25:38 -0800, Guenter Roeck wrote:
> > On Fri, Jan 13, 2012 at 08:39:41PM -0500, Alex Rio wrote:
> > > Replaces deprecated function strict_strto* to kstrto*. In the future
> > > the strict_strto could disappear so the replacement was done.
> > > I'm not sure if this is being done for all the files in a single
> > > patch, anyway I'm including it here just in case.
> > > Checkpatch.pl now leaves 5 "errors", they are mostly
> > > assignments inside if's statements, taking them out does not
> > > significantly increases readability.
> > >
> > > Signed-off-by: Alex Rio <scasbyte@gmail.com>
> >
> > Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
> >
> > Jean, do you want to take this one ? Otherwise, I'll add it to my pending list
> > for the next -rc.
>
> Err, I'm confused... Aren't these changes already upstream?
>
Yes, you are right. Sorry for the noise.
Guenter
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-01-14 17:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-14 1:39 [RFC][PATCH 1/2] hwmon: (w83627ehf) Replace deprecated strict_strto* Alex Rio
2012-01-14 17:25 ` Guenter Roeck
2012-01-14 17:44 ` Jean Delvare
2012-01-14 17:46 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox