Commit fcd9354c authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Bjorn Andersson
Browse files

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: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: default avatarStephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/c3c9a75ed77a5ef2e9b72081e88225d84bba91cd.1715359776.git.christophe.jaillet@wanadoo.fr


Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
parent d85dc696
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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 },
};

+1 −1
Original line number Diff line number Diff line
@@ -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 },
};

+2 −2
Original line number Diff line number Diff line
@@ -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 },
};

+1 −1
Original line number Diff line number Diff line
@@ -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 },
};

+1 −1
Original line number Diff line number Diff line
@@ -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 },
};

Loading