LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: Andres Salomon <dilinger@queued.net>
Cc: Greg KH <gregkh@suse.de>,
Marek Belisko <marek.belisko@open-nandra.com>,
jon.nettleton@gmail.com, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] olpc_dcon: revert strtoul change
Date: Sun, 6 Feb 2011 23:05:57 +0000 [thread overview]
Message-ID: <20110206230557.GA24626@void.printf.net> (raw)
In-Reply-To: <20110206143816.0355ddc5@queued.net>
Hi,
On Sun, Feb 06, 2011 at 02:38:16PM -0800, Andres Salomon wrote:
> The s/simple_strtoul/strict_strtoul/ from commit e107e6eb added a build
> warning, as well as an oops. This reverts that change.
>
> Signed-off-by: Andres Salomon <dilinger@queued.net>
> ---
> drivers/staging/olpc_dcon/olpc_dcon.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c
> index b19cd34..d6ad5d7 100644
> --- a/drivers/staging/olpc_dcon/olpc_dcon.c
> +++ b/drivers/staging/olpc_dcon/olpc_dcon.c
> @@ -525,7 +525,7 @@ static int _strtoul(const char *buf, int len, unsigned int *val)
> {
>
> char *endp;
> - unsigned int output = strict_strtoul(buf, &endp, 0);
> + unsigned int output = simple_strtoul(buf, &endp, 0);
> int size = endp - buf;
>
> if (*endp && isspace(*endp))
Yes, different prototypes:
unsigned long simple_strtoul(const char *cp, char **endp, unsigned int base)
vs.
int strict_strtoul(const char *cp, unsigned int base, unsigned long *res)
So, you'd need something like:
unsigned int output;
int ret = strict_strtoul(buf, 0, &output);
if (ret < 0)
return ret;
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
prev parent reply other threads:[~2011-02-06 23:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-03 15:22 [PATCH] staging: olpc_dcon: checkpatch.pl fixes for olpc_dcon.c file Marek Belisko
2011-02-04 23:23 ` Andres Salomon
2011-02-04 23:44 ` Greg KH
2011-02-06 22:38 ` [PATCH] olpc_dcon: revert strtoul change Andres Salomon
2011-02-06 23:05 ` Chris Ball [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=20110206230557.GA24626@void.printf.net \
--to=cjb@laptop.org \
--cc=devel@driverdev.osuosl.org \
--cc=dilinger@queued.net \
--cc=gregkh@suse.de \
--cc=jon.nettleton@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marek.belisko@open-nandra.com \
--subject='Re: [PATCH] olpc_dcon: revert strtoul change' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).