From b7707b043ebbf88fe0fb49442db9316ded3a0740 Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Mon, 23 May 2016 06:49:21 -0400 Subject: 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 Reviewed-by: York Sun --- arch/powerpc/cpu/mpc512x/fixed_sdram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/powerpc/cpu/mpc512x/fixed_sdram.c') diff --git a/arch/powerpc/cpu/mpc512x/fixed_sdram.c b/arch/powerpc/cpu/mpc512x/fixed_sdram.c index 6451ea9a4a..68c5f8a27b 100644 --- a/arch/powerpc/cpu/mpc512x/fixed_sdram.c +++ b/arch/powerpc/cpu/mpc512x/fixed_sdram.c @@ -70,7 +70,7 @@ long int fixed_sdram(ddr512x_config_t *mddrc_config, mddrc_config = &default_mddrc_config; if (dram_init_seq == NULL) { dram_init_seq = default_init_seq; - seq_sz = sizeof(default_init_seq)/sizeof(u32); + seq_sz = ARRAY_SIZE(default_init_seq); } /* Initialize IO Control */ -- cgit