clk: qcom: Fix -Wunused-const-variable
Subsystems (3)
PATCH 1/1 clk: qcom: Fix -Wunused-const-variable
Clang produces the following warning
drivers/clk/qcom/gcc-msm8996.c:133:32: warning: unused variable 'gcc_xo_gpll0_gpll2_gpll3_gpll0_early_div_map' [-Wunused-const-variable] static const structparent_map gcc_xo_gpll0_gpll2_gpll3_gpll0_early_div_map[] =
{ ^drivers/clk/qcom/gcc-msm8996.c:141:27: warning: unused variable 'gcc_xo_gpll0_gpll2_gpll3_gpll0_early_div' [-Wunused-const-variable] static const char * const gcc_xo_gpll0_gpll2_gpll3_gpll0_early_div[] = { ^ drivers/clk/qcom/gcc-msm8996.c:187:32: warning: unused variable 'gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div_map' [-Wunused-const-variable] static const struct parent_map gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div_map[] = { ^ drivers/clk/qcom/gcc-msm8996.c:197:27: warning: unused variable 'gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div' [-Wunused-const-variable] static const char * const gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div[] = {
It looks like these were never used.
--- drivers/clk/qcom/gcc-msm8996.c | 36 ---------------------------------- 1 file changed, 36 deletions(-)
drivers/clk/qcom/gcc-msm8996.c +0 -36
@@ -130,22 +130,6 @@ static const char * const gcc_xo_gpll0_gpll4_gpll0_early_div[] = {"gpll0_early_div" }; -static const struct parent_map gcc_xo_gpll0_gpll2_gpll3_gpll0_early_div_map[] = { - {P_XO ,0 }, - {P_GPLL0 ,1 }, - {P_GPLL2 ,2 }, - {P_GPLL3 ,3 }, - {P_GPLL0_EARLY_DIV ,6 } -}; - -static const char *const gcc_xo_gpll0_gpll2_gpll3_gpll0_early_div[] = { -"xo" , -"gpll0" , -"gpll2" , -"gpll3" , -"gpll0_early_div" -}; -static const struct parent_map gcc_xo_gpll0_gpll1_early_div_gpll1_gpll4_gpll0_early_div_map[] = { {P_XO ,0 }, {P_GPLL0 ,1 },
@@ -184,26 +168,6 @@ static const char * const gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll2_early_gpll0_early"gpll0_early_div" }; -static const struct parent_map gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div_map[] = { - {P_XO ,0 }, - {P_GPLL0 ,1 }, - {P_GPLL2 ,2 }, - {P_GPLL3 ,3 }, - {P_GPLL1 ,4 }, - {P_GPLL4 ,5 }, - {P_GPLL0_EARLY_DIV ,6 } -}; - -static const char *const gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div[] = { -"xo" , -"gpll0" , -"gpll2" , -"gpll3" , -"gpll1" , -"gpll4" , -"gpll0_early_div" -}; -static struct clk_fixed_factor xo = { .mult =1 , .div =1 ,
Signature · 1 line
2.22.0.rc2.383.gf4fbbf30c2-goog
Quoted 18 lines · Nathan Huckleberry
Clang produces the following warning
drivers/clk/qcom/gcc-msm8996.c:133:32: warning: unused variable 'gcc_xo_gpll0_gpll2_gpll3_gpll0_early_div_map' [-Wunused-const-variable] static const structparent_mapgcc_xo_gpll0_gpll2_gpll3_gpll0_early_div_map[] =
{ ^drivers/clk/qcom/gcc-msm8996.c:141:27: warning: unused variable 'gcc_xo_gpll0_gpll2_gpll3_gpll0_early_div' [-Wunused-const-variable] static const char * const gcc_xo_gpll0_gpll2_gpll3_gpll0_early_div[] = { ^drivers/clk/qcom/gcc-msm8996.c:187:32: warning: unused variable 'gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div_map' [-Wunused-const-variable] static const structparent_mapgcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div_map[] = { ^drivers/clk/qcom/gcc-msm8996.c:197:27: warning: unused variable 'gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div' [-Wunused-const-variable] static const char * const gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div[] = {
Quoted 7 lines
It looks like these were never used.
Fixes b1e010c0730a ("clk: qcom: Add MSM8996 Global Clock Control (GCC) driver")Suggested-by Nathan Chancellor <[email protected]>Signed-off-by Nathan Huckleberry <[email protected]>
LGTM, this doesn't introduce any warnings/errors on arm32 or arm64 for me.
Quoted 61 lines
--- drivers/clk/qcom/gcc-msm8996.c | 36 ---------------------------------- 1 file changed, 36 deletions(-)drivers/clk/qcom/gcc-msm8996.c +0
-36@@ -130,22 +130,6 @@ static const char * const gcc_xo_gpll0_gpll4_gpll0_early_div[] = {"gpll0_early_div" }; -static const struct parent_map gcc_xo_gpll0_gpll2_gpll3_gpll0_early_div_map[] = { - {P_XO ,0 }, - {P_GPLL0 ,1 }, - {P_GPLL2 ,2 }, - {P_GPLL3 ,3 }, - {P_GPLL0_EARLY_DIV ,6 } -}; - -static const char *const gcc_xo_gpll0_gpll2_gpll3_gpll0_early_div[] = { -"xo" , -"gpll0" , -"gpll2" , -"gpll3" , -"gpll0_early_div" -}; -static const struct parent_map gcc_xo_gpll0_gpll1_early_div_gpll1_gpll4_gpll0_early_div_map[] = { {P_XO ,0 }, {P_GPLL0 ,1 },@@ -184,26 +168,6 @@ static const char * const gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll2_early_gpll0_early"gpll0_early_div" }; -static const struct parent_map gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div_map[] = { - {P_XO ,0 }, - {P_GPLL0 ,1 }, - {P_GPLL2 ,2 }, - {P_GPLL3 ,3 }, - {P_GPLL1 ,4 }, - {P_GPLL4 ,5 }, - {P_GPLL0_EARLY_DIV ,6 } -}; - -static const char *const gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div[] = { -"xo" , -"gpll0" , -"gpll2" , -"gpll3" , -"gpll1" , -"gpll4" , -"gpll0_early_div" -}; -static struct clk_fixed_factor xo = { .mult =1 , .div =1 ,Signature · 1 line
2.22.0.rc2.383.gf4fbbf30c2-goog
Quoting Nathan Huckleberry (2019-06-11 14:11:34)
Quoted 18 lines
Clang produces the following warning
drivers/clk/qcom/gcc-msm8996.c:133:32: warning: unused variable 'gcc_xo_gpll0_gpll2_gpll3_gpll0_early_div_map' [-Wunused-const-variable] static const structparent_mapgcc_xo_gpll0_gpll2_gpll3_gpll0_early_div_map[] =
{ ^drivers/clk/qcom/gcc-msm8996.c:141:27: warning: unused variable 'gcc_xo_gpll0_gpll2_gpll3_gpll0_early_div' [-Wunused-const-variable] static const char * const gcc_xo_gpll0_gpll2_gpll3_gpll0_early_div[] = { ^drivers/clk/qcom/gcc-msm8996.c:187:32: warning: unused variable 'gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div_map' [-Wunused-const-variable] static const structparent_mapgcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div_map[] = { ^drivers/clk/qcom/gcc-msm8996.c:197:27: warning: unused variable 'gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div' [-Wunused-const-variable] static const char * const gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div[] = {
Quoted 8 lines
It looks like these were never used.
Fixes b1e010c0730a ("clk: qcom: Add MSM8996 Global Clock Control (GCC) driver")Suggested-by Nathan Chancellor <[email protected]>Signed-off-by Nathan Huckleberry <[email protected]>---
Applied to clk-next