[coreboot-gerrit] Change in coreboot[master]: mb/sifive/hifive-unleashed: Use if (IS_ENABLED(...))

Jonathan Neuschäfer (Code Review) gerrit at coreboot.org
Mon Oct 29 15:39:40 CET 2018


Jonathan Neuschäfer has uploaded this change for review. ( https://review.coreboot.org/29336


Change subject: mb/sifive/hifive-unleashed: Use if (IS_ENABLED(...))
......................................................................

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 at gmx.net>
---
M src/mainboard/sifive/hifive-unleashed/romstage.c
1 file changed, 1 insertion(+), 2 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/36/29336/1

diff --git a/src/mainboard/sifive/hifive-unleashed/romstage.c b/src/mainboard/sifive/hifive-unleashed/romstage.c
index 3767491..8277141 100644
--- a/src/mainboard/sifive/hifive-unleashed/romstage.c
+++ b/src/mainboard/sifive/hifive-unleashed/romstage.c
@@ -36,9 +36,8 @@
 	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();
 

-- 
To view, visit https://review.coreboot.org/29336
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I45a763f2d854fbe9082795bc74de7a9d0fded3c9
Gerrit-Change-Number: 29336
Gerrit-PatchSet: 1
Gerrit-Owner: Jonathan Neuschäfer <j.neuschaefer at gmx.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181029/721d2344/attachment-0001.html>


More information about the coreboot-gerrit mailing list