diff mbox

[U-Boot,1/7] spl: use panic_str instead of panic

Message ID 1449268061-805-2-git-send-email-sjoerd.simons@collabora.co.uk
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Sjoerd Simons Dec. 4, 2015, 10:27 p.m. UTC
For a simple static string, use panic_str() which prevents calling
printf needlessly.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
---

 common/spl/spl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Glass Dec. 6, 2015, 4:45 p.m. UTC | #1
On 4 December 2015 at 15:27, Sjoerd Simons
<sjoerd.simons@collabora.co.uk> wrote:
> For a simple static string, use panic_str() which prevents calling
> printf needlessly.
>
> Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
> ---
>
>  common/spl/spl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Simon Glass Dec. 8, 2015, 12:39 a.m. UTC | #2
On 6 December 2015 at 09:45, Simon Glass <sjg@chromium.org> wrote:
>
> On 4 December 2015 at 15:27, Sjoerd Simons
> <sjoerd.simons@collabora.co.uk> wrote:
> > For a simple static string, use panic_str() which prevents calling
> > printf needlessly.
> >
> > Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
> > ---
> >
> >  common/spl/spl.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Acked-by: Simon Glass <sjg@chromium.org>
Tested on firefly:
Tested-by: Simon Glass <sjg@chromium.org>
Simon Glass Dec. 14, 2015, 3:44 a.m. UTC | #3
Applied to u-boot-rockchip, thanks!
diff mbox

Patch

diff --git a/common/spl/spl.c b/common/spl/spl.c
index 7a393dc..6e6dee7 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -452,7 +452,7 @@  ulong spl_relocate_stack_gd(void)
 #ifdef CONFIG_SPL_SYS_MALLOC_SIMPLE
 	if (CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN) {
 		if (!(gd->flags & GD_FLG_SPL_INIT))
-			panic("spl_init must be called before heap reloc");
+			panic_str("spl_init must be called before heap reloc");
 
 		ptr -= CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN;
 		gd->malloc_base = ptr;