From: Greg KH <gregkh@suse.de>
To: Michal Nazarewicz <mina86@mina86.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCHv2] usb: gadget: storage_common: use kstrto*()
Date: Wed, 13 Apr 2011 19:16:35 -0700 [thread overview]
Message-ID: <20110414021635.GA13169@suse.de> (raw)
In-Reply-To: <8739llk6m0.fsf@erwin.mina86.com>
On Thu, Apr 14, 2011 at 02:40:39AM +0200, Michal Nazarewicz wrote:
> This commit replaces the usage of strict_strtoul() (which
> became deprecated after commit 33ee3b2e) with kstrtouint().
>
> Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
> ---
> drivers/usb/gadget/storage_common.c | 18 +++++++++++-------
> 1 files changed, 11 insertions(+), 7 deletions(-)
>
> > @@ -711,10 +711,11 @@ static ssize_t fsg_store_ro(struct device *dev, struct device_attribute *attr,
> > ssize_t rc = count;
> > struct fsg_lun *curlun = fsg_lun_from_dev(dev);
> > struct rw_semaphore *filesem = dev_get_drvdata(dev);
> > - unsigned long ro;
> > + unsigned ro;
> >
> > - if (strict_strtoul(buf, 2, &ro))
> > - return -EINVAL;
> > + rc = kstrtouint(buf, 2, &ro);
> > + if (rc)
> > + return rc;
> >
>
> Sorry, I've just noticed this zeroes the rc so that the function returns
> invalid read length. Attached patch has the following delta included:
Ugh, I applied the first one already :(
Care to send a follow-on patch that fixes this properly?
thanks,
greg k-h
next prev parent reply other threads:[~2011-04-14 2:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-13 22:37 [PATCH] usb: gadget: storage_common: use kstrto*() Michal Nazarewicz
2011-04-14 0:40 ` [PATCHv2] " Michal Nazarewicz
2011-04-14 2:16 ` Greg KH [this message]
2011-04-14 9:55 ` [PATCH] usb: gadget: storage_common: use kstrto*() [bug fix] Michal Nazarewicz
2011-04-14 10:29 ` [PATCH] usb: gadget: storage_common: use kstrto*() Sergei Shtylyov
2011-04-14 10:32 ` Michal Nazarewicz
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=20110414021635.GA13169@suse.de \
--to=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mina86@mina86.com \
--cc=stern@rowland.harvard.edu \
/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;
as well as URLs for NNTP newsgroup(s).