arch: arm: aarch32: Use ARRAY_SIZE in for loop

Do not hardcode the array size in the loop for printing out the floating
point registers of the exception stack frame.  The size of this array
will change when Cortex-R support is added.

Signed-off-by: Bradley Bolen <bbolen@lexmark.com>
This commit is contained in:
Bradley Bolen 2020-11-12 09:31:54 -05:00 committed by Carles Cufí
commit 18ec84803c

View file

@ -24,7 +24,7 @@ static void esf_dump(const z_arch_esf_t *esf)
esf->basic.a4, esf->basic.ip, esf->basic.lr);
LOG_ERR(" xpsr: 0x%08x", esf->basic.xpsr);
#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
for (int i = 0; i < 16; i += 4) {
for (int i = 0; i < ARRAY_SIZE(esf->s); i += 4) {
LOG_ERR("s[%2d]: 0x%08x s[%2d]: 0x%08x"
" s[%2d]: 0x%08x s[%2d]: 0x%08x",
i, (uint32_t)esf->s[i],