[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110414021635.GA13169@suse.de>
Date: Wed, 13 Apr 2011 19:16:35 -0700
From: Greg KH <gregkh@...e.de>
To: Michal Nazarewicz <mina86@...a86.com>
Cc: Alan Stern <stern@...land.harvard.edu>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCHv2] usb: gadget: storage_common: use kstrto*()
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@...a86.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
--
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