diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2024-07-14 15:01:58 +0200 |
---|---|---|
committer | Bjorn Andersson <andersson@kernel.org> | 2024-07-28 21:41:48 -0500 |
commit | da3c15ea05d8257c1987e527004e6331126e9451 (patch) | |
tree | 3bc17ca263b8458f288551cdd58314ae57207032 /drivers/clk/qcom/gcc-ipq8074.c | |
parent | 8400291e289ee6b2bf9779ff1c83a291501f017b (diff) |
clk: qcom: Constify struct freq_tbl
'struct freq_tbl' are not modified in these drivers.
Constifying this structure moves some data to a read-only section, so
increase overall security.
On a x86_64, with allmodconfig, as an example:
Before:
======
text data bss dec hex filename
7595 43696 0 51291 c85b drivers/clk/qcom/mmcc-apq8084.o
After:
=====
text data bss dec hex filename
9867 41424 0 51291 c85b drivers/clk/qcom/mmcc-apq8084.o
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/e8aee66fa83a4e65f7e855eb8bdbc91275d6994b.1720962107.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Diffstat (limited to 'drivers/clk/qcom/gcc-ipq8074.c')
-rw-r--r-- | drivers/clk/qcom/gcc-ipq8074.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clk/qcom/gcc-ipq8074.c b/drivers/clk/qcom/gcc-ipq8074.c index 32fd01ef469a..7258ba5c0900 100644 --- a/drivers/clk/qcom/gcc-ipq8074.c +++ b/drivers/clk/qcom/gcc-ipq8074.c @@ -1947,7 +1947,7 @@ static struct clk_regmap_div nss_port6_tx_div_clk_src = { }, }; -static struct freq_tbl ftbl_crypto_clk_src[] = { +static const struct freq_tbl ftbl_crypto_clk_src[] = { F(40000000, P_GPLL0_DIV2, 10, 0, 0), F(80000000, P_GPLL0, 10, 0, 0), F(100000000, P_GPLL0, 8, 0, 0), @@ -1968,7 +1968,7 @@ static struct clk_rcg2 crypto_clk_src = { }, }; -static struct freq_tbl ftbl_gp_clk_src[] = { +static const struct freq_tbl ftbl_gp_clk_src[] = { F(19200000, P_XO, 1, 0, 0), { } }; |