[coreboot-gerrit] Change in coreboot[master]: mainboard/hp/dl145_g1: Fix coding style

Elyes HAOUAS (Code Review) gerrit at coreboot.org
Thu Feb 1 09:04:37 CET 2018


Elyes HAOUAS has uploaded this change for review. ( https://review.coreboot.org/23531


Change subject: mainboard/hp/dl145_g1: Fix coding style
......................................................................

mainboard/hp/dl145_g1: Fix coding style

Change-Id: I8cfddbf49b3042d46956985425990360f0903b1f
Signed-off-by: Elyes HAOUAS <ehaouas at noos.fr>
---
M src/mainboard/hp/dl145_g1/acpi_tables.c
M src/mainboard/hp/dl145_g1/get_bus_conf.c
M src/mainboard/hp/dl145_g1/romstage.c
3 files changed, 14 insertions(+), 20 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/31/23531/1

diff --git a/src/mainboard/hp/dl145_g1/acpi_tables.c b/src/mainboard/hp/dl145_g1/acpi_tables.c
index 1b4ada1..1084bfb 100644
--- a/src/mainboard/hp/dl145_g1/acpi_tables.c
+++ b/src/mainboard/hp/dl145_g1/acpi_tables.c
@@ -66,9 +66,10 @@
 		int i;
 		int j = 0;
 
-		for(i = 1; i< sysconf.hc_possible_num; i++) {
+		for (i = 1; i < sysconf.hc_possible_num; i++) {
 			unsigned d = 0;
-			if(!(sysconf.pci1234[i] & 0x1) ) continue;
+			if (!(sysconf.pci1234[i] & 0x1))
+				continue;
 			// 8131 need to use +4
 
 			switch (sysconf.hcid[i]) {
diff --git a/src/mainboard/hp/dl145_g1/get_bus_conf.c b/src/mainboard/hp/dl145_g1/get_bus_conf.c
index da02095..7a9e3b5 100644
--- a/src/mainboard/hp/dl145_g1/get_bus_conf.c
+++ b/src/mainboard/hp/dl145_g1/get_bus_conf.c
@@ -52,7 +52,8 @@
 	device_t dev;
 	int i;
 
-	if(get_bus_conf_done == 1) return; //do it only once
+	if (get_bus_conf_done == 1)
+		return; //do it only once
 
 	get_bus_conf_done = 1;
 
@@ -60,7 +61,7 @@
 	struct mb_sysconf_t *m = sysconf.mb;
 
 	sysconf.hc_possible_num = ARRAY_SIZE(pci1234x);
-	for(i = 0; i < sysconf.hc_possible_num; i++) {
+	for (i = 0; i < sysconf.hc_possible_num; i++) {
 		sysconf.pci1234[i] = pci1234x[i];
 		sysconf.hcdn[i] = hcdnx[i];
 	}
@@ -75,30 +76,24 @@
 
 	/* 8111 */
 	dev = dev_find_slot(m->bus_8111_0, PCI_DEVFN(sysconf.sbdn,0));
-	if (dev) {
+	if (dev)
 		m->bus_8111_1 = pci_read_config8(dev, PCI_SECONDARY_BUS);
-	}
-	else {
+	else
 		printk(BIOS_DEBUG, "ERROR - could not find PCI %02x:03.0, using defaults\n", m->bus_8111_0);
-	}
 
 	/* 8131-1 */
 	dev = dev_find_slot(m->bus_8131_0, PCI_DEVFN(m->sbdn3,0));
-	if (dev) {
+	if (dev)
 		m->bus_8131_1 = pci_read_config8(dev, PCI_SECONDARY_BUS);
-	}
-	else {
+	else
 		printk(BIOS_DEBUG, "ERROR - could not find PCI %02x:01.0, using defaults\n", m->bus_8131_0);
-	}
 
 	/* 8131-2 */
 	dev = dev_find_slot(m->bus_8131_0, PCI_DEVFN(m->sbdn3+1,0));
-	if (dev) {
+	if (dev)
 		m->bus_8131_2 = pci_read_config8(dev, PCI_SECONDARY_BUS);
-	}
-	else {
+	else
 		printk(BIOS_DEBUG, "ERROR - could not find PCI %02x:02.0, using defaults\n", m->bus_8131_0);
-	}
 
 
 /*I/O APICs:	APIC ID	Version	State		Address*/
diff --git a/src/mainboard/hp/dl145_g1/romstage.c b/src/mainboard/hp/dl145_g1/romstage.c
index 91f03a7..1ef3658 100644
--- a/src/mainboard/hp/dl145_g1/romstage.c
+++ b/src/mainboard/hp/dl145_g1/romstage.c
@@ -175,12 +175,10 @@
 	enable_smbus();
 
 	int i;
-	for(i = 0; i < 2; i++) {
+	for (i = 0; i < 2; i++)
 		activate_spd_rom(&sysinfo->ctrl[i]);
-	}
-	for(i = RC0; i <= RC1; i<<=1) {
+	for (i = RC0; i <= RC1; i <<= 1)
 		change_i2c_mux(i);
-	}
 
 	//dump_spd_registers(&sysinfo->ctrl[0]);
 	//dump_spd_registers(&sysinfo->ctrl[1]);

-- 
To view, visit https://review.coreboot.org/23531
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: I8cfddbf49b3042d46956985425990360f0903b1f
Gerrit-Change-Number: 23531
Gerrit-PatchSet: 1
Gerrit-Owner: Elyes HAOUAS <ehaouas at noos.fr>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180201/4c0f960f/attachment.html>


More information about the coreboot-gerrit mailing list