From: Ian Abbott <abbotti@mev.co.uk>
To: Chase Southwood <chase.southwood@yahoo.com>, gregkh@linuxfoundation.org
Cc: hsweeten@visionengravers.com, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: comedi: kcomedilib: replace deprecated simple_strtoul() with kstrtouint()
Date: Mon, 17 Feb 2014 13:09:38 +0000 [thread overview]
Message-ID: <53020A12.1090607@mev.co.uk> (raw)
In-Reply-To: <1392436780-31184-1-git-send-email-chase.southwood@yahoo.com>
On 2014-02-15 03:59, Chase Southwood wrote:
> Since simple_strtoul() has been deprecated, replace it with kstrtouint().
> Also, since return code checking for this new function is enforced, add a
> check to ensure that the conversion has succeeded.
>
> Signed-off-by: Chase Southwood <chase.southwood@yahoo.com>
> ---
> drivers/staging/comedi/kcomedilib/kcomedilib_main.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c b/drivers/staging/comedi/kcomedilib/kcomedilib_main.c
> index 7dc5a18..8923e65 100644
> --- a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c
> +++ b/drivers/staging/comedi/kcomedilib/kcomedilib_main.c
> @@ -41,7 +41,8 @@ struct comedi_device *comedi_open(const char *filename)
> if (strncmp(filename, "/dev/comedi", 11) != 0)
> return NULL;
>
> - minor = simple_strtoul(filename + 11, NULL, 0);
> + if (kstrtouint(filename + 11, 0, &minor))
> + return NULL;
>
> if (minor >= COMEDI_NUM_BOARD_MINORS)
> return NULL;
>
Looks good!
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
prev parent reply other threads:[~2014-02-17 13:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-15 3:59 Chase Southwood
2014-02-17 13:09 ` Ian Abbott [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53020A12.1090607@mev.co.uk \
--to=abbotti@mev.co.uk \
--cc=chase.southwood@yahoo.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=hsweeten@visionengravers.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®