aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/cpu/ppc4xx/reginfo.c
diff options
context:
space:
mode:
authorRobert P. J. Day2016-05-23 06:49:21 -0400
committerYork Sun2016-06-03 22:13:12 -0700
commitb7707b043ebbf88fe0fb49442db9316ded3a0740 (patch)
tree13adaba016b9695f0f33c17f898207d88a671599 /arch/powerpc/cpu/ppc4xx/reginfo.c
parent534992827756c3a1ab49823ca487702a954fe433 (diff)
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/ppc4xx/reginfo.c')
-rw-r--r--arch/powerpc/cpu/ppc4xx/reginfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/cpu/ppc4xx/reginfo.c b/arch/powerpc/cpu/ppc4xx/reginfo.c
index 339d38aa998..a42327eb3da 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;