diff mbox series

[18/21] clk: qcom: clk-rpm: Remove a bunch of superfluous code

Message ID 20210126124540.3320214-19-lee.jones@linaro.org
State Accepted
Commit 3e6bd158c1da378d66315ae62114d7284785d2ec
Headers show
Series None | expand

Commit Message

Lee Jones Jan. 26, 2021, 12:45 p.m. UTC
Fixes the following W=1 kernel build warning(s):

 drivers/clk/qcom/clk-rpm.c:453:29: warning: ‘clk_rpm_branch_ops’ defined but not used [-Wunused-const-variable=]

Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-clk@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>

---
 drivers/clk/qcom/clk-rpm.c | 63 --------------------------------------
 1 file changed, 63 deletions(-)

-- 
2.25.1

Comments

Bjorn Andersson Jan. 26, 2021, 2:04 p.m. UTC | #1
On Tue 26 Jan 06:45 CST 2021, Lee Jones wrote:

> Fixes the following W=1 kernel build warning(s):

> 

>  drivers/clk/qcom/clk-rpm.c:453:29: warning: ‘clk_rpm_branch_ops’ defined but not used [-Wunused-const-variable=]

> 

> Cc: Andy Gross <agross@kernel.org>

> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>

> Cc: Michael Turquette <mturquette@baylibre.com>

> Cc: Stephen Boyd <sboyd@kernel.org>

> Cc: linux-arm-msm@vger.kernel.org

> Cc: linux-clk@vger.kernel.org


Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>


> Signed-off-by: Lee Jones <lee.jones@linaro.org>

> ---

>  drivers/clk/qcom/clk-rpm.c | 63 --------------------------------------

>  1 file changed, 63 deletions(-)

> 

> diff --git a/drivers/clk/qcom/clk-rpm.c b/drivers/clk/qcom/clk-rpm.c

> index f71d228fd6bd5..a18811c380187 100644

> --- a/drivers/clk/qcom/clk-rpm.c

> +++ b/drivers/clk/qcom/clk-rpm.c

> @@ -73,62 +73,6 @@

>  		},							      \

>  	}

>  

> -#define DEFINE_CLK_RPM_PXO_BRANCH(_platform, _name, _active, r_id, r)	      \

> -	static struct clk_rpm _platform##_##_active;			      \

> -	static struct clk_rpm _platform##_##_name = {			      \

> -		.rpm_clk_id = (r_id),					      \

> -		.active_only = true,					      \

> -		.peer = &_platform##_##_active,				      \

> -		.rate = (r),						      \

> -		.branch = true,						      \

> -		.hw.init = &(struct clk_init_data){			      \

> -			.ops = &clk_rpm_branch_ops,			      \

> -			.name = #_name,					      \

> -			.parent_names = (const char *[]){ "pxo_board" },      \

> -			.num_parents = 1,				      \

> -		},							      \

> -	};								      \

> -	static struct clk_rpm _platform##_##_active = {			      \

> -		.rpm_clk_id = (r_id),					      \

> -		.peer = &_platform##_##_name,				      \

> -		.rate = (r),						      \

> -		.branch = true,						      \

> -		.hw.init = &(struct clk_init_data){			      \

> -			.ops = &clk_rpm_branch_ops,			      \

> -			.name = #_active,				      \

> -			.parent_names = (const char *[]){ "pxo_board" },      \

> -			.num_parents = 1,				      \

> -		},							      \

> -	}

> -

> -#define DEFINE_CLK_RPM_CXO_BRANCH(_platform, _name, _active, r_id, r)	      \

> -	static struct clk_rpm _platform##_##_active;			      \

> -	static struct clk_rpm _platform##_##_name = {			      \

> -		.rpm_clk_id = (r_id),					      \

> -		.peer = &_platform##_##_active,				      \

> -		.rate = (r),						      \

> -		.branch = true,						      \

> -		.hw.init = &(struct clk_init_data){			      \

> -			.ops = &clk_rpm_branch_ops,			      \

> -			.name = #_name,					      \

> -			.parent_names = (const char *[]){ "cxo_board" },      \

> -			.num_parents = 1,				      \

> -		},							      \

> -	};								      \

> -	static struct clk_rpm _platform##_##_active = {			      \

> -		.rpm_clk_id = (r_id),					      \

> -		.active_only = true,					      \

> -		.peer = &_platform##_##_name,				      \

> -		.rate = (r),						      \

> -		.branch = true,						      \

> -		.hw.init = &(struct clk_init_data){			      \

> -			.ops = &clk_rpm_branch_ops,			      \

> -			.name = #_active,				      \

> -			.parent_names = (const char *[]){ "cxo_board" },      \

> -			.num_parents = 1,				      \

> -		},							      \

> -	}

> -

>  #define to_clk_rpm(_hw) container_of(_hw, struct clk_rpm, hw)

>  

>  struct rpm_cc;

> @@ -450,13 +394,6 @@ static const struct clk_ops clk_rpm_ops = {

>  	.recalc_rate	= clk_rpm_recalc_rate,

>  };

>  

> -static const struct clk_ops clk_rpm_branch_ops = {

> -	.prepare	= clk_rpm_prepare,

> -	.unprepare	= clk_rpm_unprepare,

> -	.round_rate	= clk_rpm_round_rate,

> -	.recalc_rate	= clk_rpm_recalc_rate,

> -};

> -

>  /* MSM8660/APQ8060 */

>  DEFINE_CLK_RPM(msm8660, afab_clk, afab_a_clk, QCOM_RPM_APPS_FABRIC_CLK);

>  DEFINE_CLK_RPM(msm8660, sfab_clk, sfab_a_clk, QCOM_RPM_SYS_FABRIC_CLK);

> -- 

> 2.25.1

>
Stephen Boyd Feb. 11, 2021, 7:57 p.m. UTC | #2
Quoting Lee Jones (2021-01-26 04:45:37)
> Fixes the following W=1 kernel build warning(s):

> 

>  drivers/clk/qcom/clk-rpm.c:453:29: warning: ‘clk_rpm_branch_ops’ defined but not used [-Wunused-const-variable=]

> 

> Cc: Andy Gross <agross@kernel.org>

> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>

> Cc: Michael Turquette <mturquette@baylibre.com>

> Cc: Stephen Boyd <sboyd@kernel.org>

> Cc: linux-arm-msm@vger.kernel.org

> Cc: linux-clk@vger.kernel.org

> Signed-off-by: Lee Jones <lee.jones@linaro.org>

> ---


This has been rejected before but OK

Applied to clk-next
diff mbox series

Patch

diff --git a/drivers/clk/qcom/clk-rpm.c b/drivers/clk/qcom/clk-rpm.c
index f71d228fd6bd5..a18811c380187 100644
--- a/drivers/clk/qcom/clk-rpm.c
+++ b/drivers/clk/qcom/clk-rpm.c
@@ -73,62 +73,6 @@ 
 		},							      \
 	}
 
-#define DEFINE_CLK_RPM_PXO_BRANCH(_platform, _name, _active, r_id, r)	      \
-	static struct clk_rpm _platform##_##_active;			      \
-	static struct clk_rpm _platform##_##_name = {			      \
-		.rpm_clk_id = (r_id),					      \
-		.active_only = true,					      \
-		.peer = &_platform##_##_active,				      \
-		.rate = (r),						      \
-		.branch = true,						      \
-		.hw.init = &(struct clk_init_data){			      \
-			.ops = &clk_rpm_branch_ops,			      \
-			.name = #_name,					      \
-			.parent_names = (const char *[]){ "pxo_board" },      \
-			.num_parents = 1,				      \
-		},							      \
-	};								      \
-	static struct clk_rpm _platform##_##_active = {			      \
-		.rpm_clk_id = (r_id),					      \
-		.peer = &_platform##_##_name,				      \
-		.rate = (r),						      \
-		.branch = true,						      \
-		.hw.init = &(struct clk_init_data){			      \
-			.ops = &clk_rpm_branch_ops,			      \
-			.name = #_active,				      \
-			.parent_names = (const char *[]){ "pxo_board" },      \
-			.num_parents = 1,				      \
-		},							      \
-	}
-
-#define DEFINE_CLK_RPM_CXO_BRANCH(_platform, _name, _active, r_id, r)	      \
-	static struct clk_rpm _platform##_##_active;			      \
-	static struct clk_rpm _platform##_##_name = {			      \
-		.rpm_clk_id = (r_id),					      \
-		.peer = &_platform##_##_active,				      \
-		.rate = (r),						      \
-		.branch = true,						      \
-		.hw.init = &(struct clk_init_data){			      \
-			.ops = &clk_rpm_branch_ops,			      \
-			.name = #_name,					      \
-			.parent_names = (const char *[]){ "cxo_board" },      \
-			.num_parents = 1,				      \
-		},							      \
-	};								      \
-	static struct clk_rpm _platform##_##_active = {			      \
-		.rpm_clk_id = (r_id),					      \
-		.active_only = true,					      \
-		.peer = &_platform##_##_name,				      \
-		.rate = (r),						      \
-		.branch = true,						      \
-		.hw.init = &(struct clk_init_data){			      \
-			.ops = &clk_rpm_branch_ops,			      \
-			.name = #_active,				      \
-			.parent_names = (const char *[]){ "cxo_board" },      \
-			.num_parents = 1,				      \
-		},							      \
-	}
-
 #define to_clk_rpm(_hw) container_of(_hw, struct clk_rpm, hw)
 
 struct rpm_cc;
@@ -450,13 +394,6 @@  static const struct clk_ops clk_rpm_ops = {
 	.recalc_rate	= clk_rpm_recalc_rate,
 };
 
-static const struct clk_ops clk_rpm_branch_ops = {
-	.prepare	= clk_rpm_prepare,
-	.unprepare	= clk_rpm_unprepare,
-	.round_rate	= clk_rpm_round_rate,
-	.recalc_rate	= clk_rpm_recalc_rate,
-};
-
 /* MSM8660/APQ8060 */
 DEFINE_CLK_RPM(msm8660, afab_clk, afab_a_clk, QCOM_RPM_APPS_FABRIC_CLK);
 DEFINE_CLK_RPM(msm8660, sfab_clk, sfab_a_clk, QCOM_RPM_SYS_FABRIC_CLK);