[U-Boot] [U-Boot, 3/8] spl: Move the loading code into its own function
Tom Rini
trini at konsulko.com
Mon Nov 28 21:09:42 CET 2016
On Thu, Nov 17, 2016 at 10:29:30AM -0700, Simon Glass wrote:
> Create a boot_from_devices() function to handle trying each device. This
> helps to reduce the size of the already-large board_init_r() function.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
So with gcc-5.x and later:
+In file included from include/common.h:27:0, + from common/spl/spl.c:9: + #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+ ^
+common/spl/spl.c:384:18: note: in expansion of macro 'ARRAY_SIZE'
+ for (i = 0; i < ARRAY_SIZE(spl_boot_list) &&
+ ^
+common/spl/spl.c:380:13: note: declared here
+ u32 spl_boot_list[])
+ ^
w+common/spl/spl.c: In function 'boot_from_devices':
w+include/linux/kernel.h:45:30: warning: 'sizeof' on array function parameter 'spl_boot_list' will return size of 'u32 * {aka unsigned int *}' [-Wsizeof-array-argument]
Which I think is what Masahiro was pointing out :) So the rest of the
series needs some re-work following that too, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161128/f1a529a8/attachment.sig>
More information about the U-Boot
mailing list