@@ -45,11 +45,11 @@ enum {
P_SLEEP_CLK,
};
-static struct pll_vco lucid_vco[] = {
+static const struct pll_vco lucid_vco[] = {
{ 249600000, 1800000000, 0 },
};
-static struct pll_vco zonda_vco[] = {
+static const struct pll_vco zonda_vco[] = {
{ 595200000, 3600000000, 0 },
};
@@ -32,7 +32,7 @@ enum {
P_CAMCC_PLL3_OUT_MAIN,
};
-static struct pll_vco fabia_vco[] = {
+static const struct pll_vco fabia_vco[] = {
{ 249600000, 2000000000, 0 },
};
@@ -32,11 +32,11 @@ enum {
P_SLEEP_CLK,
};
-static struct pll_vco lucid_vco[] = {
+static const struct pll_vco lucid_vco[] = {
{ 249600000, 2000000000, 0 },
};
-static struct pll_vco zonda_vco[] = {
+static const struct pll_vco zonda_vco[] = {
{ 595200000UL, 3600000000UL, 0 },
};
@@ -28,7 +28,7 @@ enum {
P_GPLL0_OUT_MAIN,
};
-static struct pll_vco disp_cc_pll_vco[] = {
+static const struct pll_vco disp_cc_pll_vco[] = {
{ 500000000, 1000000000, 2 },
};
@@ -31,7 +31,7 @@ enum {
P_GCC_DISP_GPLL0_CLK,
};
-static struct pll_vco fabia_vco[] = {
+static const struct pll_vco fabia_vco[] = {
{ 249600000, 2000000000, 0 },
};
@@ -35,7 +35,7 @@ enum {
P_GCC_DISP_GPLL0_CLK,
};
-static struct pll_vco lucid_vco[] = {
+static const struct pll_vco lucid_vco[] = {
{ 249600000, 2000000000, 0 },
};
@@ -71,7 +71,7 @@ enum {
P_SLEEP_CLK,
};
-static struct pll_vco lucid_evo_vco[] = {
+static const struct pll_vco lucid_evo_vco[] = {
{ 249600000, 2000000000, 0 },
};
@@ -71,7 +71,7 @@ enum {
P_SLEEP_CLK,
};
-static struct pll_vco lucid_ole_vco[] = {
+static const struct pll_vco lucid_ole_vco[] = {
{ 249600000, 2000000000, 0 },
};
@@ -69,7 +69,7 @@ enum {
P_SLEEP_CLK,
};
-static struct pll_vco lucid_ole_vco[] = {
+static const struct pll_vco lucid_ole_vco[] = {
{ 249600000, 2100000000, 0 },
};
@@ -27,7 +27,7 @@
#define GCC_MMSS_MISC 0x0902C
#define GCC_GPU_MISC 0x71028
-static struct pll_vco fabia_vco[] = {
+static const struct pll_vco fabia_vco[] = {
{ 250000000, 2000000000, 0 },
{ 125000000, 1000000000, 1 },
};
@@ -39,7 +39,7 @@ enum {
P_SLEEP_CLK,
};
-static struct pll_vco trion_vco[] = {
+static const struct pll_vco trion_vco[] = {
{ 249600000, 2000000000, 0 },
};
@@ -42,15 +42,15 @@ enum {
P_SLEEP_CLK,
};
-static struct pll_vco default_vco[] = {
+static const struct pll_vco default_vco[] = {
{ 500000000, 1000000000, 2 },
};
-static struct pll_vco gpll9_vco[] = {
+static const struct pll_vco gpll9_vco[] = {
{ 500000000, 1250000000, 0 },
};
-static struct pll_vco gpll10_vco[] = {
+static const struct pll_vco gpll10_vco[] = {
{ 750000000, 1500000000, 1 },
};
@@ -50,11 +50,11 @@ enum {
P_SLEEP_CLK,
};
-static struct pll_vco lucid_vco[] = {
+static const struct pll_vco lucid_vco[] = {
{ 249600000, 2000000000, 0 },
};
-static struct pll_vco zonda_vco[] = {
+static const struct pll_vco zonda_vco[] = {
{ 595200000, 3600000000UL, 0 },
};
@@ -48,7 +48,7 @@ static struct clk_branch gpucc_cxo_clk = {
},
};
-static struct pll_vco fabia_vco[] = {
+static const struct pll_vco fabia_vco[] = {
{ 249600000, 2000000000, 0 },
{ 125000000, 1000000000, 1 },
};
@@ -51,7 +51,7 @@ static struct clk_branch gpucc_cxo_clk = {
},
};
-static struct pll_vco gpu_vco[] = {
+static const struct pll_vco gpu_vco[] = {
{ 1000000000, 2000000000, 0 },
{ 500000000, 1000000000, 2 },
{ 250000000, 500000000, 3 },
@@ -38,11 +38,11 @@ enum {
P_GPU_CC_PLL1_OUT_MAIN,
};
-static struct pll_vco default_vco[] = {
+static const struct pll_vco default_vco[] = {
{ 1000000000, 2000000000, 0 },
};
-static struct pll_vco pll1_vco[] = {
+static const struct pll_vco pll1_vco[] = {
{ 500000000, 1000000000, 2 },
};
@@ -36,7 +36,7 @@ enum {
P_GPU_CC_PLL1_OUT_AUX2,
};
-static struct pll_vco gpu_cc_pll_vco[] = {
+static const struct pll_vco gpu_cc_pll_vco[] = {
{ 1000000000, 2000000000, 0 },
{ 500000000, 1000000000, 2 },
};
@@ -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 },
};
@@ -32,7 +32,7 @@ enum {
P_GPU_CC_PLL1_OUT_MAIN,
};
-static struct pll_vco lucid_vco[] = {
+static const struct pll_vco lucid_vco[] = {
{ 249600000, 2000000000, 0 },
};
@@ -33,7 +33,7 @@ enum {
P_GPU_CC_PLL1_OUT_MAIN,
};
-static struct pll_vco lucid_5lpe_vco[] = {
+static const struct pll_vco lucid_5lpe_vco[] = {
{ 249600000, 1750000000, 0 },
};
@@ -36,7 +36,7 @@ enum {
P_GPU_CC_PLL1_OUT_MAIN,
};
-static struct pll_vco lucid_evo_vco[] = {
+static const struct pll_vco lucid_evo_vco[] = {
{ 249600000, 2000000000, 0 },
};
@@ -37,7 +37,7 @@ enum {
P_GPU_CC_PLL1_OUT_MAIN,
};
-static struct pll_vco lucid_ole_vco[] = {
+static const struct pll_vco lucid_ole_vco[] = {
{ 249600000, 2100000000, 0 },
};
@@ -27,7 +27,7 @@ enum {
P_SLEEP_CLK,
};
-static struct pll_vco fabia_vco[] = {
+static const struct pll_vco fabia_vco[] = {
{ 249600000, 2000000000, 0 },
};
@@ -84,14 +84,14 @@ static const struct clk_parent_data mmcc_xo_dsibyte[] = {
{ .fw_name = "dsi1pllbyte" },
};
-static struct pll_vco mmpll_p_vco[] = {
+static const struct pll_vco mmpll_p_vco[] = {
{ 250000000, 500000000, 3 },
{ 500000000, 1000000000, 2 },
{ 1000000000, 1500000000, 1 },
{ 1500000000, 2000000000, 0 },
};
-static struct pll_vco mmpll_t_vco[] = {
+static const struct pll_vco mmpll_t_vco[] = {
{ 500000000, 1500000000, 0 },
};
@@ -57,20 +57,20 @@ static struct clk_fixed_factor gpll0_div = {
},
};
-static struct pll_vco mmpll_p_vco[] = {
+static const struct pll_vco mmpll_p_vco[] = {
{ 250000000, 500000000, 3 },
{ 500000000, 1000000000, 2 },
{ 1000000000, 1500000000, 1 },
{ 1500000000, 2000000000, 0 },
};
-static struct pll_vco mmpll_gfx_vco[] = {
+static const struct pll_vco mmpll_gfx_vco[] = {
{ 400000000, 1000000000, 2 },
{ 1000000000, 1500000000, 1 },
{ 1500000000, 2000000000, 0 },
};
-static struct pll_vco mmpll_t_vco[] = {
+static const struct pll_vco mmpll_t_vco[] = {
{ 500000000, 1500000000, 0 },
};
@@ -96,14 +96,14 @@ static struct clk_alpha_pll mmpll6 = {
};
/* APSS controlled PLLs */
-static struct pll_vco vco[] = {
+static const struct pll_vco vco[] = {
{ 1000000000, 2000000000, 0 },
{ 750000000, 1500000000, 1 },
{ 500000000, 1000000000, 2 },
{ 250000000, 500000000, 3 },
};
-static struct pll_vco mmpll3_vco[] = {
+static const struct pll_vco mmpll3_vco[] = {
{ 750000000, 1500000000, 1 },
};
@@ -24,7 +24,7 @@ enum {
P_VIDEO_PLL0_OUT_MAIN,
};
-static struct pll_vco trion_vco[] = {
+static const struct pll_vco trion_vco[] = {
{ 249600000, 2000000000, 0 },
};
@@ -26,7 +26,7 @@ enum {
P_VIDEO_PLL1_OUT_MAIN,
};
-static struct pll_vco lucid_vco[] = {
+static const struct pll_vco lucid_vco[] = {
{ 249600000, 2000000000, 0 },
};
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> --- Compile tested only. I hope that it can be applied with this single patch because all files are in drivers/clk/qcom/. --- drivers/clk/qcom/camcc-sc8280xp.c | 4 ++-- drivers/clk/qcom/camcc-sm6350.c | 2 +- drivers/clk/qcom/camcc-sm8250.c | 4 ++-- drivers/clk/qcom/dispcc-sm6125.c | 2 +- drivers/clk/qcom/dispcc-sm6350.c | 2 +- drivers/clk/qcom/dispcc-sm6375.c | 2 +- drivers/clk/qcom/dispcc-sm8450.c | 2 +- drivers/clk/qcom/dispcc-sm8550.c | 2 +- drivers/clk/qcom/dispcc-sm8650.c | 2 +- drivers/clk/qcom/gcc-msm8998.c | 2 +- drivers/clk/qcom/gcc-sc8180x.c | 2 +- drivers/clk/qcom/gcc-sm6115.c | 6 +++--- drivers/clk/qcom/gcc-sm6375.c | 4 ++-- drivers/clk/qcom/gpucc-msm8998.c | 2 +- drivers/clk/qcom/gpucc-sdm660.c | 2 +- drivers/clk/qcom/gpucc-sm6115.c | 4 ++-- drivers/clk/qcom/gpucc-sm6125.c | 2 +- drivers/clk/qcom/gpucc-sm6375.c | 2 +- drivers/clk/qcom/gpucc-sm8250.c | 2 +- drivers/clk/qcom/gpucc-sm8350.c | 2 +- drivers/clk/qcom/gpucc-sm8450.c | 2 +- drivers/clk/qcom/gpucc-sm8650.c | 2 +- drivers/clk/qcom/lpasscorecc-sc7180.c | 2 +- drivers/clk/qcom/mmcc-msm8994.c | 4 ++-- drivers/clk/qcom/mmcc-msm8996.c | 6 +++--- drivers/clk/qcom/mmcc-sdm660.c | 4 ++-- drivers/clk/qcom/videocc-sm8150.c | 2 +- drivers/clk/qcom/videocc-sm8250.c | 2 +- 28 files changed, 38 insertions(+), 38 deletions(-)