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>
This commit is contained in:
parent
90fd0727c7
commit
b1343daac3
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue