Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Christophe JAILLET and committed by
Bjorn Andersson
fcd9354c d85dc696

+38 -38
+2 -2
drivers/clk/qcom/camcc-sc8280xp.c
··· 45 45 P_SLEEP_CLK, 46 46 }; 47 47 48 - static struct pll_vco lucid_vco[] = { 48 + static const struct pll_vco lucid_vco[] = { 49 49 { 249600000, 1800000000, 0 }, 50 50 }; 51 51 52 - static struct pll_vco zonda_vco[] = { 52 + static const struct pll_vco zonda_vco[] = { 53 53 { 595200000, 3600000000, 0 }, 54 54 }; 55 55
+1 -1
drivers/clk/qcom/camcc-sm6350.c
··· 32 32 P_CAMCC_PLL3_OUT_MAIN, 33 33 }; 34 34 35 - static struct pll_vco fabia_vco[] = { 35 + static const struct pll_vco fabia_vco[] = { 36 36 { 249600000, 2000000000, 0 }, 37 37 }; 38 38
+2 -2
drivers/clk/qcom/camcc-sm8250.c
··· 32 32 P_SLEEP_CLK, 33 33 }; 34 34 35 - static struct pll_vco lucid_vco[] = { 35 + static const struct pll_vco lucid_vco[] = { 36 36 { 249600000, 2000000000, 0 }, 37 37 }; 38 38 39 - static struct pll_vco zonda_vco[] = { 39 + static const struct pll_vco zonda_vco[] = { 40 40 { 595200000UL, 3600000000UL, 0 }, 41 41 }; 42 42
+1 -1
drivers/clk/qcom/dispcc-sm6125.c
··· 28 28 P_GPLL0_OUT_MAIN, 29 29 }; 30 30 31 - static struct pll_vco disp_cc_pll_vco[] = { 31 + static const struct pll_vco disp_cc_pll_vco[] = { 32 32 { 500000000, 1000000000, 2 }, 33 33 }; 34 34
+1 -1
drivers/clk/qcom/dispcc-sm6350.c
··· 31 31 P_GCC_DISP_GPLL0_CLK, 32 32 }; 33 33 34 - static struct pll_vco fabia_vco[] = { 34 + static const struct pll_vco fabia_vco[] = { 35 35 { 249600000, 2000000000, 0 }, 36 36 }; 37 37
+1 -1
drivers/clk/qcom/dispcc-sm6375.c
··· 35 35 P_GCC_DISP_GPLL0_CLK, 36 36 }; 37 37 38 - static struct pll_vco lucid_vco[] = { 38 + static const struct pll_vco lucid_vco[] = { 39 39 { 249600000, 2000000000, 0 }, 40 40 }; 41 41
+1 -1
drivers/clk/qcom/dispcc-sm8450.c
··· 71 71 P_SLEEP_CLK, 72 72 }; 73 73 74 - static struct pll_vco lucid_evo_vco[] = { 74 + static const struct pll_vco lucid_evo_vco[] = { 75 75 { 249600000, 2000000000, 0 }, 76 76 }; 77 77
+1 -1
drivers/clk/qcom/dispcc-sm8550.c
··· 71 71 P_SLEEP_CLK, 72 72 }; 73 73 74 - static struct pll_vco lucid_ole_vco[] = { 74 + static const struct pll_vco lucid_ole_vco[] = { 75 75 { 249600000, 2000000000, 0 }, 76 76 }; 77 77
+1 -1
drivers/clk/qcom/dispcc-sm8650.c
··· 69 69 P_SLEEP_CLK, 70 70 }; 71 71 72 - static struct pll_vco lucid_ole_vco[] = { 72 + static const struct pll_vco lucid_ole_vco[] = { 73 73 { 249600000, 2100000000, 0 }, 74 74 }; 75 75
+1 -1
drivers/clk/qcom/gcc-msm8998.c
··· 27 27 #define GCC_MMSS_MISC 0x0902C 28 28 #define GCC_GPU_MISC 0x71028 29 29 30 - static struct pll_vco fabia_vco[] = { 30 + static const struct pll_vco fabia_vco[] = { 31 31 { 250000000, 2000000000, 0 }, 32 32 { 125000000, 1000000000, 1 }, 33 33 };
+1 -1
drivers/clk/qcom/gcc-sc8180x.c
··· 39 39 P_SLEEP_CLK, 40 40 }; 41 41 42 - static struct pll_vco trion_vco[] = { 42 + static const struct pll_vco trion_vco[] = { 43 43 { 249600000, 2000000000, 0 }, 44 44 }; 45 45
+3 -3
drivers/clk/qcom/gcc-sm6115.c
··· 42 42 P_SLEEP_CLK, 43 43 }; 44 44 45 - static struct pll_vco default_vco[] = { 45 + static const struct pll_vco default_vco[] = { 46 46 { 500000000, 1000000000, 2 }, 47 47 }; 48 48 49 - static struct pll_vco gpll9_vco[] = { 49 + static const struct pll_vco gpll9_vco[] = { 50 50 { 500000000, 1250000000, 0 }, 51 51 }; 52 52 53 - static struct pll_vco gpll10_vco[] = { 53 + static const struct pll_vco gpll10_vco[] = { 54 54 { 750000000, 1500000000, 1 }, 55 55 }; 56 56
+2 -2
drivers/clk/qcom/gcc-sm6375.c
··· 50 50 P_SLEEP_CLK, 51 51 }; 52 52 53 - static struct pll_vco lucid_vco[] = { 53 + static const struct pll_vco lucid_vco[] = { 54 54 { 249600000, 2000000000, 0 }, 55 55 }; 56 56 57 - static struct pll_vco zonda_vco[] = { 57 + static const struct pll_vco zonda_vco[] = { 58 58 { 595200000, 3600000000UL, 0 }, 59 59 }; 60 60
+1 -1
drivers/clk/qcom/gpucc-msm8998.c
··· 48 48 }, 49 49 }; 50 50 51 - static struct pll_vco fabia_vco[] = { 51 + static const struct pll_vco fabia_vco[] = { 52 52 { 249600000, 2000000000, 0 }, 53 53 { 125000000, 1000000000, 1 }, 54 54 };
+1 -1
drivers/clk/qcom/gpucc-sdm660.c
··· 51 51 }, 52 52 }; 53 53 54 - static struct pll_vco gpu_vco[] = { 54 + static const struct pll_vco gpu_vco[] = { 55 55 { 1000000000, 2000000000, 0 }, 56 56 { 500000000, 1000000000, 2 }, 57 57 { 250000000, 500000000, 3 },
+2 -2
drivers/clk/qcom/gpucc-sm6115.c
··· 38 38 P_GPU_CC_PLL1_OUT_MAIN, 39 39 }; 40 40 41 - static struct pll_vco default_vco[] = { 41 + static const struct pll_vco default_vco[] = { 42 42 { 1000000000, 2000000000, 0 }, 43 43 }; 44 44 45 - static struct pll_vco pll1_vco[] = { 45 + static const struct pll_vco pll1_vco[] = { 46 46 { 500000000, 1000000000, 2 }, 47 47 }; 48 48
+1 -1
drivers/clk/qcom/gpucc-sm6125.c
··· 36 36 P_GPU_CC_PLL1_OUT_AUX2, 37 37 }; 38 38 39 - static struct pll_vco gpu_cc_pll_vco[] = { 39 + static const struct pll_vco gpu_cc_pll_vco[] = { 40 40 { 1000000000, 2000000000, 0 }, 41 41 { 500000000, 1000000000, 2 }, 42 42 };
+1 -1
drivers/clk/qcom/gpucc-sm6375.c
··· 42 42 P_GPU_CC_PLL1_OUT_ODD, 43 43 }; 44 44 45 - static struct pll_vco lucid_vco[] = { 45 + static const struct pll_vco lucid_vco[] = { 46 46 { 249600000, 2000000000, 0 }, 47 47 }; 48 48
+1 -1
drivers/clk/qcom/gpucc-sm8250.c
··· 32 32 P_GPU_CC_PLL1_OUT_MAIN, 33 33 }; 34 34 35 - static struct pll_vco lucid_vco[] = { 35 + static const struct pll_vco lucid_vco[] = { 36 36 { 249600000, 2000000000, 0 }, 37 37 }; 38 38
+1 -1
drivers/clk/qcom/gpucc-sm8350.c
··· 33 33 P_GPU_CC_PLL1_OUT_MAIN, 34 34 }; 35 35 36 - static struct pll_vco lucid_5lpe_vco[] = { 36 + static const struct pll_vco lucid_5lpe_vco[] = { 37 37 { 249600000, 1750000000, 0 }, 38 38 }; 39 39
+1 -1
drivers/clk/qcom/gpucc-sm8450.c
··· 36 36 P_GPU_CC_PLL1_OUT_MAIN, 37 37 }; 38 38 39 - static struct pll_vco lucid_evo_vco[] = { 39 + static const struct pll_vco lucid_evo_vco[] = { 40 40 { 249600000, 2000000000, 0 }, 41 41 }; 42 42
+1 -1
drivers/clk/qcom/gpucc-sm8650.c
··· 37 37 P_GPU_CC_PLL1_OUT_MAIN, 38 38 }; 39 39 40 - static struct pll_vco lucid_ole_vco[] = { 40 + static const struct pll_vco lucid_ole_vco[] = { 41 41 { 249600000, 2100000000, 0 }, 42 42 }; 43 43
+1 -1
drivers/clk/qcom/lpasscorecc-sc7180.c
··· 27 27 P_SLEEP_CLK, 28 28 }; 29 29 30 - static struct pll_vco fabia_vco[] = { 30 + static const struct pll_vco fabia_vco[] = { 31 31 { 249600000, 2000000000, 0 }, 32 32 }; 33 33
+2 -2
drivers/clk/qcom/mmcc-msm8994.c
··· 84 84 { .fw_name = "dsi1pllbyte" }, 85 85 }; 86 86 87 - static struct pll_vco mmpll_p_vco[] = { 87 + static const struct pll_vco mmpll_p_vco[] = { 88 88 { 250000000, 500000000, 3 }, 89 89 { 500000000, 1000000000, 2 }, 90 90 { 1000000000, 1500000000, 1 }, 91 91 { 1500000000, 2000000000, 0 }, 92 92 }; 93 93 94 - static struct pll_vco mmpll_t_vco[] = { 94 + static const struct pll_vco mmpll_t_vco[] = { 95 95 { 500000000, 1500000000, 0 }, 96 96 }; 97 97
+3 -3
drivers/clk/qcom/mmcc-msm8996.c
··· 57 57 }, 58 58 }; 59 59 60 - static struct pll_vco mmpll_p_vco[] = { 60 + static const struct pll_vco mmpll_p_vco[] = { 61 61 { 250000000, 500000000, 3 }, 62 62 { 500000000, 1000000000, 2 }, 63 63 { 1000000000, 1500000000, 1 }, 64 64 { 1500000000, 2000000000, 0 }, 65 65 }; 66 66 67 - static struct pll_vco mmpll_gfx_vco[] = { 67 + static const struct pll_vco mmpll_gfx_vco[] = { 68 68 { 400000000, 1000000000, 2 }, 69 69 { 1000000000, 1500000000, 1 }, 70 70 { 1500000000, 2000000000, 0 }, 71 71 }; 72 72 73 - static struct pll_vco mmpll_t_vco[] = { 73 + static const struct pll_vco mmpll_t_vco[] = { 74 74 { 500000000, 1500000000, 0 }, 75 75 }; 76 76
+2 -2
drivers/clk/qcom/mmcc-sdm660.c
··· 96 96 }; 97 97 98 98 /* APSS controlled PLLs */ 99 - static struct pll_vco vco[] = { 99 + static const struct pll_vco vco[] = { 100 100 { 1000000000, 2000000000, 0 }, 101 101 { 750000000, 1500000000, 1 }, 102 102 { 500000000, 1000000000, 2 }, 103 103 { 250000000, 500000000, 3 }, 104 104 }; 105 105 106 - static struct pll_vco mmpll3_vco[] = { 106 + static const struct pll_vco mmpll3_vco[] = { 107 107 { 750000000, 1500000000, 1 }, 108 108 }; 109 109
+1 -1
drivers/clk/qcom/videocc-sm8150.c
··· 24 24 P_VIDEO_PLL0_OUT_MAIN, 25 25 }; 26 26 27 - static struct pll_vco trion_vco[] = { 27 + static const struct pll_vco trion_vco[] = { 28 28 { 249600000, 2000000000, 0 }, 29 29 }; 30 30
+1 -1
drivers/clk/qcom/videocc-sm8250.c
··· 26 26 P_VIDEO_PLL1_OUT_MAIN, 27 27 }; 28 28 29 - static struct pll_vco lucid_vco[] = { 29 + static const struct pll_vco lucid_vco[] = { 30 30 { 249600000, 2000000000, 0 }, 31 31 }; 32 32