spl: Correct call to spl_common_init() with SPL_STACK_R_MALLOC_SIMPLE_LEN
PATCH 1/1 spl: Correct call to spl_common_init() with SPL_STACK_R_MALLOC_SIMPLE_LEN
Calls to IS_ENABLED() on a non-y/n option will always be false, even when set. We can correct this by adding a new bool value that is set based on the conditions required for SPL_STACK_R_MALLOC_SIMPLE_LEN to be set instead.
--- common/spl/spl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
common/spl/spl.c +3 -2
@@ -227,10 +227,11 @@ int spl_early_init(void)int spl_init (void ) {int ret; +bool setup_malloc = !(IS_ENABLED (CONFIG_SPL_STACK_R ) && +IS_ENABLED (SPL_SYS_MALLOC_SIMPLE ));if (!(gd->flags &GD_FLG_SPL_EARLY_INIT )) { - ret =spl_common_init ( - !IS_ENABLED (CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN )); + ret =spl_common_init (setup_malloc);if (ret)return ret; }
Signature · 1 line
1.9.1
PATCH 1/1 spl: Correct call to spl_common_init() with SPL_STACK_R_MALLOC_SIMPLE_LEN
Quoted 17 lines · Tom Rini
Calls to
IS_ENABLED()on a non-y/n option will always be false, even when set. We can correct this by adding a new bool value that is set based on the conditions required forSPL_STACK_R_MALLOC_SIMPLE_LENto be set instead.Fixes 340f418acd11 ("spl: Add spl_early_init()")Reported-by Lokesh Vutla <[email protected]>Signed-off-by Tom Rini <[email protected]>--- common/spl/spl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)common/spl/spl.c +0
-0
common/spl/spl.c int spl_early_init(void) · line 231
Quoted 5 lines
common/spl/spl.c +2
-0@@ -227,10 +227,11 @@ int spl_early_init(void)int spl_init (void ) {int ret; +bool setup_malloc = !(IS_ENABLED (CONFIG_SPL_STACK_R ) && +IS_ENABLED (SPL_SYS_MALLOC_SIMPLE ));
This should be CONFIG_SPL_SYS_MALLOC_SIMPLE. With this change it works fine.
Thanks and regards,
Lokesh
PATCH v2 1/1 spl: Correct call to spl_common_init() with SPL_STACK_R_MALLOC_SIMPLE_LEN
In reply to Tom RiniCalls to IS_ENABLED() on a non-y/n option will always be false, even when set. We can correct this by adding a new bool value that is set based on the conditions required for SPL_STACK_R_MALLOC_SIMPLE_LEN to be set instead.
---
Changes in v2:
- Fix thinko pointed out by Lokesh
--- common/spl/spl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
common/spl/spl.c +3 -2
@@ -227,10 +227,11 @@ int spl_early_init(void)int spl_init (void ) {int ret; +bool setup_malloc = !(IS_ENABLED (CONFIG_SPL_STACK_R ) && +IS_ENABLED (CONFIG_SPL_SYS_MALLOC_SIMPLE ));if (!(gd->flags &GD_FLG_SPL_EARLY_INIT )) { - ret =spl_common_init ( - !IS_ENABLED (CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN )); + ret =spl_common_init (setup_malloc);if (ret)return ret; }
Signature · 1 line
1.9.1
PATCH v2 1/1 spl: Correct call to spl_common_init() with SPL_STACK_R_MALLOC_SIMPLE_LEN
Quoted 8 lines · Tom Rini
Calls to
IS_ENABLED()on a non-y/n option will always be false, even when set. We can correct this by adding a new bool value that is set based on the conditions required forSPL_STACK_R_MALLOC_SIMPLE_LENto be set instead.Fixes 340f418acd11 ("spl: Add spl_early_init()")Reported-by Lokesh Vutla <[email protected]>Signed-off-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
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/20170321/2056e9ff/attachment.sig>