summaryrefslogtreecommitdiff
path: root/arch/powerpc/cpu/mpc8xx/fec.c
diff options
context:
space:
mode:
authorRobert P. J. Day <rpjday@crashcourse.ca>2016-05-23 06:49:21 -0400
committerYork Sun <york.sun@nxp.com>2016-06-03 22:13:12 -0700
commitb7707b043ebbf88fe0fb49442db9316ded3a0740 (patch)
tree13adaba016b9695f0f33c17f898207d88a671599 /arch/powerpc/cpu/mpc8xx/fec.c
parent534992827756c3a1ab49823ca487702a954fe433 (diff)
downloadu-boot-imx-b7707b043ebbf88fe0fb49442db9316ded3a0740.zip
u-boot-imx-b7707b043ebbf88fe0fb49442db9316ded3a0740.tar.gz
u-boot-imx-b7707b043ebbf88fe0fb49442db9316ded3a0740.tar.bz2
arch/powerpc: Simplify some calculations using ARRAY_SIZE() macro.
Replace a number of array length calculations with the ARRAY_SIZE() macro, for clarity. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Reviewed-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'arch/powerpc/cpu/mpc8xx/fec.c')
-rw-r--r--arch/powerpc/cpu/mpc8xx/fec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/cpu/mpc8xx/fec.c b/arch/powerpc/cpu/mpc8xx/fec.c
index ea4ab3a..f1ae358 100644
--- a/arch/powerpc/cpu/mpc8xx/fec.c
+++ b/arch/powerpc/cpu/mpc8xx/fec.c
@@ -137,7 +137,7 @@ int fec_initialize(bd_t *bis)
struct ether_fcc_info_s *efis;
int i;
- for (i = 0; i < sizeof(ether_fcc_info) / sizeof(ether_fcc_info[0]); i++) {
+ for (i = 0; i < ARRAY_SIZE(ether_fcc_info); i++) {
dev = malloc(sizeof(*dev));
if (dev == NULL)
@@ -879,7 +879,7 @@ void mii_init (void)
/* Setup the pin configuration of the FEC(s)
*/
- for (i = 0; i < sizeof(ether_fcc_info) / sizeof(ether_fcc_info[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(ether_fcc_info); i++)
fec_pin_init(ether_fcc_info[i].ether_index);
}