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/ppc4xx/reginfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/powerpc/cpu/ppc4xx/reginfo.c') diff --git a/arch/powerpc/cpu/ppc4xx/reginfo.c b/arch/powerpc/cpu/ppc4xx/reginfo.c index 339d38aa99..a42327eb3d 100644 --- a/arch/powerpc/cpu/ppc4xx/reginfo.c +++ b/arch/powerpc/cpu/ppc4xx/reginfo.c @@ -321,7 +321,7 @@ void ppc4xx_reginfo(void) PRINT_DCR(OPB2PLB40_BCTRL); PRINT_DCR(P4P3BO0_CFG); #endif - n = sizeof(ppc4xx_reg) / sizeof(ppc4xx_reg[0]); + n = ARRAY_SIZE(ppc4xx_reg); for (i = 0; i < n; i++) { value = 0; type = ppc4xx_reg[i].type; -- cgit v1.2.1