diff options
author | Simon Glass <sjg@chromium.org> | 2017-06-07 10:28:46 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-06-12 08:38:11 -0400 |
commit | baa7d345fb2a7aaee31af6d77f2a790e89864af6 (patch) | |
tree | 931fa406d131d40d493720a8817547091aff0235 /common/board_f.c | |
parent | 73027a853d2d9324ef2b15d5a860da3e3126321d (diff) | |
download | u-boot-baa7d345fb2a7aaee31af6d77f2a790e89864af6.tar.gz u-boot-baa7d345fb2a7aaee31af6d77f2a790e89864af6.tar.bz2 u-boot-baa7d345fb2a7aaee31af6d77f2a790e89864af6.zip |
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)
Diffstat (limited to 'common/board_f.c')
-rw-r--r-- | common/board_f.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/common/board_f.c b/common/board_f.c index 0a1ef1a8a8..f5054985d0 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -706,11 +706,8 @@ static int jump_to_copy(void) /* Record the board_init_f() bootstage (after arch_cpu_init()) */ static int initf_bootstage(void) { -#if defined(CONFIG_SPL_BOOTSTAGE) && defined(CONFIG_BOOTSTAGE_STASH) - bool from_spl = true; -#else - bool from_spl = false; -#endif + bool from_spl = IS_ENABLED(CONFIG_SPL_BOOTSTAGE) && + IS_ENABLED(CONFIG_BOOTSTAGE_STASH); int ret; ret = bootstage_init(!from_spl); |