From f0c73ac341511427ae36d0e40293b5c0fc24abd4 Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Mon, 24 Nov 2014 23:27:42 +1100 Subject: northbridge/amd/agesa/family12/dimmSpd.c: Use ARRAY_SIZE macro Change-Id: Icf980088c196b152cc4e5e179f7b7e334b695ccc Signed-off-by: Edward O'Callaghan Reviewed-on: http://review.coreboot.org/7574 Tested-by: build bot (Jenkins) Reviewed-by: Nicolas Reinecke Reviewed-by: Patrick Georgi Reviewed-by: Paul Menzel --- src/northbridge/amd/agesa/family12/dimmSpd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/northbridge/amd/agesa/family12/dimmSpd.c b/src/northbridge/amd/agesa/family12/dimmSpd.c index 3ac4d7d638..e8ef02a5b7 100644 --- a/src/northbridge/amd/agesa/family12/dimmSpd.c +++ b/src/northbridge/amd/agesa/family12/dimmSpd.c @@ -27,14 +27,13 @@ * ***************************************************************************/ +#include #include "Porting.h" #include "AGESA.h" #include "amdlib.h" #include -#define DIMENSION(array)(sizeof (array)/ sizeof (array [0])) - typedef struct _DIMM_INFO_SMBUS{ UINT8 SocketId; UINT8 MemChannelId; @@ -60,7 +59,7 @@ AmdMemoryReadSPD ( { UINT8 SmBusAddress = 0; UINTN Index; - UINTN MaxSocket = DIMENSION (SpdAddrLookup); + UINTN MaxSocket = ARRAY_SIZE(SpdAddrLookup); for (Index = 0; Index < MaxSocket; Index ++){ if ((SpdData->SocketId == SpdAddrLookup[Index].SocketId) && (SpdData->MemChannelId == SpdAddrLookup[Index].MemChannelId) && -- cgit v1.2.3