clk: tegra: local arrays should be static
Subsystems (3)
PATCH 1/1 clk: tegra: local arrays should be static
cclk_g_parents, cclk_lp_parents and sclk_parents are only accessed from within clk-tegra30.c. Declare them static to avoid namespace polution.
--- drivers/clk/tegra/clk-tegra30.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)
drivers/clk/tegra/clk-tegra30.c +10 -10
@@ -1249,16 +1249,16 @@ static void __init tegra30_pmc_clk_init(void) } -const char *cclk_g_parents[] = {"clk_m" ,"pll_c" ,"clk_32k" ,"pll_m" , -"pll_p_cclkg" ,"pll_p_out4_cclkg" , -"pll_p_out3_cclkg" ,"unused" ,"pll_x" }; -const char *cclk_lp_parents[] = {"clk_m" ,"pll_c" ,"clk_32k" ,"pll_m" , -"pll_p_cclklp" ,"pll_p_out4_cclklp" , -"pll_p_out3_cclklp" ,"unused" ,"pll_x" , -"pll_x_out0" }; -const char *sclk_parents[] = {"clk_m" ,"pll_c_out1" ,"pll_p_out4" , -"pll_p_out3" ,"pll_p_out2" ,"unused" , -"clk_32k" ,"pll_m_out1" }; +static const char *cclk_g_parents[] = {"clk_m" ,"pll_c" ,"clk_32k" ,"pll_m" , +"pll_p_cclkg" ,"pll_p_out4_cclkg" , +"pll_p_out3_cclkg" ,"unused" ,"pll_x" }; +static const char *cclk_lp_parents[] = {"clk_m" ,"pll_c" ,"clk_32k" ,"pll_m" , +"pll_p_cclklp" ,"pll_p_out4_cclklp" , +"pll_p_out3_cclklp" ,"unused" ,"pll_x" , +"pll_x_out0" }; +static const char *sclk_parents[] = {"clk_m" ,"pll_c_out1" ,"pll_p_out4" , +"pll_p_out3" ,"pll_p_out2" ,"unused" , +"clk_32k" ,"pll_m_out1" };static void __init tegra30_super_clk_init (void ) {
Signature · 1 line
1.7.7.rc0.72.g4b5ea.dirty
Quoting Peter De Schrijver (2013-02-07 08:30:36)
Quoted 4 lines
cclk_g_parents,cclk_lp_parentsandsclk_parentsare only accessed from withinclk-tegra30.c. Declare them static to avoid namespace polution.Signed-off-by Peter De Schrijver <[email protected]>
Stephen Warren
AppliedQuoted 7 lines · Mike Turquette
Quoting Peter De Schrijver (2013-02-07 08:30:36)
Quoted 4 lines
cclk_g_parents,cclk_lp_parentsandsclk_parentsare only accessed from withinclk-tegra30.c. Declare them static to avoid namespace polution.Signed-off-by Peter De Schrijver <[email protected]>Acked-by Mike Turquette <[email protected]>
I've applied this to Tegra's for-3.9/soc-ccf-fixes branch.
Quoted 4 lines · Peter De Schrijver
cclk_g_parents,cclk_lp_parentsandsclk_parentsare only accessed from withinclk-tegra30.c. Declare them static to avoid namespace polution.Signed-off-by Peter De Schrijver <[email protected]>
Quoted 35 lines
--- drivers/clk/tegra/clk-tegra30.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)drivers/clk/tegra/clk-tegra30.c +10
-10@@ -1249,16 +1249,16 @@ static void __init tegra30_pmc_clk_init(void) } -const char *cclk_g_parents[] = {"clk_m" ,"pll_c" ,"clk_32k" ,"pll_m" , -"pll_p_cclkg" ,"pll_p_out4_cclkg" , -"pll_p_out3_cclkg" ,"unused" ,"pll_x" }; -const char *cclk_lp_parents[] = {"clk_m" ,"pll_c" ,"clk_32k" ,"pll_m" , -"pll_p_cclklp" ,"pll_p_out4_cclklp" , -"pll_p_out3_cclklp" ,"unused" ,"pll_x" , -"pll_x_out0" }; -const char *sclk_parents[] = {"clk_m" ,"pll_c_out1" ,"pll_p_out4" , -"pll_p_out3" ,"pll_p_out2" ,"unused" , -"clk_32k" ,"pll_m_out1" }; +static const char *cclk_g_parents[] = {"clk_m" ,"pll_c" ,"clk_32k" ,"pll_m" , +"pll_p_cclkg" ,"pll_p_out4_cclkg" , +"pll_p_out3_cclkg" ,"unused" ,"pll_x" }; +static const char *cclk_lp_parents[] = {"clk_m" ,"pll_c" ,"clk_32k" ,"pll_m" , +"pll_p_cclklp" ,"pll_p_out4_cclklp" , +"pll_p_out3_cclklp" ,"unused" ,"pll_x" , +"pll_x_out0" }; +static const char *sclk_parents[] = {"clk_m" ,"pll_c_out1" ,"pll_p_out4" , +"pll_p_out3" ,"pll_p_out2" ,"unused" , +"clk_32k" ,"pll_m_out1" };static void __init tegra30_super_clk_init (void ) {