From b1343daac359d9ee761f4a93a1b527f72015f46d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= Date: Mon, 29 Oct 2018 15:30:53 +0100 Subject: [PATCH] mb/sifive/hifive-unleashed: Use if (IS_ENABLED(...)) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "if" is preferable over "#if", because it lets the compiler perform syntax and type checks even if CONFIG_CONSOLE_SERIAL is disabled. Change-Id: I45a763f2d854fbe9082795bc74de7a9d0fded3c9 Signed-off-by: Jonathan Neuschäfer Reviewed-on: https://review.coreboot.org/c/29336 Tested-by: build bot (Jenkins) Reviewed-by: Philipp Hug Reviewed-by: Patrick Rudolph Reviewed-by: Angel Pons --- src/mainboard/sifive/hifive-unleashed/romstage.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mainboard/sifive/hifive-unleashed/romstage.c b/src/mainboard/sifive/hifive-unleashed/romstage.c index 3767491a5e..8277141cab 100644 --- a/src/mainboard/sifive/hifive-unleashed/romstage.c +++ b/src/mainboard/sifive/hifive-unleashed/romstage.c @@ -36,9 +36,8 @@ void main(void) clock_init(); // re-initialize UART - #if (IS_ENABLED(CONFIG_CONSOLE_SERIAL)) + if (IS_ENABLED(CONFIG_CONSOLE_SERIAL)) uart_init(CONFIG_UART_FOR_CONSOLE); - #endif sdram_init();