mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-12-10 12:01:47 +01:00
board_f: Use IS_ENABLED instead of #ifdef in initf_bootstage()
The current implementation makes it look like the 'if (from_spl)' part is dead code because these features are not enabled for sandbox. We could enable it for sandbox_spl, but this is not done yet (it requires sharing memory between SPL and U-Boot proper which is in fact supported). It is probably nicer to avoid #ifdef anyway. Change it. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Coverity (CID: 163244) Fixes: 824bb1b (bootstage: Support SPL)
This commit is contained in:
parent
73027a853d
commit
baa7d345fb
@ -706,11 +706,8 @@ static int jump_to_copy(void)
|
|||||||
/* Record the board_init_f() bootstage (after arch_cpu_init()) */
|
/* Record the board_init_f() bootstage (after arch_cpu_init()) */
|
||||||
static int initf_bootstage(void)
|
static int initf_bootstage(void)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_SPL_BOOTSTAGE) && defined(CONFIG_BOOTSTAGE_STASH)
|
bool from_spl = IS_ENABLED(CONFIG_SPL_BOOTSTAGE) &&
|
||||||
bool from_spl = true;
|
IS_ENABLED(CONFIG_BOOTSTAGE_STASH);
|
||||||
#else
|
|
||||||
bool from_spl = false;
|
|
||||||
#endif
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = bootstage_init(!from_spl);
|
ret = bootstage_init(!from_spl);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user