diff mbox series

[06/20] clk: sifive: fu540-prci: Declare static const variable 'prci_clk_fu540' where it's used

Message ID 20210120093040.1719407-7-lee.jones@linaro.org (mailing list archive)
State Accepted, archived
Headers show
Series Rid W=1 warnings from Clock | expand

Commit Message

Lee Jones Jan. 20, 2021, 9:30 a.m. UTC
Fixes the following W=1 kernel build warning(s):

 drivers/clk/sifive/fu540-prci.h:16:35: warning: ‘prci_clk_fu540’ defined but not used [-Wunused-const-variable=]
 drivers/clk/sifive/fu540-prci.h:16:35: warning: ‘prci_clk_fu540’ defined but not used [-Wunused-const-variable=]

Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Pragnesh Patel <Pragnesh.patel@sifive.com>
Cc: Zong Li <zong.li@sifive.com>
Cc: linux-clk@vger.kernel.org
Cc: linux-riscv@lists.infradead.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/clk/sifive/fu540-prci.h  | 5 -----
 drivers/clk/sifive/sifive-prci.c | 5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)

Comments

Palmer Dabbelt Jan. 23, 2021, 4:07 a.m. UTC | #1
On Wed, 20 Jan 2021 01:30:26 PST (-0800), lee.jones@linaro.org wrote:
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/clk/sifive/fu540-prci.h:16:35: warning: ‘prci_clk_fu540’ defined but not used [-Wunused-const-variable=]
>  drivers/clk/sifive/fu540-prci.h:16:35: warning: ‘prci_clk_fu540’ defined but not used [-Wunused-const-variable=]
>
> Cc: Michael Turquette <mturquette@baylibre.com>
> Cc: Stephen Boyd <sboyd@kernel.org>
> Cc: Paul Walmsley <paul.walmsley@sifive.com>
> Cc: Palmer Dabbelt <palmer@dabbelt.com>
> Cc: Pragnesh Patel <Pragnesh.patel@sifive.com>
> Cc: Zong Li <zong.li@sifive.com>
> Cc: linux-clk@vger.kernel.org
> Cc: linux-riscv@lists.infradead.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/clk/sifive/fu540-prci.h  | 5 -----
>  drivers/clk/sifive/sifive-prci.c | 5 +++++
>  2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/clk/sifive/fu540-prci.h b/drivers/clk/sifive/fu540-prci.h
> index c8271efa7bdc7..c220677dc0108 100644
> --- a/drivers/clk/sifive/fu540-prci.h
> +++ b/drivers/clk/sifive/fu540-prci.h
> @@ -13,9 +13,4 @@
>
>  extern struct __prci_clock __prci_init_clocks_fu540[NUM_CLOCK_FU540];
>
> -static const struct prci_clk_desc prci_clk_fu540 = {
> -	.clks = __prci_init_clocks_fu540,
> -	.num_clks = ARRAY_SIZE(__prci_init_clocks_fu540),
> -};
> -
>  #endif /* __SIFIVE_CLK_FU540_PRCI_H */
> diff --git a/drivers/clk/sifive/sifive-prci.c b/drivers/clk/sifive/sifive-prci.c
> index c78b042750e21..1490b01ce6290 100644
> --- a/drivers/clk/sifive/sifive-prci.c
> +++ b/drivers/clk/sifive/sifive-prci.c
> @@ -12,6 +12,11 @@
>  #include "fu540-prci.h"
>  #include "fu740-prci.h"
>
> +static const struct prci_clk_desc prci_clk_fu540 = {
> +	.clks = __prci_init_clocks_fu540,
> +	.num_clks = ARRAY_SIZE(__prci_init_clocks_fu540),
> +};
> +
>  /*
>   * Private functions
>   */

This doesn't look like my sifive-prci.c, so I'm assuming it's against one of
the clock trees and therefor should go in over there.

Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>

Thanks!
Lee Jones Jan. 25, 2021, 8:47 a.m. UTC | #2
On Fri, 22 Jan 2021, Palmer Dabbelt wrote:

