[coreboot-gerrit] Change in coreboot[master]: soc/amd/stoneyridge/southbridge.c: Remove preprocessor #IF

Richard Spiegel (Code Review) gerrit at coreboot.org
Fri Sep 29 20:41:28 CEST 2017


Richard Spiegel has uploaded this change for review. ( https://review.coreboot.org/21770


Change subject: soc/amd/stoneyridge/southbridge.c: Remove preprocessor #IF
......................................................................

soc/amd/stoneyridge/southbridge.c: Remove preprocessor #IF

Replace #if and #endif with runtime <if (condition) {> and <}>

Code Files: southbridge.c
BUG=b:62200891

Change-Id: I69877bf301fa89781381e3eb8e6b4acd7e16b4b4
Signed-off-by: Richard Spiegel <richard.spiegel at silverbackltd.com>
---
M src/soc/amd/stoneyridge/southbridge.c
1 file changed, 5 insertions(+), 8 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/70/21770/1

diff --git a/src/soc/amd/stoneyridge/southbridge.c b/src/soc/amd/stoneyridge/southbridge.c
index 5e36100..676f971 100644
--- a/src/soc/amd/stoneyridge/southbridge.c
+++ b/src/soc/amd/stoneyridge/southbridge.c
@@ -28,9 +28,7 @@
 #include <soc/southbridge.h>
 #include <soc/smbus.h>
 #include <soc/smi.h>
-#if IS_ENABLED(CONFIG_STONEYRIDGE_IMC_FWM)
 #include <fchec.h>
-#endif
 
 
 int acpi_get_sleep_type(void)
@@ -98,12 +96,11 @@
 
 void southbridge_final(void *chip_info)
 {
-#if IS_ENABLED(CONFIG_STONEYRIDGE_IMC_FWM)
-	agesawrapper_fchecfancontrolservice();
-#if !IS_ENABLED(CONFIG_ACPI_ENABLE_THERMAL_ZONE)
-	enable_imc_thermal_zone();
-#endif
-#endif
+	if (IS_ENABLED(CONFIG_STONEYRIDGE_IMC_FWM)) {
+		agesawrapper_fchecfancontrolservice();
+		if (!IS_ENABLED(CONFIG_ACPI_ENABLE_THERMAL_ZONE))
+			enable_imc_thermal_zone();
+	}
 }
 
 /*

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I69877bf301fa89781381e3eb8e6b4acd7e16b4b4
Gerrit-Change-Number: 21770
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Spiegel <richard.spiegel at silverbackltd.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170929/ca5958b0/attachment.html>


More information about the coreboot-gerrit mailing list