Thread (5 messages) 5 messages, 3 authors, 2025-06-20

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

From: Krzysztof Kozlowski <krzk@kernel.org>
Date: 2025-06-19 20:18:52
Also in: kernel-janitors, linux-clk, lkml

On 19/06/2025 21:53, Stephen Boyd wrote:
Quoting Colin Ian King (2025-06-19 01:30:35)
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help