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

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


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


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

mainboard/hp/dl165_g6_fam10: Fix coding style

Change-Id: I3e3bb9a0e9670fca67016523eac437140ff03188
Signed-off-by: Elyes HAOUAS <ehaouas at noos.fr>
---
M src/mainboard/hp/dl165_g6_fam10/get_bus_conf.c
M src/mainboard/hp/dl165_g6_fam10/mptable.c
2 files changed, 11 insertions(+), 14 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/33/23533/1

diff --git a/src/mainboard/hp/dl165_g6_fam10/get_bus_conf.c b/src/mainboard/hp/dl165_g6_fam10/get_bus_conf.c
index 68c3881..84c7c9b 100644
--- a/src/mainboard/hp/dl165_g6_fam10/get_bus_conf.c
+++ b/src/mainboard/hp/dl165_g6_fam10/get_bus_conf.c
@@ -69,7 +69,8 @@
 	int i;
 	struct mb_sysconf_t *m;
 
-	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;
 
@@ -80,7 +81,7 @@
 
 	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];
 	}
@@ -102,28 +103,24 @@
 		printk(BIOS_DEBUG, "secondary is %d...\n",m->bus_bcm5785_1);
 		dev = dev_find_slot(m->bus_bcm5785_1, PCI_DEVFN(0xd,0));
 		printk(BIOS_DEBUG, "now found %s...\n",dev_path(dev));
-		if(dev) {
+		if (dev)
 			m->bus_bcm5785_1_1 = pci_read_config8(dev, PCI_SECONDARY_BUS);
-		}
 	}
 	else {
 		printk(BIOS_DEBUG, "ERROR - could not find PCI %02x:%02x.0, using defaults\n", m->bus_bcm5785_0, sysconf.sbdn);
 	}
 
 		/* bcm5780 */
-	for(i = 1; i < 6; i++) {
+	for (i = 1; i < 6; i++) {
 		dev = dev_find_slot(m->bus_bcm5780[0], PCI_DEVFN(m->sbdn2 + i - 1,0));
-		if(dev) {
+		if (dev)
 			m->bus_bcm5780[i] = pci_read_config8(dev, PCI_SECONDARY_BUS);
-
-		}
-		else {
+		else
 			printk(BIOS_DEBUG, "ERROR - could not find PCI %02x:%02x.0, using defaults\n", m->bus_bcm5780[0], m->sbdn2+i-1);
-		}
 	}
 
 /*I/O APICs:	APIC ID	Version	State		Address*/
 	apicid_base = 0x10;
-	for(i = 0; i < 3; i++)
+	for (i = 0; i < 3; i++)
 		m->apicid_bcm5785[i] = apicid_base+i;
 }
diff --git a/src/mainboard/hp/dl165_g6_fam10/mptable.c b/src/mainboard/hp/dl165_g6_fam10/mptable.c
index b1c91c8..6a27d97 100644
--- a/src/mainboard/hp/dl165_g6_fam10/mptable.c
+++ b/src/mainboard/hp/dl165_g6_fam10/mptable.c
@@ -58,7 +58,7 @@
 		device_t dev = 0;
 		int i;
 		struct resource *res;
-		for(i = 0; i < 3; i++) {
+		for (i = 0; i < 3; i++) {
 			dev = dev_find_device(0x1166, 0x0235, dev);
 			if (dev) {
 				res = find_resource(dev, PCI_BASE_ADDRESS_0);
@@ -86,7 +86,7 @@
 	{
 		device_t dev;
 		dev = dev_find_device(0x1166, 0x0205, 0);
-		if(dev) {
+		if (dev) {
 			uint32_t dword;
 			dword = pci_read_config32(dev, 0x64);
 			dword |= (1 << 30); // GEVENT14-21 used as PCI IRQ0-7
@@ -129,7 +129,7 @@
 	{
 		device_t dev;
 		dev = dev_find_device(0x1166, 0x0205, 0);
-		if(dev) {
+		if (dev) {
 			uint32_t dword;
 			dword = pci_read_config32(dev, 0x6c);
 			dword |= (1 << 4); // enable interrupts

-- 
To view, visit https://review.coreboot.org/23533
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: I3e3bb9a0e9670fca67016523eac437140ff03188
Gerrit-Change-Number: 23533
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/2398de6a/attachment.html>


More information about the coreboot-gerrit mailing list