All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: renesas: r9a07g044: Add conditional compilation for r9a07g044_cpg_info
@ 2022-08-04  8:26 Biju Das
  2022-08-18 11:33 ` Geert Uytterhoeven
  0 siblings, 1 reply; 2+ messages in thread
From: Biju Das @ 2022-08-04  8:26 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd
  Cc: Biju Das, Geert Uytterhoeven, linux-renesas-soc, linux-clk,
	Chris Paterson, Biju Das, Prabhakar Mahadev Lad, Pavel Machek

Add conditional compilation for struct r9a07g044_cpg_info, as
the compiler won't allocate any memory for this variable in case
CONFIG_CLK_R9A07G044 is disabled.

Reported-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
 drivers/clk/renesas/r9a07g044-cpg.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/renesas/r9a07g044-cpg.c b/drivers/clk/renesas/r9a07g044-cpg.c
index fd7c4eecd398..02a4fc41bb6e 100644
--- a/drivers/clk/renesas/r9a07g044-cpg.c
+++ b/drivers/clk/renesas/r9a07g044-cpg.c
@@ -414,6 +414,7 @@ static const unsigned int r9a07g044_crit_mod_clks[] __initconst = {
 	MOD_CLK_BASE + R9A07G044_DMAC_ACLK,
 };
 
+#ifdef CONFIG_CLK_R9A07G044
 const struct rzg2l_cpg_info r9a07g044_cpg_info = {
 	/* Core Clocks */
 	.core_clks = core_clks.common,
@@ -436,6 +437,7 @@ const struct rzg2l_cpg_info r9a07g044_cpg_info = {
 
 	.has_clk_mon_regs = true,
 };
+#endif
 
 #ifdef CONFIG_CLK_R9A07G054
 const struct rzg2l_cpg_info r9a07g054_cpg_info = {
-- 
2.25.1


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

* Re: [PATCH] clk: renesas: r9a07g044: Add conditional compilation for r9a07g044_cpg_info
  2022-08-04  8:26 [PATCH] clk: renesas: r9a07g044: Add conditional compilation for r9a07g044_cpg_info Biju Das
@ 2022-08-18 11:33 ` Geert Uytterhoeven
  0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2022-08-18 11:33 UTC (permalink / raw)
  To: Biju Das
  Cc: Michael Turquette, Stephen Boyd, Linux-Renesas, linux-clk,
	Chris Paterson, Biju Das, Prabhakar Mahadev Lad, Pavel Machek

On Thu, Aug 4, 2022 at 10:26 AM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> Add conditional compilation for struct r9a07g044_cpg_info, as
> the compiler won't allocate any memory for this variable in case
> CONFIG_CLK_R9A07G044 is disabled.
>
> Reported-by: Pavel Machek <pavel@denx.de>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-clk-for-v6.1.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

end of thread, other threads:[~2022-08-18 11:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-04  8:26 [PATCH] clk: renesas: r9a07g044: Add conditional compilation for r9a07g044_cpg_info Biju Das
2022-08-18 11:33 ` Geert Uytterhoeven

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.