diff options
author | Elyes HAOUAS <ehaouas@noos.fr> | 2016-09-19 10:26:28 -0600 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2016-09-21 16:49:34 +0200 |
commit | b6a6bb53938c7e9f92237f22c52a02ab08a9d247 (patch) | |
tree | 461806c7e86c7e90d641592d90e1dd4a6b3ac54d /src/northbridge/amd/amdk8/acpi.c | |
parent | e1606731b63bedd12398acb57a115aa5d280811e (diff) | |
download | coreboot-b6a6bb53938c7e9f92237f22c52a02ab08a9d247.tar.xz |
northbridge/amdk8: Improve code formatting
Change-Id: I1c2786dfb166904ff8b19a663c5e2e8156b7aedf
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/16644
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/northbridge/amd/amdk8/acpi.c')
-rw-r--r-- | src/northbridge/amd/amdk8/acpi.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/northbridge/amd/amdk8/acpi.c b/src/northbridge/amd/amdk8/acpi.c index 992a85ed46..906dc0b54a 100644 --- a/src/northbridge/amd/amdk8/acpi.c +++ b/src/northbridge/amd/amdk8/acpi.c @@ -101,7 +101,7 @@ static void set_srat_mem(void *gp, struct device *dev, struct resource *res) */ if ((basek+sizek)<1024) return; - if (basek<1024) { + if (basek < 1024) { sizek -= 1024 - basek; basek = 1024; } @@ -158,29 +158,29 @@ static unsigned long acpi_fill_slit(unsigned long current) p += 8; #if 0 - for (i=0;i<sysconf.hc_possible_num;i++) { - if ((sysconf.pci1234[i]&1) !=1 ) continue; + for (i = 0; i < sysconf.hc_possible_num; i++) { + if ((sysconf.pci1234[i]&1) !=1) continue; outer_node[(sysconf.pci1234[i] >> 4) & 0xf] = 1; // mark the outer node } #endif - for (i=0;i<nodes;i++) { - for (j=0;j<nodes; j++) { - if (i==j) { + for (i = 0; i < nodes; i++) { + for (j = 0; j < nodes; j++) { + if (i == j) { p[i*nodes+j] = 10; } else { #if 0 int k; u8 latency_factor = 0; int k_start, k_end; - if (i<j) { + if (i < j) { k_start = i; k_end = j; } else { k_start = j; k_end = i; } - for (k=k_start;k<=k_end; k++) { + for (k = k_start; k <= k_end; k++) { if (outer_node[k]) { latency_factor = 1; break; @@ -238,10 +238,10 @@ static void k8acpi_write_HT(void) { acpigen_write_name("HCLK"); acpigen_write_package(HC_POSSIBLE_NUM); - for (i=0;i<sysconf.hc_possible_num;i++) { + for (i = 0; i < sysconf.hc_possible_num; i++) { acpigen_write_dword(sysconf.pci1234[i]); } - for (i=sysconf.hc_possible_num; i<HC_POSSIBLE_NUM; i++) { // in case we set array size to other than 8 + for (i = sysconf.hc_possible_num; i < HC_POSSIBLE_NUM; i++) { // in case we set array size to other than 8 acpigen_write_dword(0x0); } @@ -250,10 +250,10 @@ static void k8acpi_write_HT(void) { acpigen_write_name("HCDN"); acpigen_write_package(HC_POSSIBLE_NUM); - for (i=0;i<sysconf.hc_possible_num;i++) { + for (i = 0; i < sysconf.hc_possible_num; i++) { acpigen_write_dword(sysconf.hcdn[i]); } - for (i=sysconf.hc_possible_num; i<HC_POSSIBLE_NUM; i++) { // in case we set array size to other than 8 + for (i = sysconf.hc_possible_num; i < HC_POSSIBLE_NUM; i++) { // in case we set array size to other than 8 acpigen_write_dword(0x20202020); } acpigen_pop_len(); @@ -268,7 +268,7 @@ static void k8acpi_write_pci_data(int dlen, const char *name, int offset) { acpigen_write_name(name); acpigen_write_package(dlen); - for (i=0; i<dlen; i++) { + for (i = 0; i < dlen; i++) { dword = pci_read_config32(dev, offset+i*4); acpigen_write_dword(dword); } |