From: Marcin Ciupak <marcin.s.ciupak@gmail.com>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: William Hubbs <w.d.hubbs@gmail.com>,
Chris Brannon <chris@the-brannons.com>,
Kirk Reiser <kirk@reisers.ca>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
speakup@linux-speakup.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: speakup: replace simple_strtoul with kstrtou8
Date: Fri, 3 Mar 2017 09:38:33 +0100 [thread overview]
Message-ID: <20170303083833.GA12461@gentoo> (raw)
In-Reply-To: <20170302151712.o7tza5lt3uuoe7av@var.youpi.perso.aquilenet.fr>
On Thu, Mar 02, 2017 at 04:17:12PM +0100, Samuel Thibault wrote:
> Marcin Ciupak, on jeu. 02 mars 2017 15:28:23 +0100, wrote:
> > - int val;
> > + int ret;
> >
> > - val = simple_strtoul(skip_spaces(start), &start, 10);
> > + ret = kstrtou8(skip_spaces(start), 10, dest);
>
> This is not the same, you need to have start properly move, since it's
> used below:
>
> > if (*start == ',')
> > start++;
> > - *dest = (u_char)val;
> > return start;
>
> Samuel
You are right, start is not updated by kstrtou8 like it is by
simple_strtoul.
If I understand it correctly simple_strtoul cannot be replaced by
kstrtou8 here.
Please discard this patch.
Marcin
prev parent reply other threads:[~2017-03-03 8:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-02 14:28 [PATCH] staging: speakup: replace simple_strtoul with kstrtou8 Marcin Ciupak
2017-03-02 15:17 ` Samuel Thibault
2017-03-03 8:38 ` Marcin Ciupak [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=20170303083833.GA12461@gentoo \
--to=marcin.s.ciupak@gmail.com \
--cc=chris@the-brannons.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=kirk@reisers.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=samuel.thibault@ens-lyon.org \
--cc=speakup@linux-speakup.org \
--cc=w.d.hubbs@gmail.com \
/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