linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: renesas: r8a779a0: Make rcar_r8a779a0_cpg_clk_register() static
@ 2020-09-24 11:18 Geert Uytterhoeven
  2020-10-14  2:37 ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2020-09-24 11:18 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd
  Cc: Yoshihiro Shimoda, linux-renesas-soc, linux-clk, Geert Uytterhoeven

When compiling with clang:

    drivers/clk/renesas/r8a779a0-cpg-mssr.c:156:21: warning: no previous prototype for function 'rcar_r8a779a0_cpg_clk_register' [-Wmissing-prototypes]
    struct clk * __init rcar_r8a779a0_cpg_clk_register(struct device *dev,
			   ^
    drivers/clk/renesas/r8a779a0-cpg-mssr.c:156:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
    struct clk * __init rcar_r8a779a0_cpg_clk_register(struct device *dev,
    ^
    static

Similarly, with sparse:

    drivers/clk/renesas/r8a779a0-cpg-mssr.c:156:12: warning: symbol 'rcar_r8a779a0_cpg_clk_register' was not declared. Should it be static?

There are no users of rcar_r8a779a0_cpg_clk_register() outside this
file, so it should be static.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: c07439dea94050b6 ("clk: renesas: cpg-mssr: Add support for R-Car V3U")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
If you think this should be fast-tracked for v5.10, please take it
directly.  Else I will queue this in clk-renesas for v5.11.

Thanks!

 drivers/clk/renesas/r8a779a0-cpg-mssr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/renesas/r8a779a0-cpg-mssr.c b/drivers/clk/renesas/r8a779a0-cpg-mssr.c
index 17ebbac7ddfb4925..7e25b3b8945bd76b 100644
--- a/drivers/clk/renesas/r8a779a0-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a779a0-cpg-mssr.c
@@ -153,7 +153,7 @@ static const struct rcar_r8a779a0_cpg_pll_config *cpg_pll_config __initdata;
 static unsigned int cpg_clk_extalr __initdata;
 static u32 cpg_mode __initdata;
 
-struct clk * __init rcar_r8a779a0_cpg_clk_register(struct device *dev,
+static struct clk * __init rcar_r8a779a0_cpg_clk_register(struct device *dev,
 	const struct cpg_core_clk *core, const struct cpg_mssr_info *info,
 	struct clk **clks, void __iomem *base,
 	struct raw_notifier_head *notifiers)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] clk: renesas: r8a779a0: Make rcar_r8a779a0_cpg_clk_register() static
  2020-09-24 11:18 [PATCH] clk: renesas: r8a779a0: Make rcar_r8a779a0_cpg_clk_register() static Geert Uytterhoeven
@ 2020-10-14  2:37 ` Stephen Boyd
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2020-10-14  2:37 UTC (permalink / raw)
  To: Geert Uytterhoeven, Michael Turquette
  Cc: Yoshihiro Shimoda, linux-renesas-soc, linux-clk, Geert Uytterhoeven

Quoting Geert Uytterhoeven (2020-09-24 04:18:08)
> When compiling with clang:
> 
>     drivers/clk/renesas/r8a779a0-cpg-mssr.c:156:21: warning: no previous prototype for function 'rcar_r8a779a0_cpg_clk_register' [-Wmissing-prototypes]
>     struct clk * __init rcar_r8a779a0_cpg_clk_register(struct device *dev,
>                            ^
>     drivers/clk/renesas/r8a779a0-cpg-mssr.c:156:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
>     struct clk * __init rcar_r8a779a0_cpg_clk_register(struct device *dev,
>     ^
>     static
> 
> Similarly, with sparse:
> 
>     drivers/clk/renesas/r8a779a0-cpg-mssr.c:156:12: warning: symbol 'rcar_r8a779a0_cpg_clk_register' was not declared. Should it be static?
> 
> There are no users of rcar_r8a779a0_cpg_clk_register() outside this
> file, so it should be static.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: c07439dea94050b6 ("clk: renesas: cpg-mssr: Add support for R-Car V3U")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---

Reviewed-by: Stephen Boyd <sboyd@kernel.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-14  2:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-24 11:18 [PATCH] clk: renesas: r8a779a0: Make rcar_r8a779a0_cpg_clk_register() static Geert Uytterhoeven
2020-10-14  2:37 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).