[U-Boot] [PATCH 05/16] board_f: Use a single condition for reserve_logbuffer()
Simon Glass
sjg at chromium.org
Fri Mar 31 14:40:28 UTC 2017
CONFIG_ALT_LB_ADDR is really a detail of how this logbuffer is allocated
rather than whether to do it at all. So move the #ifdef into the function.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
common/board_f.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/common/board_f.c b/common/board_f.c
index 0b0b01543e..c7b5e0af9e 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -345,13 +345,16 @@ static int reserve_prom(void)
}
#endif
-#if defined(CONFIG_LOGBUFFER) && !defined(CONFIG_ALT_LB_ADDR)
+#if defined(CONFIG_LOGBUFFER)
static int reserve_logbuffer(void)
{
+#ifndef CONFIG_ALT_LB_ADDR
/* reserve kernel log buffer */
gd->relocaddr -= LOGBUFF_RESERVE;
debug("Reserving %dk for kernel logbuffer at %08lx\n", LOGBUFF_LEN,
gd->relocaddr);
+#endif
+
return 0;
}
#endif
@@ -894,7 +897,7 @@ static const init_fnc_t init_sequence_f[] = {
#if defined(CONFIG_SPARC)
reserve_prom,
#endif
-#if defined(CONFIG_LOGBUFFER) && !defined(CONFIG_ALT_LB_ADDR)
+#if defined(CONFIG_LOGBUFFER)
reserve_logbuffer,
#endif
#ifdef CONFIG_PRAM
--
2.12.2.564.g063fe858b8-goog
More information about the U-Boot
mailing list