> On Wed, 20 Jan 2021 01:30:26 PST (-0800), lee.jones@linaro.org wrote:
> > Fixes the following W=1 kernel build warning(s):
> > 
> >  drivers/clk/sifive/fu540-prci.h:16:35: warning: ‘prci_clk_fu540’ defined but not used [-Wunused-const-variable=]
> >  drivers/clk/sifive/fu540-prci.h:16:35: warning: ‘prci_clk_fu540’ defined but not used [-Wunused-const-variable=]
> > 
> > Cc: Michael Turquette <mturquette@baylibre.com>
> > Cc: Stephen Boyd <sboyd@kernel.org>
> > Cc: Paul Walmsley <paul.walmsley@sifive.com>
> > Cc: Palmer Dabbelt <palmer@dabbelt.com>
> > Cc: Pragnesh Patel <Pragnesh.patel@sifive.com>
> > Cc: Zong Li <zong.li@sifive.com>
> > Cc: linux-clk@vger.kernel.org
> > Cc: linux-riscv@lists.infradead.org
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> >  drivers/clk/sifive/fu540-prci.h  | 5 -----
> >  drivers/clk/sifive/sifive-prci.c | 5 +++++
> >  2 files changed, 5 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/clk/sifive/fu540-prci.h b/drivers/clk/sifive/fu540-prci.h
> > index c8271efa7bdc7..c220677dc0108 100644
> > --- a/drivers/clk/sifive/fu540-prci.h
> > +++ b/drivers/clk/sifive/fu540-prci.h
> > @@ -13,9 +13,4 @@
> > 
> >  extern struct __prci_clock __prci_init_clocks_fu540[NUM_CLOCK_FU540];
> > 
> > -static const struct prci_clk_desc prci_clk_fu540 = {
> > -	.clks = __prci_init_clocks_fu540,
> > -	.num_clks = ARRAY_SIZE(__prci_init_clocks_fu540),
> > -};
> > -
> >  #endif /* __SIFIVE_CLK_FU540_PRCI_H */
> > diff --git a/drivers/clk/sifive/sifive-prci.c b/drivers/clk/sifive/sifive-prci.c
> > index c78b042750e21..1490b01ce6290 100644
> > --- a/drivers/clk/sifive/sifive-prci.c
> > +++ b/drivers/clk/sifive/sifive-prci.c
> > @@ -12,6 +12,11 @@
> >  #include "fu540-prci.h"
> >  #include "fu740-prci.h"
> > 
> > +static const struct prci_clk_desc prci_clk_fu540 = {
> > +	.clks = __prci_init_clocks_fu540,
> > +	.num_clks = ARRAY_SIZE(__prci_init_clocks_fu540),
> > +};
> > +
> >  /*
> >   * Private functions
> >   */
> 
> This doesn't look like my sifive-prci.c, so I'm assuming it's against one of
> the clock trees and therefor should go in over there.

This patch is applied against -next.

> Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>

Thanks Palmer.
Stephen Boyd Feb. 11, 2021, 7:49 p.m. UTC | #3
Quoting Lee Jones (2021-01-20 01:30:26)
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/clk/sifive/fu540-prci.h:16:35: warning: ‘prci_clk_fu540’ defined but not used [-Wunused-const-variable=]
>  drivers/clk/sifive/fu540-prci.h:16:35: warning: ‘prci_clk_fu540’ defined but not used [-Wunused-const-variable=]
> 
> Cc: Michael Turquette <mturquette@baylibre.com>
> Cc: Stephen Boyd <sboyd@kernel.org>
> Cc: Paul Walmsley <paul.walmsley@sifive.com>
> Cc: Palmer Dabbelt <palmer@dabbelt.com>
> Cc: Pragnesh Patel <Pragnesh.patel@sifive.com>
> Cc: Zong Li <zong.li@sifive.com>
> Cc: linux-clk@vger.kernel.org
> Cc: linux-riscv@lists.infradead.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---

Applied to clk-next
diff mbox series

Patch

diff --git a/drivers/clk/sifive/fu540-prci.h b/drivers/clk/sifive/fu540-prci.h
index c8271efa7bdc7..c220677dc0108 100644
--- a/drivers/clk/sifive/fu540-prci.h
+++ b/drivers/clk/sifive/fu540-prci.h
@@ -13,9 +13,4 @@ 
 
 extern struct __prci_clock __prci_init_clocks_fu540[NUM_CLOCK_FU540];
 
-static const struct prci_clk_desc prci_clk_fu540 = {
-	.clks = __prci_init_clocks_fu540,
-	.num_clks = ARRAY_SIZE(__prci_init_clocks_fu540),
-};
-
 #endif /* __SIFIVE_CLK_FU540_PRCI_H */
diff --git a/drivers/clk/sifive/sifive-prci.c b/drivers/clk/sifive/sifive-prci.c
index c78b042750e21..1490b01ce6290 100644
--- a/drivers/clk/sifive/sifive-prci.c
+++ b/drivers/clk/sifive/sifive-prci.c
@@ -12,6 +12,11 @@ 
 #include "fu540-prci.h"
 #include "fu740-prci.h"
 
+static const struct prci_clk_desc prci_clk_fu540 = {
+	.clks = __prci_init_clocks_fu540,
+	.num_clks = ARRAY_SIZE(__prci_init_clocks_fu540),
+};
+
 /*
  * Private functions
  */