From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Fri, 31 Mar 2017 08:40:28 -0600 Subject: [U-Boot] [PATCH 05/16] board_f: Use a single condition for reserve_logbuffer() In-Reply-To: <20170331144039.14587-1-sjg@chromium.org> References: <20170331144039.14587-1-sjg@chromium.org> Message-ID: <20170331144039.14587-6-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- 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