summaryrefslogtreecommitdiff
path: root/src/mainboard/amd/torpedo
diff options
context:
space:
mode:
authorEdward O'Callaghan <eocallaghan@alterapraxis.com>2014-07-07 19:58:53 +1000
committerPatrick Georgi <patrick@georgi-clan.de>2014-07-18 07:41:52 +0200
commitd5339ae0b73b46f65c1d88fd4066a0e98f09b6b3 (patch)
tree47580da970ec698f583685f02ef363da06336af4 /src/mainboard/amd/torpedo
parentcd47560f2ae0758012001d6d954653b4526811ad (diff)
mainboard: Make use of ARRAY_SIZE in buildOpts.c on AGESA platforms
Found using coccinelle. Change-Id: I406de6cfe25d3b471dbb6f98d9c62addae008de3 Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: http://review.coreboot.org/6195 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'src/mainboard/amd/torpedo')
-rw-r--r--src/mainboard/amd/torpedo/buildOpts.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mainboard/amd/torpedo/buildOpts.c b/src/mainboard/amd/torpedo/buildOpts.c
index 1a75cd2052..8b34720633 100644
--- a/src/mainboard/amd/torpedo/buildOpts.c
+++ b/src/mainboard/amd/torpedo/buildOpts.c
@@ -32,6 +32,8 @@
* @e sub-project: Core
* @e \$Revision: 6049 $ @e \$Date: 2008-05-14 01:58:02 -0500 (Wed, 14 May 2008) $
*/
+
+#include <stdlib.h>
#include "AGESA.h"
#include "CommonReturns.h"
#include "Filecode.h"
@@ -368,7 +370,7 @@ UINT8 AGESA_MEM_TABLE_LN[][sizeof (MEM_TABLE_ALIAS)] =
// TABLE END
NBACCESS (MTEnd, 0, 0, 0, 0, 0), // End of Table
};
-UINT8 SizeOfTableLN = sizeof (AGESA_MEM_TABLE_LN) / sizeof (AGESA_MEM_TABLE_LN[0]);
+UINT8 SizeOfTableLN = ARRAY_SIZE(AGESA_MEM_TABLE_LN);
/* ***************************************************************************
* Optional User code to be included into the AGESA build