Re: [PATCH][next] clk: moxart: Make read-only array div_idx static const
From: Krzysztof Kozlowski
Date: Thu Jun 19 2025 - 16:19:09 EST
On 19/06/2025 21:53, Stephen Boyd wrote:
> Quoting Colin Ian King (2025-06-19 01:30:35)
>> Don't populate the read-only array div_idx on the stack at run time,
>> instead make it static const.
>
> Why? This is in __init code so it can be thrown away if it stays on the
> stack.
Indeed previous code could be discarded, now will be in rodata, but we
save several instructions runtime on copying it. Plus the actual binary
will be slower (really less code), so also loading it will be faster.
Best regards,
Krzysztof