[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20141218212502.GP4856@mwanda>
Date: Fri, 19 Dec 2014 00:25:02 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: samuel kihahu <skihahu@...il.com>
Cc: devel@...verdev.osuosl.org, gregkh@...uxfoundation.org,
speakup@...ux-speakup.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: speakup: replace simple_strtoul with kstrtoul
On Thu, Dec 18, 2014 at 05:48:10PM +0300, samuel kihahu wrote:
> On Wed, Dec 17, 2014 at 05:03:22PM +0300, Dan Carpenter wrote:
> > On Wed, Dec 17, 2014 at 04:43:54PM +0300, samuel kihahu wrote:
> > > On Wed, Dec 17, 2014 at 03:11:19PM +0300, Dan Carpenter wrote:
> > > > On Wed, Dec 17, 2014 at 02:56:02PM +0300, samuel kihahu wrote:
> > > > > Replacing obsolete simple_strtoul with kstrtoul.
> > > > >
> > > >
> > > > Nope. That's wrong. Learn how the functions are different beyond just
> > > > the name.
> > > Noted, have made corrections to fit the kstrtoul and handle the return
> > > value.
> >
> > You have to compile test these things. Really kernel programming is not
> > a good way to learn how to program. :(
> >
> > regards,
> > dan carpenter
> >
>
> Appreciate the feedback, have modified the patch, tested and confirmed
> it builds.
No. It's still really wrong. One of the key differences between
kstrtoul() and simple_strtoul() is that simple_strtoul() gives you a
pointer to the end of the string.
It's actually best to use simple_strtoul() here. Checkpatch.pl is
wrong.
As well the new error handling doesn't work at all.
regards,
dan carpenter
--
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