summaryrefslogtreecommitdiff
path: root/src/mainboard/supermicro/h8dmr
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/supermicro/h8dmr')
-rw-r--r--src/mainboard/supermicro/h8dmr/get_bus_conf.c3
-rw-r--r--src/mainboard/supermicro/h8dmr/resourcemap.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/mainboard/supermicro/h8dmr/get_bus_conf.c b/src/mainboard/supermicro/h8dmr/get_bus_conf.c
index fd02ae8d0f..3402d9d5f6 100644
--- a/src/mainboard/supermicro/h8dmr/get_bus_conf.c
+++ b/src/mainboard/supermicro/h8dmr/get_bus_conf.c
@@ -29,6 +29,7 @@
#endif
#include <cpu/amd/amdk8_sysconf.h>
+#include <stdlib.h>
// Global variables for MB layouts and these will be shared by irqtable mptable and acpi_tables
@@ -81,7 +82,7 @@ void get_bus_conf(void)
get_bus_conf_done = 1;
- sysconf.hc_possible_num = sizeof(pci1234x)/sizeof(pci1234x[0]);
+ sysconf.hc_possible_num = ARRAY_SIZE(pci1234x);
for(i=0;i<sysconf.hc_possible_num; i++) {
sysconf.pci1234[i] = pci1234x[i];
sysconf.hcdn[i] = hcdnx[i];
diff --git a/src/mainboard/supermicro/h8dmr/resourcemap.c b/src/mainboard/supermicro/h8dmr/resourcemap.c
index 58c586a6c5..fa22ee337b 100644
--- a/src/mainboard/supermicro/h8dmr/resourcemap.c
+++ b/src/mainboard/supermicro/h8dmr/resourcemap.c
@@ -277,7 +277,7 @@ static void setup_mb_resource_map(void)
};
int max;
- max = sizeof(register_values)/sizeof(register_values[0]);
+ max = ARRAY_SIZE(register_values);
setup_resource_map(register_values, max);
}