]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board_f: Use a single condition for reserve_logbuffer()
authorSimon Glass <sjg@chromium.org>
Fri, 31 Mar 2017 14:40:28 +0000 (08:40 -0600)
committerTom Rini <trini@konsulko.com>
Wed, 5 Apr 2017 20:36:48 +0000 (16:36 -0400)
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@chromium.org>
common/board_f.c

index 1400cc818c00e891e3be4e91c619f9198f23920b..d76aab763346a4eabae410b64f454c8276114fa4 100644 (file)
@@ -337,13 +337,16 @@ static int setup_dest_addr(void)
        return 0;
 }
 
-#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
@@ -887,7 +890,7 @@ static const init_fnc_t init_sequence_f[] = {
         *  - board info struct
         */
        setup_dest_addr,
-#if defined(CONFIG_LOGBUFFER) && !defined(CONFIG_ALT_LB_ADDR)
+#if defined(CONFIG_LOGBUFFER)
        reserve_logbuffer,
 #endif
 #ifdef CONFIG_PRAM