From d5339ae0b73b46f65c1d88fd4066a0e98f09b6b3 Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Mon, 7 Jul 2014 19:58:53 +1000 Subject: mainboard: Make use of ARRAY_SIZE in buildOpts.c on AGESA platforms Found using coccinelle. Change-Id: I406de6cfe25d3b471dbb6f98d9c62addae008de3 Signed-off-by: Edward O'Callaghan Reviewed-on: http://review.coreboot.org/6195 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/mainboard/tyan/s8226/buildOpts.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mainboard/tyan') diff --git a/src/mainboard/tyan/s8226/buildOpts.c b/src/mainboard/tyan/s8226/buildOpts.c index 19ebae511f..e56373e2d9 100644 --- a/src/mainboard/tyan/s8226/buildOpts.c +++ b/src/mainboard/tyan/s8226/buildOpts.c @@ -17,6 +17,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include + #include "AGESA.h" #include "CommonReturns.h" #include "AdvancedApi.h" @@ -612,4 +614,4 @@ UINT8 AGESA_MEM_TABLE_HY[][sizeof (MEM_TABLE_ALIAS)] = // TABLE END NBACCESS (MTEnd, 0, 0, 0, 0, 0), // End of Table }; -UINT8 SizeOfTableHy = sizeof (AGESA_MEM_TABLE_HY) / sizeof (AGESA_MEM_TABLE_HY[0]); +UINT8 SizeOfTableHy = ARRAY_SIZE(AGESA_MEM_TABLE_HY); -- cgit v1.2.3