From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Mon, 28 Nov 2016 15:09:42 -0500 Subject: [U-Boot] [U-Boot, 3/8] spl: Move the loading code into its own function In-Reply-To: <1479403775-6062-4-git-send-email-sjg@chromium.org> References: <1479403775-6062-4-git-send-email-sjg@chromium.org> Message-ID: <20161128200942.GP2546@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 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: