[coreboot-gerrit] Change in coreboot[master]: amd/padmelon: Fix if IS_ENABLED()

John E. Kabat (Code Review) gerrit at coreboot.org
Wed Aug 16 16:27:21 CEST 2017


Hello Marshall Dawson,

I'd like you to do a code review. Please visit

    https://review.coreboot.org/21040

to review the following change.


Change subject: amd/padmelon: Fix if IS_ENABLED()
......................................................................

amd/padmelon: Fix if IS_ENABLED()

Convert the #if usage to if().  Complete remove the #if IS_ENABLED
that controls including imc.h.

Change-Id: Ia9f18b40a931c00a0c4d873f40c2ddd853611d63
Signed-off-by: Marshall Dawson <marshalldawson3rd at gmail.com>
---
M src/mainboard/amd/padmelon/BiosCallOuts.c
1 file changed, 6 insertions(+), 10 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/40/21040/1

diff --git a/src/mainboard/amd/padmelon/BiosCallOuts.c b/src/mainboard/amd/padmelon/BiosCallOuts.c
index ac18f94..5c11742 100644
--- a/src/mainboard/amd/padmelon/BiosCallOuts.c
+++ b/src/mainboard/amd/padmelon/BiosCallOuts.c
@@ -23,9 +23,7 @@
 #include "heapManager.h"
 #include "FchPlatform.h"
 #include "cbfs.h"
-#if IS_ENABLED(CONFIG_HUDSON_IMC_FWM)
 #include "imc.h"
-#endif
 #include "hudson.h"
 #include <stdlib.h>
 #include "BiosCallOuts.h"
@@ -77,16 +75,14 @@
 	} else if (StdHeader->Func == AMD_INIT_ENV) {
 		FCH_DATA_BLOCK *FchParams_env = (FCH_DATA_BLOCK *)FchData;
 		printk(BIOS_DEBUG, "Fch OEM config in INIT ENV ");
-#if IS_ENABLED(CONFIG_HUDSON_IMC_FWM)
-		oem_fan_control(FchParams_env);
-#endif
+		if (IS_ENABLED(CONFIG_HUDSON_IMC_FWM))
+			oem_fan_control(FchParams_env);
 
 		/* XHCI configuration */
-#if IS_ENABLED(CONFIG_HUDSON_XHCI_ENABLE)
-		FchParams_env->Usb.Xhci0Enable = TRUE;
-#else
-		FchParams_env->Usb.Xhci0Enable = FALSE;
-#endif
+		if (IS_ENABLED(CONFIG_HUDSON_XHCI_ENABLE))
+			FchParams_env->Usb.Xhci0Enable = TRUE;
+		else
+			FchParams_env->Usb.Xhci0Enable = FALSE;
 		FchParams_env->Usb.Xhci1Enable = FALSE;
 		FchParams_env->Usb.USB30PortInit = 8; /* 8: If USB3 port is unremoveable. */
 

-- 
To view, visit https://review.coreboot.org/21040
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia9f18b40a931c00a0c4d873f40c2ddd853611d63
Gerrit-Change-Number: 21040
Gerrit-PatchSet: 1
Gerrit-Owner: John E. Kabat <sljkrr at gmail.com>
Gerrit-Reviewer: John E. Kabat Jr. <john.kabat at scarletltd.com>
Gerrit-Reviewer: Marshall Dawson <marshalldawson3rd at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170816/4869a9fa/attachment.html>


More information about the coreboot-gerrit mailing list