[PATCH 1/1] spl: boot always fail on CONFIG_SHOW_ERRORS=y
Tom Rini
trini at konsulko.com
Fri Jul 21 19:29:08 CEST 2023
On Fri, Jul 21, 2023 at 05:32:20PM +0200, Heinrich Schuchardt wrote:
> Commit 7d84fbb57312 ("spl: Provide more information on boot failure") left
> debug code to let boot_from_devices() always fail if CONFIG_SHOW_ERRORS=y.
>
> Remove the debug code.
>
> Fixes: 7d84fbb57312 ("spl: Provide more information on boot failure")
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
> common/spl/spl.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/common/spl/spl.c b/common/spl/spl.c
> index d74acec10b..6305b96b69 100644
> --- a/common/spl/spl.c
> +++ b/common/spl/spl.c
> @@ -692,8 +692,6 @@ static int boot_from_devices(struct spl_image_info *spl_image,
> struct spl_image_loader *loader;
> int bootdev = spl_boot_list[i];
>
> - if (CONFIG_IS_ENABLED(SHOW_ERRORS))
> - ret = -ENXIO;
> for (loader = drv; loader != drv + n_ents; loader++) {
> if (bootdev != loader->boot_device)
> continue;
That's not debug code, per the comment above it:
* Return: 0 if OK, -ENODEV if there were no boot devices
* if CONFIG_SHOW_ERRORS is enabled, returns -ENXIO if there were
* devices but none worked
It's what it's supposed to do. Is there some case you're hitting where
we aren't returning out of the function as you expected?
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230721/ef7d740a/attachment-0001.sig>
More information about the U-Boot
mailing list