[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75VdKBT+yPQ0412wiY7ZCqL27cwJCpKM9_yVw48mtGWWw0w@mail.gmail.com>
Date: Sun, 2 Jun 2013 15:08:05 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Jingoo Han <jg1.han@...sung.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Arnd Bergmann <arnd@...db.de>,
Michael Hennerich <michael.hennerich@...log.com>,
Eric Piel <eric.piel@...mplin-utc.net>,
Dimitri Sivanich <sivanich@....com>, Robin Holt <holt@....com>
Subject: Re: [PATCH] misc: replace strict_strtoul() with kstrtoul()
On Sat, Jun 1, 2013 at 10:37 AM, Jingoo Han <jg1.han@...sung.com> wrote:
> The usage of strict_strtoul() is not preferred, because
> strict_strtoul() is obsolete. Thus, kstrtoul() should be
> used.
> --- a/drivers/misc/apds9802als.c
> +++ b/drivers/misc/apds9802als.c
> @@ -126,7 +126,7 @@ static ssize_t als_sensing_range_store(struct device *dev,
> int ret_val;
> unsigned long val;
>
> - if (strict_strtoul(buf, 10, &val))
> + if (kstrtoul(buf, 10, &val))
> return -EINVAL;
ret_val = kstrtoul();
if (ret_val)
return ret_val;
> --- a/drivers/misc/apds990x.c
> +++ b/drivers/misc/apds990x.c
> @@ -697,7 +697,7 @@ static ssize_t apds990x_lux_calib_store(struct device *dev,
> struct apds990x_chip *chip = dev_get_drvdata(dev);
> unsigned long value;
>
> - if (strict_strtoul(buf, 0, &value))
> + if (kstrtoul(buf, 0, &value))
> return -EINVAL;
Ditto. Here and across entire patch.
> @@ -895,7 +895,7 @@ static ssize_t apds990x_set_lux_thresh(struct apds990x_chip *chip, u32 *target,
> int ret = 0;
Remove this assignment...
> unsigned long thresh;
>
> - if (strict_strtoul(buf, 0, &thresh))
> + if (kstrtoul(buf, 0, &thresh))
> return -EINVAL;
...and use return code from kstrtoul().
> --- a/drivers/misc/carma/carma-fpga.c
> +++ b/drivers/misc/carma/carma-fpga.c
> @@ -1002,7 +1002,7 @@ static ssize_t data_en_set(struct device *dev, struct device_attribute *attr,
> unsigned long enable;
> int ret;
>
> - ret = strict_strtoul(buf, 0, &enable);
> + ret = kstrtoul(buf, 0, &enable);
> if (ret) {
> dev_err(priv->dev, "unable to parse enable input\n");
> return -EINVAL;
return ret;
--
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists