2020-09-11 01:44:26

by Jason Yan

[permalink] [raw]
Subject: [PATCH] clk: qcom: gcc-msm8939: remove defined but not used variables

This addresses the following gcc warning with "make W=1":

drivers/clk/qcom/gcc-msm8939.c:610:32: warning:
‘gcc_xo_gpll6_gpll0a_map’ defined but not used
[-Wunused-const-variable=]
static const struct parent_map gcc_xo_gpll6_gpll0a_map[] = {
^~~~~~~~~~~~~~~~~~~~~~~
drivers/clk/qcom/gcc-msm8939.c:598:32: warning: ‘gcc_xo_gpll6_gpll0_map’
defined but not used [-Wunused-const-variable=]
static const struct parent_map gcc_xo_gpll6_gpll0_map[] = {
^~~~~~~~~~~~~~~~~~~~~~

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Jason Yan <[email protected]>
---
drivers/clk/qcom/gcc-msm8939.c | 12 ------------
1 file changed, 12 deletions(-)

diff --git a/drivers/clk/qcom/gcc-msm8939.c b/drivers/clk/qcom/gcc-msm8939.c
index 778354f82b1e..39ebb443ae3d 100644
--- a/drivers/clk/qcom/gcc-msm8939.c
+++ b/drivers/clk/qcom/gcc-msm8939.c
@@ -595,24 +595,12 @@ static const struct clk_parent_data gcc_xo_gpll1_emclk_sleep_parent_data[] = {
{ .fw_name = "sleep_clk", .name = "sleep_clk" },
};

-static const struct parent_map gcc_xo_gpll6_gpll0_map[] = {
- { P_XO, 0 },
- { P_GPLL6, 1 },
- { P_GPLL0, 2 },
-};
-
static const struct clk_parent_data gcc_xo_gpll6_gpll0_parent_data[] = {
{ .fw_name = "xo" },
{ .hw = &gpll6_vote.hw },
{ .hw = &gpll0_vote.hw },
};

-static const struct parent_map gcc_xo_gpll6_gpll0a_map[] = {
- { P_XO, 0 },
- { P_GPLL6, 1 },
- { P_GPLL0_AUX, 2 },
-};
-
static const struct clk_parent_data gcc_xo_gpll6_gpll0a_parent_data[] = {
{ .fw_name = "xo" },
{ .hw = &gpll6_vote.hw },
--
2.25.4


2020-09-13 04:03:00

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH] clk: qcom: gcc-msm8939: remove defined but not used variables

On Thu 10 Sep 20:37 CDT 2020, Jason Yan wrote:

> This addresses the following gcc warning with "make W=1":
>
> drivers/clk/qcom/gcc-msm8939.c:610:32: warning:
> ?gcc_xo_gpll6_gpll0a_map? defined but not used
> [-Wunused-const-variable=]
> static const struct parent_map gcc_xo_gpll6_gpll0a_map[] = {
> ^~~~~~~~~~~~~~~~~~~~~~~
> drivers/clk/qcom/gcc-msm8939.c:598:32: warning: ?gcc_xo_gpll6_gpll0_map?
> defined but not used [-Wunused-const-variable=]
> static const struct parent_map gcc_xo_gpll6_gpll0_map[] = {
> ^~~~~~~~~~~~~~~~~~~~~~
>

Reviewed-by: Bjorn Andersson <[email protected]>

> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Jason Yan <[email protected]>
> ---
> drivers/clk/qcom/gcc-msm8939.c | 12 ------------
> 1 file changed, 12 deletions(-)
>
> diff --git a/drivers/clk/qcom/gcc-msm8939.c b/drivers/clk/qcom/gcc-msm8939.c
> index 778354f82b1e..39ebb443ae3d 100644
> --- a/drivers/clk/qcom/gcc-msm8939.c
> +++ b/drivers/clk/qcom/gcc-msm8939.c
> @@ -595,24 +595,12 @@ static const struct clk_parent_data gcc_xo_gpll1_emclk_sleep_parent_data[] = {
> { .fw_name = "sleep_clk", .name = "sleep_clk" },
> };
>
> -static const struct parent_map gcc_xo_gpll6_gpll0_map[] = {
> - { P_XO, 0 },
> - { P_GPLL6, 1 },
> - { P_GPLL0, 2 },
> -};
> -
> static const struct clk_parent_data gcc_xo_gpll6_gpll0_parent_data[] = {
> { .fw_name = "xo" },
> { .hw = &gpll6_vote.hw },
> { .hw = &gpll0_vote.hw },
> };
>
> -static const struct parent_map gcc_xo_gpll6_gpll0a_map[] = {
> - { P_XO, 0 },
> - { P_GPLL6, 1 },
> - { P_GPLL0_AUX, 2 },
> -};
> -
> static const struct clk_parent_data gcc_xo_gpll6_gpll0a_parent_data[] = {
> { .fw_name = "xo" },
> { .hw = &gpll6_vote.hw },
> --
> 2.25.4
>

2020-09-22 18:54:26

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH] clk: qcom: gcc-msm8939: remove defined but not used variables

Quoting Jason Yan (2020-09-10 18:37:22)
> This addresses the following gcc warning with "make W=1":
>
> drivers/clk/qcom/gcc-msm8939.c:610:32: warning:
> ‘gcc_xo_gpll6_gpll0a_map’ defined but not used
> [-Wunused-const-variable=]
> static const struct parent_map gcc_xo_gpll6_gpll0a_map[] = {
> ^~~~~~~~~~~~~~~~~~~~~~~
> drivers/clk/qcom/gcc-msm8939.c:598:32: warning: ‘gcc_xo_gpll6_gpll0_map’
> defined but not used [-Wunused-const-variable=]
> static const struct parent_map gcc_xo_gpll6_gpll0_map[] = {
> ^~~~~~~~~~~~~~~~~~~~~~
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Jason Yan <[email protected]>
> ---

Applied to clk-next