[PATCH][next] clk: moxart: Make read-only array div_idx static const

Krzysztof Kozlowski krzk at kernel.org
Thu Jun 19 13:18:48 PDT 2025


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



More information about the linux-arm-kernel mailing list