diff options
author | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | 2018-10-29 15:30:53 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2018-12-03 13:19:38 +0000 |
commit | b1343daac359d9ee761f4a93a1b527f72015f46d (patch) | |
tree | 343392e6faef9e28bf1ec0a90a1937d7e8e53a12 /src/mainboard | |
parent | 90fd0727c7c3be143caef7fb397c093a3151ba3b (diff) | |
download | coreboot-b1343daac359d9ee761f4a93a1b527f72015f46d.tar.xz |
mb/sifive/hifive-unleashed: Use if (IS_ENABLED(...))
"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 <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/c/29336
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Hug <philipp@hug.cx>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/sifive/hifive-unleashed/romstage.c | 3 |
1 files changed, 1 insertions, 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(); |