[PATCH][next] ARM: OMAP2+: Fix -Warray-bounds warning in _pwrdm_state_switch()
Tony Lindgren
tony at atomide.com
Wed Jun 14 01:07:40 PDT 2023
* Gustavo A. R. Silva <gustavoars at kernel.org> [230608 07:11]:
> If function pwrdm_read_prev_pwrst() returns -EINVAL, we will end
> up accessing array pwrdm->state_counter through negative index
> -22. This is wrong and the compiler is legitimately warning us
> about this potential problem.
>
> Fix this by sanity checking the value stored in variable _prev_
> before accessing array pwrdm->state_counter.
>
> Address the following -Warray-bounds warning:
> arch/arm/mach-omap2/powerdomain.c:178:45: warning: array subscript -22 is below array bounds of 'unsigned int[4]' [-Warray-bounds]
Thanks applying into omap-for-v6.5/cleanup, seems this can wait
for the merge window.
Regards,
Tony
More information about the linux-arm-kernel
mailing list