Skip to contentSkip to conversation

clk: rockchip: remove unused mclk_pdm0_p/pdm0_p definitions

PATCH Applied Arnd Bergmann 2 participants 2 messages Sep 9, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: rockchip: remove unused mclk_pdm0_p/pdm0_p definitions

From: Arnd Bergmann <[email protected]>

When -Wunused-const-variable is enabled (not the default), there is a warning about two definitions in this file:

In file included from drivers/clk/rockchip/clk-rk3576.c:14:
drivers/clk/rockchip/clk-rk3576.c:334:7: error: 'mclk_pdm0_p' defined but not used [-Werror=unused-const-variable=]

  334 | PNAME(mclk_pdm0_p)                      = { "mclk_pdm0_src_top", "xin24m" };
      |       ^~~~~~~~~~~

drivers/clk/rockchip/clk.h:564:43: note: in definition of macro 'PNAME'
564 | #define PNAME(x) static const char *const x[] __initconst
| ^
drivers/clk/rockchip/clk-rk3576.c:333:7: error: 'pdm0_p' defined but not used [-Werror=unused-const-variable=]

  333 | PNAME(pdm0_p)                           = { "clk_pdm0_src_top", "xin24m" };
      |       ^~~~~~

drivers/clk/rockchip/clk.h:564:43: note: in definition of macro 'PNAME'
564 | #define PNAME(x) static const char *const x[] __initconst
| ^

Remove them for the moment. If they are needed later, they can be added back at that point.

Fixes cc40f5baa91b ("clk: rockchip: Add clock controller for the RK3576")
---
 drivers/clk/rockchip/clk-rk3576.c | 2 --
 1 file changed, 2 deletions(-)
drivers/clk/rockchip/clk-rk3576.c +0 -2
index 4de05b208771..595e010341f7 100644
@@ -330,8 +330,6 @@ PNAME(mclk_sai7_8ch_p)			= { "mclk_sai7_8ch_src", "sai1_mclkin" };
 PNAME(mclk_sai8_8ch_p)			= { "mclk_sai8_8ch_src", "sai1_mclkin" };
 PNAME(mclk_sai9_8ch_p)			= { "mclk_sai9_8ch_src", "sai1_mclkin" };
 PNAME(uart1_p)				= { "clk_uart1_src_top", "xin24m" };
-PNAME(pdm0_p)				= { "clk_pdm0_src_top", "xin24m" };
-PNAME(mclk_pdm0_p)			= { "mclk_pdm0_src_top", "xin24m" };
 PNAME(clk_gmac1_ptp_ref_src_p)		= { "gpll", "cpll", "gmac1_ptp_refclk_in" };
 PNAME(clk_gmac0_ptp_ref_src_p)		= { "gpll", "cpll", "gmac0_ptp_refclk_in" };
 PNAME(dclk_ebc_p)			= { "gpll", "cpll", "vpll", "aupll", "lpll_dummy",
Signature · 1 line
2.39.2
maintainer Applied
#1 lore raw

Quoting Arnd Bergmann (2024-09-09 05:11:05)

Quoted 19 lines

From: Arnd Bergmann <[email protected]>

When -Wunused-const-variable is enabled (not the default), there is a warning about two definitions in this file:

In file included from drivers/clk/rockchip/clk-rk3576.c:14:
drivers/clk/rockchip/clk-rk3576.c:334:7: error: 'mclk_pdm0_p' defined but not used [-Werror=unused-const-variable=]

  334 | PNAME(mclk_pdm0_p)                      = { "mclk_pdm0_src_top", "xin24m" };
      |       ^~~~~~~~~~~

drivers/clk/rockchip/clk.h:564:43: note: in definition of macro 'PNAME'
564 | #define PNAME(x) static const char *const x[] __initconst
| ^
drivers/clk/rockchip/clk-rk3576.c:333:7: error: 'pdm0_p' defined but not used [-Werror=unused-const-variable=]

  333 | PNAME(pdm0_p)                           = { "clk_pdm0_src_top", "xin24m" };
      |       ^~~~~~

drivers/clk/rockchip/clk.h:564:43: note: in definition of macro 'PNAME'
564 | #define PNAME(x) static const char *const x[] __initconst
| ^

Quoted 6 lines

Remove them for the moment. If they are needed later, they can be added back at that point.

Fixes cc40f5baa91b ("clk: rockchip: Add clock controller for the RK3576")

---

Applied to clk-next