diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2024-05-10 18:50:00 +0200 |
---|---|---|
committer | Bjorn Andersson <andersson@kernel.org> | 2024-05-27 11:45:04 -0500 |
commit | fcd9354ceb7ae52b11a93e8ac990ad4a8c3a0da7 (patch) | |
tree | d3b38027d8577c205d680eaadec06b6e1fe6457c /drivers/clk/qcom/gpucc-sm6375.c | |
parent | d85dc696ca60d04b499d8c3d44040ac54599a0d3 (diff) |
clk: qcom: Constify struct pll_vco
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@wanadoo.fr>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/c3c9a75ed77a5ef2e9b72081e88225d84bba91cd.1715359776.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Diffstat (limited to 'drivers/clk/qcom/gpucc-sm6375.c')
-rw-r--r-- | drivers/clk/qcom/gpucc-sm6375.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/qcom/gpucc-sm6375.c b/drivers/clk/qcom/gpucc-sm6375.c index da24276a018e..4e9a30a080d3 100644 --- a/drivers/clk/qcom/gpucc-sm6375.c +++ b/drivers/clk/qcom/gpucc-sm6375.c @@ -42,7 +42,7 @@ enum { P_GPU_CC_PLL1_OUT_ODD, }; -static struct pll_vco lucid_vco[] = { +static const struct pll_vco lucid_vco[] = { { 249600000, 2000000000, 0 }, }; |