Edward O'Callaghan (eocallaghan@alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6195
-gerrit
commit e94b11877e2bb7078b6a1d97ec9f0a1a5f1f4b87 Author: Edward O'Callaghan eocallaghan@alterapraxis.com Date: Mon Jul 7 19:58:53 2014 +1000
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 --- src/mainboard/amd/dinar/buildOpts.c | 3 ++- src/mainboard/amd/inagua/buildOpts.c | 3 ++- src/mainboard/amd/olivehill/buildOpts.c | 3 ++- src/mainboard/amd/parmer/buildOpts.c | 3 ++- src/mainboard/amd/persimmon/buildOpts.c | 3 ++- src/mainboard/amd/south_station/buildOpts.c | 3 ++- src/mainboard/amd/thatcher/buildOpts.c | 3 ++- src/mainboard/amd/torpedo/buildOpts.c | 4 +++- src/mainboard/amd/union_station/buildOpts.c | 3 ++- src/mainboard/asrock/e350m1/buildOpts.c | 3 ++- src/mainboard/asrock/imb-a180/buildOpts.c | 3 ++- src/mainboard/asus/f2a85-m/buildOpts.c | 4 +++- src/mainboard/gizmosphere/gizmo/buildOpts.c | 4 +++- src/mainboard/hp/pavilion_m6_1035dx/buildOpts.c | 4 +++- src/mainboard/jetway/nf81-t56n-lf/buildOpts.c | 4 +++- src/mainboard/lippert/frontrunner-af/buildOpts.c | 4 +++- src/mainboard/lippert/toucan-af/buildOpts.c | 4 +++- src/mainboard/supermicro/h8qgi/buildOpts.c | 4 +++- src/mainboard/supermicro/h8scm/buildOpts.c | 4 +++- src/mainboard/tyan/s8226/buildOpts.c | 4 +++- 20 files changed, 50 insertions(+), 20 deletions(-)
diff --git a/src/mainboard/amd/dinar/buildOpts.c b/src/mainboard/amd/dinar/buildOpts.c index 41f5415..7b874f6 100644 --- a/src/mainboard/amd/dinar/buildOpts.c +++ b/src/mainboard/amd/dinar/buildOpts.c @@ -32,6 +32,7 @@ * @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" @@ -523,7 +524,7 @@ 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); /* *************************************************************************** * Optional User code to be included into the AGESA build * These may be 32-bit call-out routines... diff --git a/src/mainboard/amd/inagua/buildOpts.c b/src/mainboard/amd/inagua/buildOpts.c index 8a93f09..5779ccd 100644 --- a/src/mainboard/amd/inagua/buildOpts.c +++ b/src/mainboard/amd/inagua/buildOpts.c @@ -33,6 +33,7 @@ * @e $Revision: 23714 $ @e $Date: 2009-12-09 17:28:37 -0600 (Wed, 09 Dec 2009) $ */
+#include <stdlib.h> #include "Filecode.h" #define FILECODE PLATFORM_SPECIFIC_OPTIONS_FILECODE
@@ -439,7 +440,7 @@ CONST UINT8 AGESA_MEM_TABLE_ON[][sizeof (MEM_TABLE_ALIAS)] = // TABLE END NBACCESS (MTEnd, 0, 0, 0, 0, 0), // End of Table }; -CONST UINT8 SizeOfTableON = sizeof (AGESA_MEM_TABLE_ON) / sizeof (AGESA_MEM_TABLE_ON[0]); +CONST UINT8 SizeOfTableON = ARRAY_SIZE(AGESA_MEM_TABLE_ON);
/* *************************************************************************** * Optional User code to be included into the AGESA build diff --git a/src/mainboard/amd/olivehill/buildOpts.c b/src/mainboard/amd/olivehill/buildOpts.c index ae7f5e9..98151a2 100644 --- a/src/mainboard/amd/olivehill/buildOpts.c +++ b/src/mainboard/amd/olivehill/buildOpts.c @@ -33,6 +33,7 @@ * @e $Revision: 23714 $ @e $Date: 2009-12-09 17:28:37 -0600 (Wed, 09 Dec 2009) $ */
+#include <stdlib.h> #include "AGESA.h" //#include "CommonReturns.h" #include "Filecode.h" @@ -503,4 +504,4 @@ UINT8 AGESA_MEM_TABLE_TN[][sizeof (MEM_TABLE_ALIAS)] = // TABLE END NBACCESS (MTEnd, 0, 0, 0, 0, 0), // End of Table }; -UINT8 SizeOfTableTN = sizeof (AGESA_MEM_TABLE_TN) / sizeof (AGESA_MEM_TABLE_TN[0]); +UINT8 SizeOfTableTN = ARRAY_SIZE(AGESA_MEM_TABLE_TN); diff --git a/src/mainboard/amd/parmer/buildOpts.c b/src/mainboard/amd/parmer/buildOpts.c index 1a23190..3db1e47 100644 --- a/src/mainboard/amd/parmer/buildOpts.c +++ b/src/mainboard/amd/parmer/buildOpts.c @@ -33,6 +33,7 @@ * @e $Revision: 23714 $ @e $Date: 2009-12-09 17:28:37 -0600 (Wed, 09 Dec 2009) $ */
+#include <stdlib.h> #include "AGESA.h" //#include "CommonReturns.h" #include "Filecode.h" @@ -496,4 +497,4 @@ UINT8 AGESA_MEM_TABLE_TN[][sizeof (MEM_TABLE_ALIAS)] = // TABLE END NBACCESS (MTEnd, 0, 0, 0, 0, 0), // End of Table }; -UINT8 SizeOfTableTN = sizeof (AGESA_MEM_TABLE_TN) / sizeof (AGESA_MEM_TABLE_TN[0]); +UINT8 SizeOfTableTN = ARRAY_SIZE(AGESA_MEM_TABLE_TN); diff --git a/src/mainboard/amd/persimmon/buildOpts.c b/src/mainboard/amd/persimmon/buildOpts.c index c6383a2..18bc1b0 100644 --- a/src/mainboard/amd/persimmon/buildOpts.c +++ b/src/mainboard/amd/persimmon/buildOpts.c @@ -33,6 +33,7 @@ * @e $Revision: 23714 $ @e $Date: 2009-12-09 17:28:37 -0600 (Wed, 09 Dec 2009) $ */
+#include <stdlib.h> #include "Filecode.h" #define FILECODE PLATFORM_SPECIFIC_OPTIONS_FILECODE
@@ -439,7 +440,7 @@ CONST UINT8 AGESA_MEM_TABLE_ON[][sizeof (MEM_TABLE_ALIAS)] = // TABLE END NBACCESS (MTEnd, 0, 0, 0, 0, 0), // End of Table }; -CONST UINT8 SizeOfTableON = sizeof (AGESA_MEM_TABLE_ON) / sizeof (AGESA_MEM_TABLE_ON[0]); +CONST UINT8 SizeOfTableON = ARRAY_SIZE(AGESA_MEM_TABLE_ON);
/* *************************************************************************** * Optional User code to be included into the AGESA build diff --git a/src/mainboard/amd/south_station/buildOpts.c b/src/mainboard/amd/south_station/buildOpts.c index 87f9b88..3cc16e3 100644 --- a/src/mainboard/amd/south_station/buildOpts.c +++ b/src/mainboard/amd/south_station/buildOpts.c @@ -33,6 +33,7 @@ * @e $Revision: 23714 $ @e $Date: 2009-12-09 17:28:37 -0600 (Wed, 09 Dec 2009) $ */
+#include <stdlib.h> #include "Filecode.h" #define FILECODE PLATFORM_SPECIFIC_OPTIONS_FILECODE
@@ -439,7 +440,7 @@ CONST UINT8 AGESA_MEM_TABLE_ON[][sizeof (MEM_TABLE_ALIAS)] = // TABLE END NBACCESS (MTEnd, 0, 0, 0, 0, 0), // End of Table }; -CONST UINT8 SizeOfTableON = sizeof (AGESA_MEM_TABLE_ON) / sizeof (AGESA_MEM_TABLE_ON[0]); +CONST UINT8 SizeOfTableON = ARRAY_SIZE(AGESA_MEM_TABLE_ON);
/* *************************************************************************** * Optional User code to be included into the AGESA build diff --git a/src/mainboard/amd/thatcher/buildOpts.c b/src/mainboard/amd/thatcher/buildOpts.c index 87f0460..bc2ff12 100644 --- a/src/mainboard/amd/thatcher/buildOpts.c +++ b/src/mainboard/amd/thatcher/buildOpts.c @@ -33,6 +33,7 @@ * @e $Revision: 23714 $ @e $Date: 2009-12-09 17:28:37 -0600 (Wed, 09 Dec 2009) $ */
+#include <stdlib.h> #include "AGESA.h" //#include "CommonReturns.h" #include "Filecode.h" @@ -496,7 +497,7 @@ UINT8 AGESA_MEM_TABLE_TN[][sizeof (MEM_TABLE_ALIAS)] = // TABLE END NBACCESS (MTEnd, 0, 0, 0, 0, 0), // End of Table }; -UINT8 SizeOfTableTN = sizeof (AGESA_MEM_TABLE_TN) / sizeof (AGESA_MEM_TABLE_TN[0]); +UINT8 SizeOfTableTN = ARRAY_SIZE(AGESA_MEM_TABLE_TN);
/* *************************************************************************** * Optional User code to be included into the AGESA build diff --git a/src/mainboard/amd/torpedo/buildOpts.c b/src/mainboard/amd/torpedo/buildOpts.c index 91718ed..f9cfa0a 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 diff --git a/src/mainboard/amd/union_station/buildOpts.c b/src/mainboard/amd/union_station/buildOpts.c index 87f9b88..3cc16e3 100644 --- a/src/mainboard/amd/union_station/buildOpts.c +++ b/src/mainboard/amd/union_station/buildOpts.c @@ -33,6 +33,7 @@ * @e $Revision: 23714 $ @e $Date: 2009-12-09 17:28:37 -0600 (Wed, 09 Dec 2009) $ */
+#include <stdlib.h> #include "Filecode.h" #define FILECODE PLATFORM_SPECIFIC_OPTIONS_FILECODE
@@ -439,7 +440,7 @@ CONST UINT8 AGESA_MEM_TABLE_ON[][sizeof (MEM_TABLE_ALIAS)] = // TABLE END NBACCESS (MTEnd, 0, 0, 0, 0, 0), // End of Table }; -CONST UINT8 SizeOfTableON = sizeof (AGESA_MEM_TABLE_ON) / sizeof (AGESA_MEM_TABLE_ON[0]); +CONST UINT8 SizeOfTableON = ARRAY_SIZE(AGESA_MEM_TABLE_ON);
/* *************************************************************************** * Optional User code to be included into the AGESA build diff --git a/src/mainboard/asrock/e350m1/buildOpts.c b/src/mainboard/asrock/e350m1/buildOpts.c index 19ba4f3..453d610 100644 --- a/src/mainboard/asrock/e350m1/buildOpts.c +++ b/src/mainboard/asrock/e350m1/buildOpts.c @@ -33,6 +33,7 @@ * @e $Revision: 23714 $ @e $Date: 2009-12-09 17:28:37 -0600 (Wed, 09 Dec 2009) $ */
+#include <stdlib.h> #include "AGESA.h" #include "CommonReturns.h" #include "Filecode.h" @@ -439,7 +440,7 @@ CONST UINT8 AGESA_MEM_TABLE_ON[][sizeof (MEM_TABLE_ALIAS)] = // TABLE END NBACCESS (MTEnd, 0, 0, 0, 0, 0), // End of Table }; -CONST UINT8 SizeOfTableON = sizeof (AGESA_MEM_TABLE_ON) / sizeof (AGESA_MEM_TABLE_ON[0]); +CONST UINT8 SizeOfTableON = ARRAY_SIZE(AGESA_MEM_TABLE_ON);
/* *************************************************************************** * Optional User code to be included into the AGESA build diff --git a/src/mainboard/asrock/imb-a180/buildOpts.c b/src/mainboard/asrock/imb-a180/buildOpts.c index 7c57183..520da8b 100644 --- a/src/mainboard/asrock/imb-a180/buildOpts.c +++ b/src/mainboard/asrock/imb-a180/buildOpts.c @@ -33,6 +33,7 @@ * @e $Revision: 23714 $ @e $Date: 2009-12-09 17:28:37 -0600 (Wed, 09 Dec 2009) $ */
+#include <stdlib.h> #include "AGESA.h" //#include "CommonReturns.h" #include "Filecode.h" @@ -503,4 +504,4 @@ UINT8 AGESA_MEM_TABLE_TN[][sizeof (MEM_TABLE_ALIAS)] = // TABLE END NBACCESS (MTEnd, 0, 0, 0, 0, 0), // End of Table }; -UINT8 SizeOfTableTN = sizeof (AGESA_MEM_TABLE_TN) / sizeof (AGESA_MEM_TABLE_TN[0]); +UINT8 SizeOfTableTN = ARRAY_SIZE(AGESA_MEM_TABLE_TN); diff --git a/src/mainboard/asus/f2a85-m/buildOpts.c b/src/mainboard/asus/f2a85-m/buildOpts.c index 0c6b657..cd1c812 100644 --- a/src/mainboard/asus/f2a85-m/buildOpts.c +++ b/src/mainboard/asus/f2a85-m/buildOpts.c @@ -33,6 +33,8 @@ * @e $Revision: 23714 $ @e $Date: 2009-12-09 17:28:37 -0600 (Wed, 09 Dec 2009) $ */
+#include <stdlib.h> + #include <vendorcode/amd/agesa/f15tn/AGESA.h>
/* Include the files that instantiate the configuration definitions. */ @@ -492,7 +494,7 @@ UINT8 AGESA_MEM_TABLE_TN[][sizeof (MEM_TABLE_ALIAS)] = // TABLE END NBACCESS (MTEnd, 0, 0, 0, 0, 0), // End of Table }; -UINT8 SizeOfTableTN = sizeof (AGESA_MEM_TABLE_TN) / sizeof (AGESA_MEM_TABLE_TN[0]); +UINT8 SizeOfTableTN = ARRAY_SIZE(AGESA_MEM_TABLE_TN);
/* *************************************************************************** * Optional User code to be included into the AGESA build diff --git a/src/mainboard/gizmosphere/gizmo/buildOpts.c b/src/mainboard/gizmosphere/gizmo/buildOpts.c index ba9a350..4a8fbc6 100755 --- a/src/mainboard/gizmosphere/gizmo/buildOpts.c +++ b/src/mainboard/gizmosphere/gizmo/buildOpts.c @@ -34,6 +34,8 @@ * @e $Revision: 23714 $ @e $Date: 2009-12-09 17:28:37 -0600 (Wed, 09 Dec 2009) $ */
+#include <stdlib.h> + #include "Filecode.h" #define FILECODE PLATFORM_SPECIFIC_OPTIONS_FILECODE
@@ -451,7 +453,7 @@ CONST UINT8 AGESA_MEM_TABLE_ON[][sizeof (MEM_TABLE_ALIAS)] = // TABLE END NBACCESS (MTEnd, 0, 0, 0, 0, 0), // End of Table }; -CONST UINT8 SizeOfTableON = sizeof (AGESA_MEM_TABLE_ON) / sizeof (AGESA_MEM_TABLE_ON[0]); +CONST UINT8 SizeOfTableON = ARRAY_SIZE(AGESA_MEM_TABLE_ON);
/* *************************************************************************** * Optional User code to be included into the AGESA build diff --git a/src/mainboard/hp/pavilion_m6_1035dx/buildOpts.c b/src/mainboard/hp/pavilion_m6_1035dx/buildOpts.c index df0f8fd..bfd6383 100644 --- a/src/mainboard/hp/pavilion_m6_1035dx/buildOpts.c +++ b/src/mainboard/hp/pavilion_m6_1035dx/buildOpts.c @@ -35,6 +35,8 @@
#include "mainboard.h"
+#include <stdlib.h> + #include <vendorcode/amd/agesa/f15tn/AGESA.h>
/* Include the files that instantiate the configuration definitions. */ @@ -437,4 +439,4 @@ UINT8 AGESA_MEM_TABLE_TN[][sizeof (MEM_TABLE_ALIAS)] = { NBACCESS (MTEnd, 0, 0, 0, 0, 0), // End of Table }; -UINT8 SizeOfTableTN = sizeof (AGESA_MEM_TABLE_TN) / sizeof (AGESA_MEM_TABLE_TN[0]); +UINT8 SizeOfTableTN = ARRAY_SIZE(AGESA_MEM_TABLE_TN); diff --git a/src/mainboard/jetway/nf81-t56n-lf/buildOpts.c b/src/mainboard/jetway/nf81-t56n-lf/buildOpts.c index 7cf274e..8d8bbec 100644 --- a/src/mainboard/jetway/nf81-t56n-lf/buildOpts.c +++ b/src/mainboard/jetway/nf81-t56n-lf/buildOpts.c @@ -33,6 +33,8 @@ * @e $Revision: 23714 $ @e $Date: 2009-12-09 17:28:37 -0600 (Wed, 09 Dec 2009) $ */
+#include <stdlib.h> + #include <vendorcode/amd/agesa/f14/AGESA.h>
/* Include the files that instantiate the configuration definitions. */ @@ -342,4 +344,4 @@ const uint8_t AGESA_MEM_TABLE_ON[][sizeof (MEM_TABLE_ALIAS)] = { NBACCESS (MTEnd, 0, 0, 0, 0, 0), /* End of Table */ }; -const uint8_t SizeOfTableON = sizeof (AGESA_MEM_TABLE_ON) / sizeof (AGESA_MEM_TABLE_ON[0]); +const uint8_t SizeOfTableON = ARRAY_SIZE(AGESA_MEM_TABLE_ON); diff --git a/src/mainboard/lippert/frontrunner-af/buildOpts.c b/src/mainboard/lippert/frontrunner-af/buildOpts.c index 45ffac6..10d7611 100644 --- a/src/mainboard/lippert/frontrunner-af/buildOpts.c +++ b/src/mainboard/lippert/frontrunner-af/buildOpts.c @@ -33,6 +33,8 @@ * @e $Revision: 23714 $ @e $Date: 2009-12-09 17:28:37 -0600 (Wed, 09 Dec 2009) $ */
+#include <stdlib.h> + #include "Filecode.h" #define FILECODE PLATFORM_SPECIFIC_OPTIONS_FILECODE
@@ -440,7 +442,7 @@ CONST UINT8 AGESA_MEM_TABLE_ON[][sizeof (MEM_TABLE_ALIAS)] = // TABLE END NBACCESS (MTEnd, 0, 0, 0, 0, 0), // End of Table }; -CONST UINT8 SizeOfTableON = sizeof (AGESA_MEM_TABLE_ON) / sizeof (AGESA_MEM_TABLE_ON[0]); +CONST UINT8 SizeOfTableON = ARRAY_SIZE(AGESA_MEM_TABLE_ON);
/* *************************************************************************** * Optional User code to be included into the AGESA build diff --git a/src/mainboard/lippert/toucan-af/buildOpts.c b/src/mainboard/lippert/toucan-af/buildOpts.c index 45ffac6..10d7611 100644 --- a/src/mainboard/lippert/toucan-af/buildOpts.c +++ b/src/mainboard/lippert/toucan-af/buildOpts.c @@ -33,6 +33,8 @@ * @e $Revision: 23714 $ @e $Date: 2009-12-09 17:28:37 -0600 (Wed, 09 Dec 2009) $ */
+#include <stdlib.h> + #include "Filecode.h" #define FILECODE PLATFORM_SPECIFIC_OPTIONS_FILECODE
@@ -440,7 +442,7 @@ CONST UINT8 AGESA_MEM_TABLE_ON[][sizeof (MEM_TABLE_ALIAS)] = // TABLE END NBACCESS (MTEnd, 0, 0, 0, 0, 0), // End of Table }; -CONST UINT8 SizeOfTableON = sizeof (AGESA_MEM_TABLE_ON) / sizeof (AGESA_MEM_TABLE_ON[0]); +CONST UINT8 SizeOfTableON = ARRAY_SIZE(AGESA_MEM_TABLE_ON);
/* *************************************************************************** * Optional User code to be included into the AGESA build diff --git a/src/mainboard/supermicro/h8qgi/buildOpts.c b/src/mainboard/supermicro/h8qgi/buildOpts.c index 7584e4f..9b82a5f 100644 --- a/src/mainboard/supermicro/h8qgi/buildOpts.c +++ b/src/mainboard/supermicro/h8qgi/buildOpts.c @@ -17,6 +17,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+#include <stdlib.h> + #include "AGESA.h" #include "CommonReturns.h" #include "AdvancedApi.h" @@ -612,5 +614,5 @@ 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);
diff --git a/src/mainboard/supermicro/h8scm/buildOpts.c b/src/mainboard/supermicro/h8scm/buildOpts.c index 4cc4c0e..6ca0a41 100644 --- a/src/mainboard/supermicro/h8scm/buildOpts.c +++ b/src/mainboard/supermicro/h8scm/buildOpts.c @@ -17,6 +17,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+#include <stdlib.h> + #include "AGESA.h" #include "CommonReturns.h" #include "AdvancedApi.h" @@ -516,5 +518,5 @@ 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);
diff --git a/src/mainboard/tyan/s8226/buildOpts.c b/src/mainboard/tyan/s8226/buildOpts.c index bb4dd2d..ec418fd 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 <stdlib.h> + #include "AGESA.h" #include "CommonReturns.h" #include "AdvancedApi.h" @@ -612,5 +614,5 @@ 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);