Re: [PATCH] clk: qcom: Constify struct pll_vco
From: Stephen Boyd
Date: Fri May 10 2024 - 16:14:47 EST
Quoting Christophe JAILLET (2024-05-10 09:50:00)
> pll_vco structure are never modified. They are used as .vco_table in
> "struct clk_alpha_pll".
>
> And in this structure, we have:
> const struct pll_vco *vco_table;
>
> Constifying these structures moves some data to a read-only section, so
> increase overall security.
>
> On a x86_64, with allmodconfig:
> Before:
> text data bss dec hex filename
> 9905 47576 0 57481 e089 drivers/clk/qcom/mmcc-msm8994.o
>
> After:
> text data bss dec hex filename
> 10033 47440 0 57473 e081 drivers/clk/qcom/mmcc-msm8994.o
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
> ---
Acked-by: Stephen Boyd <sboyd@xxxxxxxxxx>