[U-Boot] [PATCH V2 03/13] spl: mmc: refactor device location code to its own function

Tom Rini trini at konsulko.com
Tue Nov 3 16:56:18 CET 2015


On Wed, Oct 28, 2015 at 11:23:20AM +0200, Nikita Kiryanov wrote:

> Simplify spl_mmc_load_image() code by moving the part that finds the mmc device
> into its own function spl_mmc_find_device(), available in two flavors: DM and
> non-DM.
> 
> This refactor fixes a bug in which an error in the device location sequence
> does not necessarily aborts the rest of the code. With this refactor, we fail
> the moment there is an error.
[snip]
> +#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
> +		puts("spl: could not find mmc device. error: %d\n", err);
> +#endif

Should be printf.  And this reminds me that after we dug into things
before, there's really not a reason to use 'puts' sometimes and 'printf'
another, we can always just do printf and it doesn't actually change the
size.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151103/9145257f/attachment.sig>


More information about the U-Boot mailing list