From: Chee, Tien Fong <tien.fong.chee@intel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v6 2/2] common: Generic firmware loader for file system
Date: Tue, 23 Jan 2018 04:28:53 +0000 [thread overview]
Message-ID: <1516681733.2740.0.camel@intel.com> (raw)
In-Reply-To: <20180122094436.49ed70a9@karo-electronics.de>
On Mon, 2018-01-22 at 09:44 +0100, Lothar Waßmann wrote:
> Hi,
>
> On Mon, 22 Jan 2018 07:11:37 +0000 Chee, Tien Fong wrote:
> >
> > On Thu, 2018-01-18 at 12:12 +0100, Marek Vasut wrote:
> > >
> > > On 01/18/2018 05:33 AM, Chee, Tien Fong wrote:
> > > >
> > > >
> > > > On Tue, 2018-01-16 at 15:41 +0100, Marek Vasut wrote:
> > > > >
> > > > >
> > > > > On 12/27/2017 06:04 AM, tien.fong.chee at intel.com wrote:
> > > > >
> > > > > Whoa, this improved substantially since last time I checked.
> > > > > Minor
> > > > > nitpicks below.
> > > > >
> > > > > [...]
> > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > +/* USB build is not supported yet in SPL */
> > > > > > +#ifndef CONFIG_SPL_BUILD
> > > > > > +#ifdef CONFIG_USB_STORAGE
> > > > > > +static int init_usb(void)
> > > > > > +{
> > > > > > + int err;
> > > > > > +
> > > > > > + err = usb_init();
> > > > > > + if (err)
> > > > > > + return err;
> > > > > > +
> > > > > > +#ifndef CONFIG_DM_USB
> > > > > > + err = usb_stor_scan(1) < 0 ? -ENODEV : 0;
> > > > > if (err)
> > > > > return err;
> > > > > ?
> > > > >
> > > > This is last line code of the function, so it's always return
> > > > the
> > > > result regardless error or not.
> > > You are rewriting the true error code with -ENODEV instead of
> > > propagating it.
> > >
> > Ohh....are you saying to change the codes as shown in below:
> >
> > err = usb_stor_scan(1);
> > if (err)
> > return err;
> >
> usb_stor_scan() does not return a sensible error code, but '-1' if no
> device was found. This should be changed to -ENODEV then!
>
Okay, so this should be fixed in usb_stor_scan() function.
>
> Lothar Waßmann
next prev parent reply other threads:[~2018-01-23 4:28 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-27 5:04 [U-Boot] [PATCH v6 0/2] Generic firmware loader tien.fong.chee at intel.com
2017-12-27 5:04 ` [U-Boot] [PATCH v6 1/2] spl: Remove static declaration on spl_mmc_find_device function tien.fong.chee at intel.com
2018-01-15 16:35 ` [U-Boot] [U-Boot, v6, " Tom Rini
2017-12-27 5:04 ` [U-Boot] [PATCH v6 2/2] common: Generic firmware loader for file system tien.fong.chee at intel.com
2018-01-15 16:36 ` [U-Boot] [U-Boot, v6, " Tom Rini
2018-01-16 7:58 ` Chee, Tien Fong
2018-01-16 14:35 ` Tom Rini
2018-01-18 3:42 ` Chee, Tien Fong
2018-01-18 13:18 ` Tom Rini
2018-01-22 6:37 ` Chee, Tien Fong
2018-01-16 14:41 ` [U-Boot] [PATCH v6 " Marek Vasut
2018-01-18 4:33 ` Chee, Tien Fong
2018-01-18 11:12 ` Marek Vasut
2018-01-22 7:11 ` Chee, Tien Fong
2018-01-22 8:44 ` Lothar Waßmann
2018-01-23 4:28 ` Chee, Tien Fong [this message]
2018-01-22 12:41 ` Marek Vasut
2018-01-18 5:57 ` Simon Goldschmidt
2018-01-22 8:08 ` Chee, Tien Fong
2018-01-22 11:41 ` Simon Goldschmidt
2018-01-23 6:28 ` Chee, Tien Fong
2018-01-23 7:52 ` Simon Goldschmidt
2018-01-23 7:58 ` Simon Goldschmidt
2018-01-23 8:31 ` Chee, Tien Fong
2018-01-23 9:13 ` Simon Goldschmidt
2018-01-24 5:13 ` Chee, Tien Fong
2018-01-24 5:34 ` Simon Goldschmidt
2018-01-03 8:46 ` [U-Boot] [PATCH v6 0/2] Generic firmware loader Chee, Tien Fong
2018-01-08 8:07 ` Lothar Waßmann
2018-01-09 5:26 ` Chee, Tien Fong
2018-01-15 6:57 ` Chee, Tien Fong
2018-01-15 6:50 ` Chee, Tien Fong
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=1516681733.2740.0.camel@intel.com \
--to=tien.fong.chee@intel.com \
--cc=u-boot@lists.denx.de \
/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