Linux Tegra architecture development
 help / color / mirror / Atom feed
* [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two)
@ 2026-08-21  8:53 Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 01/45] clk: aspeed: Make sure clk_init_data is fully initialized Geert Uytterhoeven
                   ` (44 more replies)
  0 siblings, 45 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

	Hi all,

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Hence this series aims to make sure all members are fully initialized,
to avoid such bugs, and to prevent future breakage when converting
drivers to a different method for specifying the parents.

Part One[1] fixed all cases that I identified to be real bugs, in
response to a crash I saw on BeagleBone Black.

This series is the clock subpart of Part Two, which fixes remaining
cases that are currently harmless.  These are still fragile, and may
cause future breakage when converting drivers to a different method for
specifying the parents.

Thanks for your comments!

[1] "[PATCH treewide 0/5] clk: Make sure clk_init_data is fully
     initialized (part 1)"
    https://lore.kernel.org/cover.1787165329.git.geert+renesas@glider.be

Geert Uytterhoeven (45):
  clk: aspeed: Make sure clk_init_data is fully initialized
  clk: at91: Make sure clk_init_data is fully initialized
  clk: bcm: iproc: Make sure clk_init_data is fully initialized
  clk: berlin: Make sure clk_init_data is fully initialized
  clk: cdce925: Make sure clk_init_data is fully initialized
  clk: clk-axi-clkgen: Make sure clk_init_data is fully initialized
  clk: cs2000-cp: Make sure clk_init_data is fully initialized
  clk: davinci: Make sure clk_init_data is fully initialized
  clk: fractional-divider: Make sure clk_init_data is fully initialized
  clk: gemini: Make sure clk_init_data is fully initialized
  clk: highbank: Make sure clk_init_data is fully initialized
  clk: hisilicon: Make sure clk_init_data is fully initialized
  clk: imx: Make sure clk_init_data is fully initialized
  clk: ingenic: Make sure clk_init_data is fully initialized
  clk: keystone: Make sure clk_init_data is fully initialized
  clk: lmk04832: Make sure clk_init_data is fully initialized
  clk: mediatek: Make sure clk_init_data is fully initialized
  clk: milbeaut: Make sure clk_init_data is fully initialized
  clk: mmp: Make sure clk_init_data is fully initialized
  clk: mvebu: Make sure clk_init_data is fully initialized
  clk: mxs: Make sure clk_init_data is fully initialized
  clk: nomadik: Make sure clk_init_data is fully initialized
  clk: npcm7xx: Make sure clk_init_data is fully initialized
  clk: nxp: Make sure clk_init_data is fully initialized
  clk: pistachio: Make sure clk_init_data is fully initialized
  clk: pwm: Make sure clk_init_data is fully initialized
  clk: renesas: Make sure clk_init_data is fully initialized
  clk: rockchip: Make sure clk_init_data is fully initialized
  clk: samsung: Make sure clk_init_data is fully initialized
  clk: scpi: Make sure clk_init_data is fully initialized
  clk: silabs: Make sure clk_init_data is fully initialized
  clk: socfpga: Make sure clk_init_data is fully initialized
  clk: spear: Make sure clk_init_data is fully initialized
  clk: stm32: Make sure clk_init_data is fully initialized
  clk: st: Make sure clk_init_data is fully initialized
  clk: sunxi: Make sure clk_init_data is fully initialized
  clk: tegra: Make sure clk_init_data is fully initialized
  clk: uniphier: Make sure clk_init_data is fully initialized
  clk: ux500: Make sure clk_init_data is fully initialized
  clk: versatile: Make sure clk_init_data is fully initialized
  clk: vt8500: Make sure clk_init_data is fully initialized
  clk: x86: Make sure clk_init_data is fully initialized
  clk: xgene: Make sure clk_init_data is fully initialized
  clk: xilinx: Make sure clk_init_data is fully initialized
  clk: zynqmp: Make sure clk_init_data is fully initialized

 drivers/clk/aspeed/clk-aspeed.c                |  2 +-
 drivers/clk/aspeed/clk-ast2600.c               |  2 +-
 drivers/clk/aspeed/clk-ast2700.c               |  2 +-
 drivers/clk/at91/clk-audio-pll.c               |  4 ++--
 drivers/clk/at91/clk-h32mx.c                   |  2 +-
 drivers/clk/at91/clk-main.c                    |  2 +-
 drivers/clk/at91/clk-pll.c                     |  2 +-
 drivers/clk/at91/clk-plldiv.c                  |  2 +-
 drivers/clk/at91/clk-slow.c                    |  2 +-
 drivers/clk/at91/clk-smd.c                     |  2 +-
 drivers/clk/at91/clk-usb.c                     |  6 +++---
 drivers/clk/at91/sckc.c                        |  2 +-
 drivers/clk/bcm/clk-iproc-armpll.c             |  2 +-
 drivers/clk/bcm/clk-iproc-asiu.c               |  2 +-
 drivers/clk/bcm/clk-iproc-pll.c                |  2 +-
 drivers/clk/berlin/berlin2-avpll.c             |  4 ++--
 drivers/clk/berlin/berlin2-pll.c               |  2 +-
 drivers/clk/clk-axi-clkgen.c                   |  2 +-
 drivers/clk/clk-cdce925.c                      |  2 +-
 drivers/clk/clk-cs2000-cp.c                    |  2 +-
 drivers/clk/clk-fractional-divider.c           |  2 +-
 drivers/clk/clk-gemini.c                       |  2 +-
 drivers/clk/clk-highbank.c                     |  2 +-
 drivers/clk/clk-lmk04832.c                     |  6 +++---
 drivers/clk/clk-milbeaut.c                     |  4 ++--
 drivers/clk/clk-nomadik.c                      |  4 ++--
 drivers/clk/clk-npcm7xx.c                      |  2 +-
 drivers/clk/clk-pwm.c                          |  2 +-
 drivers/clk/clk-scpi.c                         |  2 +-
 drivers/clk/clk-si514.c                        |  2 +-
 drivers/clk/clk-si5341.c                       |  2 +-
 drivers/clk/clk-si544.c                        |  2 +-
 drivers/clk/clk-si570.c                        |  2 +-
 drivers/clk/clk-stm32f4.c                      |  4 ++--
 drivers/clk/clk-stm32h7.c                      |  2 +-
 drivers/clk/clk-vt8500.c                       |  4 ++--
 drivers/clk/clk-xgene.c                        |  6 +++---
 drivers/clk/davinci/da8xx-cfgchip.c            |  4 ++--
 drivers/clk/davinci/pll.c                      |  2 +-
 drivers/clk/davinci/psc.c                      |  2 +-
 drivers/clk/hisilicon/clk-hi3559a.c            |  2 +-
 drivers/clk/hisilicon/clk-hi3620.c             |  2 +-
 drivers/clk/hisilicon/clk-hi6220-stub.c        |  2 +-
 drivers/clk/hisilicon/clk-hisi-phase.c         |  2 +-
 drivers/clk/hisilicon/clk-hix5hd2.c            |  2 +-
 drivers/clk/hisilicon/clkdivider-hi6220.c      |  2 +-
 drivers/clk/hisilicon/clkgate-separated.c      |  2 +-
 drivers/clk/imx/clk-busy.c                     |  4 ++--
 drivers/clk/imx/clk-cpu.c                      |  2 +-
 drivers/clk/imx/clk-divider-gate.c             |  2 +-
 drivers/clk/imx/clk-fixup-div.c                |  2 +-
 drivers/clk/imx/clk-fixup-mux.c                |  2 +-
 drivers/clk/imx/clk-frac-pll.c                 |  2 +-
 drivers/clk/imx/clk-fracn-gppll.c              |  2 +-
 drivers/clk/imx/clk-gate-93.c                  |  2 +-
 drivers/clk/imx/clk-gate-exclusive.c           |  2 +-
 drivers/clk/imx/clk-gate2.c                    |  2 +-
 drivers/clk/imx/clk-lpcg-scu.c                 |  2 +-
 drivers/clk/imx/clk-pfd.c                      |  2 +-
 drivers/clk/imx/clk-pfdv2.c                    |  2 +-
 drivers/clk/imx/clk-pll14xx.c                  |  2 +-
 drivers/clk/imx/clk-pllv1.c                    |  2 +-
 drivers/clk/imx/clk-pllv2.c                    |  2 +-
 drivers/clk/imx/clk-pllv3.c                    |  2 +-
 drivers/clk/imx/clk-pllv4.c                    |  2 +-
 drivers/clk/imx/clk-scu.c                      |  4 ++--
 drivers/clk/imx/clk-sscg-pll.c                 |  2 +-
 drivers/clk/ingenic/cgu.c                      |  2 +-
 drivers/clk/keystone/gate.c                    |  2 +-
 drivers/clk/keystone/pll.c                     |  2 +-
 drivers/clk/keystone/syscon-clk.c              |  2 +-
 drivers/clk/mediatek/clk-cpumux.c              |  2 +-
 drivers/clk/mmp/clk-apbc.c                     |  2 +-
 drivers/clk/mmp/clk-apmu.c                     |  2 +-
 drivers/clk/mmp/clk-frac.c                     |  2 +-
 drivers/clk/mmp/clk-gate.c                     |  2 +-
 drivers/clk/mmp/clk-mix.c                      |  2 +-
 drivers/clk/mmp/clk-pll.c                      |  2 +-
 drivers/clk/mvebu/ap-cpu-clk.c                 |  2 +-
 drivers/clk/mvebu/clk-corediv.c                |  2 +-
 drivers/clk/mvebu/clk-cpu.c                    |  2 +-
 drivers/clk/mxs/clk-div.c                      |  2 +-
 drivers/clk/mxs/clk-frac.c                     |  2 +-
 drivers/clk/mxs/clk-pll.c                      |  2 +-
 drivers/clk/mxs/clk-ref.c                      |  2 +-
 drivers/clk/nxp/clk-lpc18xx-creg.c             |  2 +-
 drivers/clk/pistachio/clk-pll.c                |  2 +-
 drivers/clk/renesas/rzg2l-cpg.c                | 18 +++++++++---------
 drivers/clk/renesas/rzv2h-cpg.c                |  8 ++++----
 drivers/clk/rockchip/clk-cpu.c                 |  2 +-
 drivers/clk/rockchip/clk-ddr.c                 |  2 +-
 drivers/clk/rockchip/clk-gate-grf.c            |  2 +-
 drivers/clk/rockchip/clk-inverter.c            |  2 +-
 drivers/clk/rockchip/clk-mmc-phase.c           |  2 +-
 drivers/clk/rockchip/clk-muxgrf.c              |  2 +-
 drivers/clk/rockchip/clk-pll.c                 |  2 +-
 drivers/clk/rockchip/clk.c                     |  2 +-
 drivers/clk/samsung/clk-cpu.c                  |  2 +-
 drivers/clk/samsung/clk-pll.c                  |  2 +-
 drivers/clk/socfpga/clk-gate-a10.c             |  2 +-
 drivers/clk/socfpga/clk-gate-s10.c             |  6 +++---
 drivers/clk/socfpga/clk-gate.c                 |  2 +-
 drivers/clk/socfpga/clk-periph-a10.c           |  2 +-
 drivers/clk/socfpga/clk-periph-s10.c           |  8 ++++----
 drivers/clk/socfpga/clk-periph.c               |  2 +-
 drivers/clk/socfpga/clk-pll-a10.c              |  2 +-
 drivers/clk/socfpga/clk-pll-s10.c              |  8 ++++----
 drivers/clk/socfpga/clk-pll.c                  |  2 +-
 drivers/clk/spear/clk-aux-synth.c              |  2 +-
 drivers/clk/spear/clk-frac-synth.c             |  2 +-
 drivers/clk/spear/clk-gpt-synth.c              |  2 +-
 drivers/clk/spear/clk-vco-pll.c                |  2 +-
 drivers/clk/st/clk-flexgen.c                   |  2 +-
 drivers/clk/st/clkgen-fsyn.c                   |  4 ++--
 drivers/clk/st/clkgen-pll.c                    |  2 +-
 drivers/clk/stm32/clk-stm32mp1.c               |  4 ++--
 drivers/clk/sunxi/clk-sun4i-tcon-ch1.c         |  2 +-
 drivers/clk/tegra/clk-audio-sync.c             |  2 +-
 drivers/clk/tegra/clk-divider.c                |  2 +-
 drivers/clk/tegra/clk-periph-fixed.c           |  2 +-
 drivers/clk/tegra/clk-periph-gate.c            |  2 +-
 drivers/clk/tegra/clk-periph.c                 |  2 +-
 drivers/clk/tegra/clk-pll-out.c                |  2 +-
 drivers/clk/tegra/clk-pll.c                    |  2 +-
 drivers/clk/tegra/clk-sdmmc-mux.c              |  2 +-
 drivers/clk/tegra/clk-super.c                  |  4 ++--
 drivers/clk/tegra/clk-tegra-super-cclk.c       |  2 +-
 drivers/clk/tegra/clk-tegra124-emc.c           |  2 +-
 drivers/clk/tegra/clk-tegra20-emc.c            |  2 +-
 drivers/clk/tegra/clk-tegra210-emc.c           |  2 +-
 drivers/clk/uniphier/clk-uniphier-cpugear.c    |  2 +-
 .../clk/uniphier/clk-uniphier-fixed-factor.c   |  2 +-
 drivers/clk/uniphier/clk-uniphier-fixed-rate.c |  2 +-
 drivers/clk/uniphier/clk-uniphier-gate.c       |  2 +-
 drivers/clk/uniphier/clk-uniphier-mux.c        |  2 +-
 drivers/clk/ux500/clk-prcc.c                   |  2 +-
 drivers/clk/ux500/clk-prcmu.c                  |  4 ++--
 drivers/clk/ux500/clk-sysctrl.c                |  2 +-
 drivers/clk/versatile/clk-icst.c               |  2 +-
 drivers/clk/versatile/clk-sp810.c              |  2 +-
 drivers/clk/versatile/clk-vexpress-osc.c       |  2 +-
 drivers/clk/x86/clk-pmc-atom.c                 |  2 +-
 drivers/clk/xilinx/clk-xlnx-clock-wizard.c     |  6 +++---
 drivers/clk/xilinx/xlnx_vcu.c                  |  2 +-
 drivers/clk/zynqmp/clk-gate-zynqmp.c           |  2 +-
 drivers/clk/zynqmp/clk-mux-zynqmp.c            |  2 +-
 drivers/clk/zynqmp/divider.c                   |  2 +-
 drivers/clk/zynqmp/pll.c                       |  2 +-
 148 files changed, 188 insertions(+), 188 deletions(-)

-- 
2.43.0

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] 52+ messages in thread

* [PATCH 01/45] clk: aspeed: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 02/45] clk: at91: " Geert Uytterhoeven
                   ` (43 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/aspeed/clk-aspeed.c  | 2 +-
 drivers/clk/aspeed/clk-ast2600.c | 2 +-
 drivers/clk/aspeed/clk-ast2700.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/aspeed/clk-aspeed.c b/drivers/clk/aspeed/clk-aspeed.c
index 38a5766a435ca27f..d32a3e9f300a2d74 100644
--- a/drivers/clk/aspeed/clk-aspeed.c
+++ b/drivers/clk/aspeed/clk-aspeed.c
@@ -349,8 +349,8 @@ static struct clk_hw *aspeed_clk_hw_register_gate(struct device *dev,
 		struct regmap *map, u8 clock_idx, u8 reset_idx,
 		u8 clk_gate_flags, spinlock_t *lock)
 {
+	struct clk_init_data init = {};
 	struct aspeed_clk_gate *gate;
-	struct clk_init_data init;
 	struct clk_hw *hw;
 	int ret;
 
diff --git a/drivers/clk/aspeed/clk-ast2600.c b/drivers/clk/aspeed/clk-ast2600.c
index 70061c961b69eccc..cc3d26602b16eba7 100644
--- a/drivers/clk/aspeed/clk-ast2600.c
+++ b/drivers/clk/aspeed/clk-ast2600.c
@@ -425,8 +425,8 @@ static struct clk_hw *aspeed_g6_clk_hw_register_gate(struct device *dev,
 		struct regmap *map, u8 clock_idx, u8 reset_idx,
 		u8 clk_gate_flags, spinlock_t *lock)
 {
+	struct clk_init_data init = {};
 	struct aspeed_clk_gate *gate;
-	struct clk_init_data init;
 	struct clk_hw *hw;
 	int ret;
 
diff --git a/drivers/clk/aspeed/clk-ast2700.c b/drivers/clk/aspeed/clk-ast2700.c
index 536600fcd0244e59..495b7fa3395b2106 100644
--- a/drivers/clk/aspeed/clk-ast2700.c
+++ b/drivers/clk/aspeed/clk-ast2700.c
@@ -824,7 +824,7 @@ static struct clk_hw *ast2700_clk_hw_register_gate(struct device *dev, const cha
 						   void __iomem *reg, u8 clock_idx,
 						   unsigned long flags, spinlock_t *lock)
 {
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct clk_gate *gate;
 	struct clk_hw *hw;
 	int ret = -EINVAL;
-- 
2.43.0


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

* [PATCH 02/45] clk: at91: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 01/45] clk: aspeed: Make sure clk_init_data is fully initialized Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 03/45] clk: bcm: iproc: " Geert Uytterhoeven
                   ` (42 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/at91/clk-audio-pll.c | 4 ++--
 drivers/clk/at91/clk-h32mx.c     | 2 +-
 drivers/clk/at91/clk-main.c      | 2 +-
 drivers/clk/at91/clk-pll.c       | 2 +-
 drivers/clk/at91/clk-plldiv.c    | 2 +-
 drivers/clk/at91/clk-slow.c      | 2 +-
 drivers/clk/at91/clk-smd.c       | 2 +-
 drivers/clk/at91/clk-usb.c       | 6 +++---
 drivers/clk/at91/sckc.c          | 2 +-
 9 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/clk/at91/clk-audio-pll.c b/drivers/clk/at91/clk-audio-pll.c
index 732037bfbda836fe..26875ad0cce79ae0 100644
--- a/drivers/clk/at91/clk-audio-pll.c
+++ b/drivers/clk/at91/clk-audio-pll.c
@@ -486,8 +486,8 @@ struct clk_hw * __init
 at91_clk_register_audio_pll_pad(struct regmap *regmap, const char *name,
 				const char *parent_name)
 {
+	struct clk_init_data init = {};
 	struct clk_audio_pad *apad_ck;
-	struct clk_init_data init;
 	int ret;
 
 	apad_ck = kzalloc_obj(*apad_ck);
@@ -517,8 +517,8 @@ struct clk_hw * __init
 at91_clk_register_audio_pll_pmc(struct regmap *regmap, const char *name,
 				const char *parent_name)
 {
+	struct clk_init_data init = {};
 	struct clk_audio_pmc *apmc_ck;
-	struct clk_init_data init;
 	int ret;
 
 	apmc_ck = kzalloc_obj(*apmc_ck);
diff --git a/drivers/clk/at91/clk-h32mx.c b/drivers/clk/at91/clk-h32mx.c
index 12bd112d3c509fe6..8d5488223e4937ef 100644
--- a/drivers/clk/at91/clk-h32mx.c
+++ b/drivers/clk/at91/clk-h32mx.c
@@ -97,7 +97,7 @@ at91_clk_register_h32mx(struct regmap *regmap, const char *name,
 			const char *parent_name)
 {
 	struct clk_sama5d4_h32mx *h32mxclk;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	int ret;
 
 	h32mxclk = kzalloc_obj(*h32mxclk);
diff --git a/drivers/clk/at91/clk-main.c b/drivers/clk/at91/clk-main.c
index ab515239adcf49e6..6074ed2a16cede94 100644
--- a/drivers/clk/at91/clk-main.c
+++ b/drivers/clk/at91/clk-main.c
@@ -298,8 +298,8 @@ at91_clk_register_main_rc_osc(struct regmap *regmap,
 			      const char *name,
 			      u32 frequency, u32 accuracy)
 {
+	struct clk_init_data init = {};
 	struct clk_main_rc_osc *osc;
-	struct clk_init_data init;
 	struct clk_hw *hw;
 	int ret;
 
diff --git a/drivers/clk/at91/clk-pll.c b/drivers/clk/at91/clk-pll.c
index b89f60cf02416eb6..1b9a37a9e0701b56 100644
--- a/drivers/clk/at91/clk-pll.c
+++ b/drivers/clk/at91/clk-pll.c
@@ -318,7 +318,7 @@ at91_clk_register_pll(struct regmap *regmap, const char *name,
 {
 	struct clk_pll *pll;
 	struct clk_hw *hw;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	int offset = PLL_REG(id);
 	unsigned int pllr;
 	int ret;
diff --git a/drivers/clk/at91/clk-plldiv.c b/drivers/clk/at91/clk-plldiv.c
index 5f93aead03fa5810..135ca0abeb18898f 100644
--- a/drivers/clk/at91/clk-plldiv.c
+++ b/drivers/clk/at91/clk-plldiv.c
@@ -86,9 +86,9 @@ struct clk_hw * __init
 at91_clk_register_plldiv(struct regmap *regmap, const char *name,
 			 const char *parent_name)
 {
+	struct clk_init_data init = {};
 	struct clk_plldiv *plldiv;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	plldiv = kzalloc_obj(*plldiv);
diff --git a/drivers/clk/at91/clk-slow.c b/drivers/clk/at91/clk-slow.c
index f0cad50e490bf16e..dc0009ca2cef55b8 100644
--- a/drivers/clk/at91/clk-slow.c
+++ b/drivers/clk/at91/clk-slow.c
@@ -42,8 +42,8 @@ at91_clk_register_sam9260_slow(struct regmap *regmap,
 			       int num_parents)
 {
 	struct clk_sam9260_slow *slowck;
+	struct clk_init_data init = {};
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	if (!name)
diff --git a/drivers/clk/at91/clk-smd.c b/drivers/clk/at91/clk-smd.c
index 77f2b8fe6cabd5fb..4eff52a9798ba443 100644
--- a/drivers/clk/at91/clk-smd.c
+++ b/drivers/clk/at91/clk-smd.c
@@ -113,9 +113,9 @@ struct clk_hw * __init
 at91sam9x5_clk_register_smd(struct regmap *regmap, const char *name,
 			    const char **parent_names, u8 num_parents)
 {
+	struct clk_init_data init = {};
 	struct at91sam9x5_clk_smd *smd;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	smd = kzalloc_obj(*smd);
diff --git a/drivers/clk/at91/clk-usb.c b/drivers/clk/at91/clk-usb.c
index b4dc86193e09fbd0..0e4c0367c1afa77c 100644
--- a/drivers/clk/at91/clk-usb.c
+++ b/drivers/clk/at91/clk-usb.c
@@ -224,9 +224,9 @@ _at91sam9x5_clk_register_usb(struct regmap *regmap, const char *name,
 			     const char **parent_names, u8 num_parents,
 			     u32 usbs_mask)
 {
+	struct clk_init_data init = {};
 	struct at91sam9x5_clk_usb *usb;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	usb = kzalloc_obj(*usb);
@@ -275,9 +275,9 @@ struct clk_hw * __init
 at91sam9n12_clk_register_usb(struct regmap *regmap, const char *name,
 			     const char *parent_name)
 {
+	struct clk_init_data init = {};
 	struct at91sam9x5_clk_usb *usb;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	usb = kzalloc_obj(*usb);
@@ -394,9 +394,9 @@ struct clk_hw * __init
 at91rm9200_clk_register_usb(struct regmap *regmap, const char *name,
 			    const char *parent_name, const u32 *divisors)
 {
+	struct clk_init_data init = {};
 	struct at91rm9200_clk_usb *usb;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	usb = kzalloc_obj(*usb);
diff --git a/drivers/clk/at91/sckc.c b/drivers/clk/at91/sckc.c
index 776118f14867de02..fc5ca22d181a7502 100644
--- a/drivers/clk/at91/sckc.c
+++ b/drivers/clk/at91/sckc.c
@@ -231,9 +231,9 @@ at91_clk_register_slow_rc_osc(void __iomem *sckcr,
 			      unsigned long startup,
 			      const struct clk_slow_bits *bits)
 {
+	struct clk_init_data init = {};
 	struct clk_slow_rc_osc *osc;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	if (!sckcr || !name)
-- 
2.43.0


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

* [PATCH 03/45] clk: bcm: iproc: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 01/45] clk: aspeed: Make sure clk_init_data is fully initialized Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 02/45] clk: at91: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 04/45] clk: berlin: " Geert Uytterhoeven
                   ` (41 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/bcm/clk-iproc-armpll.c | 2 +-
 drivers/clk/bcm/clk-iproc-asiu.c   | 2 +-
 drivers/clk/bcm/clk-iproc-pll.c    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/bcm/clk-iproc-armpll.c b/drivers/clk/bcm/clk-iproc-armpll.c
index 8485428fe49ce667..aca53e2bda010cca 100644
--- a/drivers/clk/bcm/clk-iproc-armpll.c
+++ b/drivers/clk/bcm/clk-iproc-armpll.c
@@ -235,7 +235,7 @@ void __init iproc_armpll_setup(struct device_node *node)
 {
 	int ret;
 	struct iproc_arm_pll *pll;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	const char *parent_name;
 
 	pll = kzalloc_obj(*pll);
diff --git a/drivers/clk/bcm/clk-iproc-asiu.c b/drivers/clk/bcm/clk-iproc-asiu.c
index 56a8132279814d03..86c0100934f81bd5 100644
--- a/drivers/clk/bcm/clk-iproc-asiu.c
+++ b/drivers/clk/bcm/clk-iproc-asiu.c
@@ -206,7 +206,7 @@ void __init iproc_asiu_setup(struct device_node *node,
 		goto err_iomap_gate;
 
 	for (i = 0; i < num_clks; i++) {
-		struct clk_init_data init;
+		struct clk_init_data init = {};
 		const char *parent_name;
 		struct iproc_asiu_clk *asiu_clk;
 		const char *clk_name;
diff --git a/drivers/clk/bcm/clk-iproc-pll.c b/drivers/clk/bcm/clk-iproc-pll.c
index d708f770971ceed1..4354aac2d2707d71 100644
--- a/drivers/clk/bcm/clk-iproc-pll.c
+++ b/drivers/clk/bcm/clk-iproc-pll.c
@@ -722,7 +722,7 @@ void iproc_pll_clk_setup(struct device_node *node,
 	int i, ret;
 	struct iproc_pll *pll;
 	struct iproc_clk *iclk;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	const char *parent_name;
 	struct iproc_clk *iclk_array;
 	struct clk_hw_onecell_data *clk_data;
-- 
2.43.0


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

* [PATCH 04/45] clk: berlin: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (2 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 03/45] clk: bcm: iproc: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 05/45] clk: cdce925: " Geert Uytterhoeven
                   ` (40 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/berlin/berlin2-avpll.c | 4 ++--
 drivers/clk/berlin/berlin2-pll.c   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/berlin/berlin2-avpll.c b/drivers/clk/berlin/berlin2-avpll.c
index c801d42397bf06b2..33a3cc16b0cc5f4b 100644
--- a/drivers/clk/berlin/berlin2-avpll.c
+++ b/drivers/clk/berlin/berlin2-avpll.c
@@ -181,8 +181,8 @@ int __init berlin2_avpll_vco_register(void __iomem *base,
 			       const char *name, const char *parent_name,
 			       u8 vco_flags, unsigned long flags)
 {
+	struct clk_init_data init = {};
 	struct berlin2_avpll_vco *vco;
-	struct clk_init_data init;
 
 	vco = kzalloc_obj(*vco);
 	if (!vco)
@@ -358,7 +358,7 @@ int __init berlin2_avpll_channel_register(void __iomem *base,
 			   u8 ch_flags, unsigned long flags)
 {
 	struct berlin2_avpll_channel *ch;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 
 	ch = kzalloc_obj(*ch);
 	if (!ch)
diff --git a/drivers/clk/berlin/berlin2-pll.c b/drivers/clk/berlin/berlin2-pll.c
index d0ec3d0bcf3e57ea..1c4203736ecf4ff7 100644
--- a/drivers/clk/berlin/berlin2-pll.c
+++ b/drivers/clk/berlin/berlin2-pll.c
@@ -78,7 +78,7 @@ berlin2_pll_register(const struct berlin2_pll_map *map,
 		     void __iomem *base, const char *name,
 		     const char *parent_name, unsigned long flags)
 {
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct berlin2_pll *pll;
 
 	pll = kzalloc_obj(*pll);
-- 
2.43.0


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

* [PATCH 05/45] clk: cdce925: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (3 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 04/45] clk: berlin: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21 11:25   ` Liviu Dudau
  2026-08-21  8:53 ` [PATCH 06/45] clk: clk-axi-clkgen: " Geert Uytterhoeven
                   ` (39 subsequent siblings)
  44 siblings, 1 reply; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/clk-cdce925.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-cdce925.c b/drivers/clk/clk-cdce925.c
index 30d0493c771818ff..4d49cc1659c07be2 100644
--- a/drivers/clk/clk-cdce925.c
+++ b/drivers/clk/clk-cdce925.c
@@ -620,7 +620,7 @@ static int cdce925_probe(struct i2c_client *client)
 	struct device_node *node = client->dev.of_node;
 	const char *parent_name;
 	const char *pll_clk_name[MAX_NUMBER_OF_PLLS] = {NULL,};
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	u32 value;
 	int i;
 	int err;
-- 
2.43.0


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

* [PATCH 06/45] clk: clk-axi-clkgen: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (4 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 05/45] clk: cdce925: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 07/45] clk: cs2000-cp: " Geert Uytterhoeven
                   ` (38 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/clk-axi-clkgen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-axi-clkgen.c b/drivers/clk/clk-axi-clkgen.c
index 6fcee41447e45581..e53256c56dfabc4e 100644
--- a/drivers/clk/clk-axi-clkgen.c
+++ b/drivers/clk/clk-axi-clkgen.c
@@ -568,7 +568,7 @@ static int axi_clkgen_probe(struct platform_device *pdev)
 	const struct axi_clkgen_limits *dflt_limits;
 	struct axi_clkgen *axi_clkgen;
 	unsigned int pcore_version;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	const char *parent_names[2];
 	const char *clk_name;
 	struct clk *axi_clk;
-- 
2.43.0


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

* [PATCH 07/45] clk: cs2000-cp: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (5 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 06/45] clk: clk-axi-clkgen: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 08/45] clk: davinci: " Geert Uytterhoeven
                   ` (37 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Boot-tested on Salvator-X(S) and Ebisu-4D.
---
 drivers/clk/clk-cs2000-cp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-cs2000-cp.c b/drivers/clk/clk-cs2000-cp.c
index 5a7758f5a1e4a0f1..b28fd4e5615ff7a7 100644
--- a/drivers/clk/clk-cs2000-cp.c
+++ b/drivers/clk/clk-cs2000-cp.c
@@ -461,7 +461,7 @@ static int cs2000_clk_register(struct cs2000_priv *priv)
 {
 	struct device *dev = priv_to_dev(priv);
 	struct device_node *np = dev->of_node;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	const char *name = np->name;
 	static const char *parent_names[CLK_MAX];
 	u32 aux_out = 0;
-- 
2.43.0


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

* [PATCH 08/45] clk: davinci: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (6 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 07/45] clk: cs2000-cp: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 09/45] clk: fractional-divider: " Geert Uytterhoeven
                   ` (36 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/davinci/da8xx-cfgchip.c | 4 ++--
 drivers/clk/davinci/pll.c           | 2 +-
 drivers/clk/davinci/psc.c           | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/davinci/da8xx-cfgchip.c b/drivers/clk/davinci/da8xx-cfgchip.c
index a5109fe8b16e9b40..9d7fced898ae07fc 100644
--- a/drivers/clk/davinci/da8xx-cfgchip.c
+++ b/drivers/clk/davinci/da8xx-cfgchip.c
@@ -91,7 +91,7 @@ da8xx_cfgchip_gate_clk_register(struct device *dev,
 	struct clk *parent;
 	const char *parent_name;
 	struct da8xx_cfgchip_gate_clk *gate;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	int ret;
 
 	parent = devm_clk_get(dev, NULL);
@@ -241,7 +241,7 @@ da8xx_cfgchip_mux_clk_register(struct device *dev,
 {
 	const char * const parent_names[] = { info->parent0, info->parent1 };
 	struct da8xx_cfgchip_mux_clk *mux;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	int ret;
 
 	mux = devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL);
diff --git a/drivers/clk/davinci/pll.c b/drivers/clk/davinci/pll.c
index f73b0ac5d8a08bf1..0e58b02d7acaf175 100644
--- a/drivers/clk/davinci/pll.c
+++ b/drivers/clk/davinci/pll.c
@@ -371,7 +371,7 @@ struct clk *davinci_pll_clk_register(struct device *dev,
 	char pllout_name[MAX_NAME_SIZE];
 	char postdiv_name[MAX_NAME_SIZE];
 	char pllen_name[MAX_NAME_SIZE];
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct davinci_pll_clk *pllout;
 	struct davinci_pllen_clk *pllen;
 	struct clk *oscin_clk = NULL;
diff --git a/drivers/clk/davinci/psc.c b/drivers/clk/davinci/psc.c
index ff603520d56f94d6..73dce7ce2be6cc88 100644
--- a/drivers/clk/davinci/psc.c
+++ b/drivers/clk/davinci/psc.c
@@ -234,7 +234,7 @@ davinci_lpsc_clk_register(struct device *dev, const char *name,
 			  const char *parent_name, struct regmap *regmap,
 			  u32 md, u32 pd, u32 flags)
 {
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct davinci_lpsc_clk *lpsc;
 	int ret;
 	bool is_on;
-- 
2.43.0


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

* [PATCH 09/45] clk: fractional-divider: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (7 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 08/45] clk: davinci: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 10/45] clk: gemini: " Geert Uytterhoeven
                   ` (35 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/clk-fractional-divider.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-fractional-divider.c b/drivers/clk/clk-fractional-divider.c
index 1c5fdcb68a5048e3..c8e00d75cd14d8f1 100644
--- a/drivers/clk/clk-fractional-divider.c
+++ b/drivers/clk/clk-fractional-divider.c
@@ -271,7 +271,7 @@ struct clk_hw *clk_hw_register_fractional_divider(struct device *dev,
 		u8 clk_divider_flags, spinlock_t *lock)
 {
 	struct clk_fractional_divider *fd;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct clk_hw *hw;
 	int ret;
 
-- 
2.43.0


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

* [PATCH 10/45] clk: gemini: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (8 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 09/45] clk: fractional-divider: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 11/45] clk: highbank: " Geert Uytterhoeven
                   ` (34 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/clk-gemini.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-gemini.c b/drivers/clk/clk-gemini.c
index 9c0e6e7a7cacdf59..4e874392e3b0b57e 100644
--- a/drivers/clk/clk-gemini.c
+++ b/drivers/clk/clk-gemini.c
@@ -193,8 +193,8 @@ static struct clk_hw *gemini_pci_clk_setup(const char *name,
 					   const char *parent_name,
 					   struct regmap *map)
 {
+	struct clk_init_data init = {};
 	struct clk_gemini_pci *pciclk;
-	struct clk_init_data init;
 	int ret;
 
 	pciclk = kzalloc_obj(*pciclk);
-- 
2.43.0


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

* [PATCH 11/45] clk: highbank: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (9 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 10/45] clk: gemini: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 12/45] clk: hisilicon: " Geert Uytterhoeven
                   ` (33 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/clk-highbank.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-highbank.c b/drivers/clk/clk-highbank.c
index e9b177811dfc2ced..61c23199763508ea 100644
--- a/drivers/clk/clk-highbank.c
+++ b/drivers/clk/clk-highbank.c
@@ -269,7 +269,7 @@ static void __init hb_clk_init(struct device_node *node, const struct clk_ops *o
 	struct hb_clk *hb_clk;
 	const char *clk_name = node->name;
 	const char *parent_name;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct device_node *srnp;
 	int rc;
 
-- 
2.43.0


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

* [PATCH 12/45] clk: hisilicon: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (10 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 11/45] clk: highbank: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 13/45] clk: imx: " Geert Uytterhoeven
                   ` (32 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/hisilicon/clk-hi3559a.c       | 2 +-
 drivers/clk/hisilicon/clk-hi3620.c        | 2 +-
 drivers/clk/hisilicon/clk-hi6220-stub.c   | 2 +-
 drivers/clk/hisilicon/clk-hisi-phase.c    | 2 +-
 drivers/clk/hisilicon/clk-hix5hd2.c       | 2 +-
 drivers/clk/hisilicon/clkdivider-hi6220.c | 2 +-
 drivers/clk/hisilicon/clkgate-separated.c | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/clk/hisilicon/clk-hi3559a.c b/drivers/clk/hisilicon/clk-hi3559a.c
index f297fb25c512a322..fea6fb9e98f59a86 100644
--- a/drivers/clk/hisilicon/clk-hi3559a.c
+++ b/drivers/clk/hisilicon/clk-hi3559a.c
@@ -456,8 +456,8 @@ static void hisi_clk_register_pll(struct hi3559av100_pll_clock *clks,
 {
 	void __iomem *base = data->base;
 	struct hi3559av100_clk_pll *p_clk = NULL;
+	struct clk_init_data init = {};
 	struct clk *clk = NULL;
-	struct clk_init_data init;
 	int i;
 
 	p_clk = devm_kcalloc(dev, nums, sizeof(*p_clk), GFP_KERNEL);
diff --git a/drivers/clk/hisilicon/clk-hi3620.c b/drivers/clk/hisilicon/clk-hi3620.c
index 8dcad74e679aa462..a2c4637eaa9880d5 100644
--- a/drivers/clk/hisilicon/clk-hi3620.c
+++ b/drivers/clk/hisilicon/clk-hi3620.c
@@ -410,9 +410,9 @@ static const struct clk_ops clk_mmc_ops = {
 static struct clk *hisi_register_clk_mmc(struct hisi_mmc_clock *mmc_clk,
 			void __iomem *base, struct device_node *np)
 {
+	struct clk_init_data init = {};
 	struct clk_mmc *mclk;
 	struct clk *clk;
-	struct clk_init_data init;
 
 	mclk = kzalloc_obj(*mclk);
 	if (!mclk)
diff --git a/drivers/clk/hisilicon/clk-hi6220-stub.c b/drivers/clk/hisilicon/clk-hi6220-stub.c
index bf99cfafafa0133d..a70544d2bdb9a805 100644
--- a/drivers/clk/hisilicon/clk-hi6220-stub.c
+++ b/drivers/clk/hisilicon/clk-hi6220-stub.c
@@ -195,7 +195,7 @@ static const struct clk_ops hi6220_stub_clk_ops = {
 static int hi6220_stub_clk_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct hi6220_stub_clk *stub_clk;
 	struct clk *clk;
 	struct device_node *np = pdev->dev.of_node;
diff --git a/drivers/clk/hisilicon/clk-hisi-phase.c b/drivers/clk/hisilicon/clk-hisi-phase.c
index ba6afad66a2b0c25..d8e555d9728de9ad 100644
--- a/drivers/clk/hisilicon/clk-hisi-phase.c
+++ b/drivers/clk/hisilicon/clk-hisi-phase.c
@@ -94,8 +94,8 @@ struct clk *clk_register_hisi_phase(struct device *dev,
 		const struct hisi_phase_clock *clks,
 		void __iomem *base, spinlock_t *lock)
 {
+	struct clk_init_data init = {};
 	struct clk_hisi_phase *phase;
-	struct clk_init_data init;
 
 	phase = devm_kzalloc(dev, sizeof(struct clk_hisi_phase), GFP_KERNEL);
 	if (!phase)
diff --git a/drivers/clk/hisilicon/clk-hix5hd2.c b/drivers/clk/hisilicon/clk-hix5hd2.c
index 57db6fab43aacd41..4b7ebebfac4be608 100644
--- a/drivers/clk/hisilicon/clk-hix5hd2.c
+++ b/drivers/clk/hisilicon/clk-hix5hd2.c
@@ -258,8 +258,8 @@ hix5hd2_clk_register_complex(struct hix5hd2_complex_clock *clks, int nums,
 
 	for (i = 0; i < nums; i++) {
 		struct hix5hd2_clk_complex *p_clk;
+		struct clk_init_data init = {};
 		struct clk *clk;
-		struct clk_init_data init;
 
 		p_clk = kzalloc_obj(*p_clk);
 		if (!p_clk)
diff --git a/drivers/clk/hisilicon/clkdivider-hi6220.c b/drivers/clk/hisilicon/clkdivider-hi6220.c
index 20a337383a1e1fea..cc53d0a33e3c4e92 100644
--- a/drivers/clk/hisilicon/clkdivider-hi6220.c
+++ b/drivers/clk/hisilicon/clkdivider-hi6220.c
@@ -103,7 +103,7 @@ struct clk *hi6220_register_clkdiv(struct device *dev, const char *name,
 {
 	struct hi6220_clk_divider *div;
 	struct clk *clk;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct clk_div_table *table;
 	u32 max_div, min_div;
 	int i;
diff --git a/drivers/clk/hisilicon/clkgate-separated.c b/drivers/clk/hisilicon/clkgate-separated.c
index 199303157ebd84da..e02d6bb5ada79a3c 100644
--- a/drivers/clk/hisilicon/clkgate-separated.c
+++ b/drivers/clk/hisilicon/clkgate-separated.c
@@ -87,8 +87,8 @@ struct clk *hisi_register_clkgate_sep(struct device *dev, const char *name,
 				      u8 clk_gate_flags, spinlock_t *lock)
 {
 	struct clkgate_separated *sclk;
+	struct clk_init_data init = {};
 	struct clk *clk;
-	struct clk_init_data init;
 
 	sclk = kzalloc_obj(*sclk);
 	if (!sclk)
-- 
2.43.0


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

* [PATCH 13/45] clk: imx: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (11 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 12/45] clk: hisilicon: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21 11:44   ` Abel Vesa
  2026-08-21  8:53 ` [PATCH 14/45] clk: ingenic: " Geert Uytterhoeven
                   ` (31 subsequent siblings)
  44 siblings, 1 reply; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/imx/clk-busy.c           | 4 ++--
 drivers/clk/imx/clk-cpu.c            | 2 +-
 drivers/clk/imx/clk-divider-gate.c   | 2 +-
 drivers/clk/imx/clk-fixup-div.c      | 2 +-
 drivers/clk/imx/clk-fixup-mux.c      | 2 +-
 drivers/clk/imx/clk-frac-pll.c       | 2 +-
 drivers/clk/imx/clk-fracn-gppll.c    | 2 +-
 drivers/clk/imx/clk-gate-93.c        | 2 +-
 drivers/clk/imx/clk-gate-exclusive.c | 2 +-
 drivers/clk/imx/clk-gate2.c          | 2 +-
 drivers/clk/imx/clk-lpcg-scu.c       | 2 +-
 drivers/clk/imx/clk-pfd.c            | 2 +-
 drivers/clk/imx/clk-pfdv2.c          | 2 +-
 drivers/clk/imx/clk-pll14xx.c        | 2 +-
 drivers/clk/imx/clk-pllv1.c          | 2 +-
 drivers/clk/imx/clk-pllv2.c          | 2 +-
 drivers/clk/imx/clk-pllv3.c          | 2 +-
 drivers/clk/imx/clk-pllv4.c          | 2 +-
 drivers/clk/imx/clk-scu.c            | 4 ++--
 drivers/clk/imx/clk-sscg-pll.c       | 2 +-
 20 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/drivers/clk/imx/clk-busy.c b/drivers/clk/imx/clk-busy.c
index b8b6e7c7e1fe35c5..75a2bf29e42fc6d8 100644
--- a/drivers/clk/imx/clk-busy.c
+++ b/drivers/clk/imx/clk-busy.c
@@ -78,8 +78,8 @@ struct clk_hw *imx_clk_hw_busy_divider(const char *name, const char *parent_name
 				 void __iomem *busy_reg, u8 busy_shift)
 {
 	struct clk_busy_divider *busy;
+	struct clk_init_data init = {};
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	busy = kzalloc_obj(*busy);
@@ -157,9 +157,9 @@ struct clk_hw *imx_clk_hw_busy_mux(const char *name, void __iomem *reg, u8 shift
 			     u8 width, void __iomem *busy_reg, u8 busy_shift,
 			     const char * const *parent_names, int num_parents)
 {
+	struct clk_init_data init = {};
 	struct clk_busy_mux *busy;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	busy = kzalloc_obj(*busy);
diff --git a/drivers/clk/imx/clk-cpu.c b/drivers/clk/imx/clk-cpu.c
index f53dbaacddcc9f85..b4d9722eb17e63ec 100644
--- a/drivers/clk/imx/clk-cpu.c
+++ b/drivers/clk/imx/clk-cpu.c
@@ -76,9 +76,9 @@ struct clk_hw *imx_clk_hw_cpu(const char *name, const char *parent_name,
 		struct clk *div, struct clk *mux, struct clk *pll,
 		struct clk *step)
 {
+	struct clk_init_data init = {};
 	struct clk_cpu *cpu;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	cpu = kzalloc_obj(*cpu);
diff --git a/drivers/clk/imx/clk-divider-gate.c b/drivers/clk/imx/clk-divider-gate.c
index 957d132c4607dc5f..a1b7c109069c3bb3 100644
--- a/drivers/clk/imx/clk-divider-gate.c
+++ b/drivers/clk/imx/clk-divider-gate.c
@@ -179,8 +179,8 @@ struct clk_hw *imx_clk_hw_divider_gate(const char *name, const char *parent_name
 				    const struct clk_div_table *table,
 				    spinlock_t *lock)
 {
-	struct clk_init_data init;
 	struct clk_divider_gate *div_gate;
+	struct clk_init_data init = {};
 	struct clk_hw *hw;
 	u32 val;
 	int ret;
diff --git a/drivers/clk/imx/clk-fixup-div.c b/drivers/clk/imx/clk-fixup-div.c
index 3866319af54ef8b6..a6f68317cd2e523c 100644
--- a/drivers/clk/imx/clk-fixup-div.c
+++ b/drivers/clk/imx/clk-fixup-div.c
@@ -90,8 +90,8 @@ struct clk_hw *imx_clk_hw_fixup_divider(const char *name, const char *parent,
 				  void (*fixup)(u32 *val))
 {
 	struct clk_fixup_div *fixup_div;
+	struct clk_init_data init = {};
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	if (!fixup)
diff --git a/drivers/clk/imx/clk-fixup-mux.c b/drivers/clk/imx/clk-fixup-mux.c
index 7188cdad79d3c82d..f43648f7fb45a92e 100644
--- a/drivers/clk/imx/clk-fixup-mux.c
+++ b/drivers/clk/imx/clk-fixup-mux.c
@@ -70,8 +70,8 @@ struct clk_hw *imx_clk_hw_fixup_mux(const char *name, void __iomem *reg,
 			      int num_parents, void (*fixup)(u32 *val))
 {
 	struct clk_fixup_mux *fixup_mux;
+	struct clk_init_data init = {};
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	if (!fixup)
diff --git a/drivers/clk/imx/clk-frac-pll.c b/drivers/clk/imx/clk-frac-pll.c
index cd4e26bac19c48bc..d6c59634c0c02813 100644
--- a/drivers/clk/imx/clk-frac-pll.c
+++ b/drivers/clk/imx/clk-frac-pll.c
@@ -208,7 +208,7 @@ struct clk_hw *imx_clk_hw_frac_pll(const char *name,
 				   const char *parent_name,
 				   void __iomem *base)
 {
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct clk_frac_pll *pll;
 	struct clk_hw *hw;
 	int ret;
diff --git a/drivers/clk/imx/clk-fracn-gppll.c b/drivers/clk/imx/clk-fracn-gppll.c
index 4048c16c0578b8f5..32bb3e9a8d6ec2b0 100644
--- a/drivers/clk/imx/clk-fracn-gppll.c
+++ b/drivers/clk/imx/clk-fracn-gppll.c
@@ -363,9 +363,9 @@ static struct clk_hw *_imx_clk_fracn_gppll(const char *name, const char *parent_
 					   const struct imx_fracn_gppll_clk *pll_clk,
 					   u32 pll_flags)
 {
+	struct clk_init_data init = {};
 	struct clk_fracn_gppll *pll;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	pll = kzalloc_obj(*pll);
diff --git a/drivers/clk/imx/clk-gate-93.c b/drivers/clk/imx/clk-gate-93.c
index 7acbcfec9610b359..7208138d615dfbd8 100644
--- a/drivers/clk/imx/clk-gate-93.c
+++ b/drivers/clk/imx/clk-gate-93.c
@@ -158,9 +158,9 @@ struct clk_hw *imx93_clk_gate(struct device *dev, const char *name, const char *
 			      unsigned long flags, void __iomem *reg, u32 bit_idx, u32 val,
 			      u32 mask, u32 domain_id, unsigned int *share_count)
 {
+	struct clk_init_data init = {};
 	struct imx93_clk_gate *gate;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 	u32 authen;
 
diff --git a/drivers/clk/imx/clk-gate-exclusive.c b/drivers/clk/imx/clk-gate-exclusive.c
index 504cfeef28a08b78..cf873e490362a239 100644
--- a/drivers/clk/imx/clk-gate-exclusive.c
+++ b/drivers/clk/imx/clk-gate-exclusive.c
@@ -59,9 +59,9 @@ struct clk_hw *imx_clk_hw_gate_exclusive(const char *name, const char *parent,
 	 void __iomem *reg, u8 shift, u32 exclusive_mask)
 {
 	struct clk_gate_exclusive *exgate;
+	struct clk_init_data init = {};
 	struct clk_gate *gate;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	if (exclusive_mask == 0)
diff --git a/drivers/clk/imx/clk-gate2.c b/drivers/clk/imx/clk-gate2.c
index f07cf82dd9c9a27d..c8b6323571eec93d 100644
--- a/drivers/clk/imx/clk-gate2.c
+++ b/drivers/clk/imx/clk-gate2.c
@@ -139,9 +139,9 @@ struct clk_hw *clk_hw_register_gate2(struct device *dev, const char *name,
 		u8 clk_gate2_flags, spinlock_t *lock,
 		unsigned int *share_count)
 {
+	struct clk_init_data init = {};
 	struct clk_gate2 *gate;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	gate = kzalloc_obj(struct clk_gate2);
diff --git a/drivers/clk/imx/clk-lpcg-scu.c b/drivers/clk/imx/clk-lpcg-scu.c
index 03bbfbe9bff3d38d..da110a823fd5bafa 100644
--- a/drivers/clk/imx/clk-lpcg-scu.c
+++ b/drivers/clk/imx/clk-lpcg-scu.c
@@ -114,8 +114,8 @@ struct clk_hw *__imx_clk_lpcg_scu(struct device *dev, const char *name,
 				  const char *parent_name, unsigned long flags,
 				  void __iomem *reg, u8 bit_idx, bool hw_gate)
 {
+	struct clk_init_data init = {};
 	struct clk_lpcg_scu *clk;
-	struct clk_init_data init;
 	struct clk_hw *hw;
 	int ret;
 
diff --git a/drivers/clk/imx/clk-pfd.c b/drivers/clk/imx/clk-pfd.c
index e7a5d80c50083b39..e56bb27e57cc9242 100644
--- a/drivers/clk/imx/clk-pfd.c
+++ b/drivers/clk/imx/clk-pfd.c
@@ -127,9 +127,9 @@ static const struct clk_ops clk_pfd_ops = {
 struct clk_hw *imx_clk_hw_pfd(const char *name, const char *parent_name,
 			void __iomem *reg, u8 idx)
 {
+	struct clk_init_data init = {};
 	struct clk_pfd *pfd;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	pfd = kzalloc_obj(*pfd);
diff --git a/drivers/clk/imx/clk-pfdv2.c b/drivers/clk/imx/clk-pfdv2.c
index 0f92b92e2229fd97..43ba79e47eac564a 100644
--- a/drivers/clk/imx/clk-pfdv2.c
+++ b/drivers/clk/imx/clk-pfdv2.c
@@ -203,7 +203,7 @@ static const struct clk_ops clk_pfdv2_ops = {
 struct clk_hw *imx_clk_hw_pfdv2(enum imx_pfdv2_type type, const char *name,
 			     const char *parent_name, void __iomem *reg, u8 idx)
 {
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct clk_pfdv2 *pfd;
 	struct clk_hw *hw;
 	int ret;
diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c
index b6f1cc9f570059b7..2f9e36f9e2409ac3 100644
--- a/drivers/clk/imx/clk-pll14xx.c
+++ b/drivers/clk/imx/clk-pll14xx.c
@@ -515,9 +515,9 @@ struct clk_hw *imx_dev_clk_hw_pll14xx(struct device *dev, const char *name,
 				const char *parent_name, void __iomem *base,
 				const struct imx_pll14xx_clk *pll_clk)
 {
+	struct clk_init_data init = {};
 	struct clk_pll14xx *pll;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 	u32 val;
 
diff --git a/drivers/clk/imx/clk-pllv1.c b/drivers/clk/imx/clk-pllv1.c
index da5531e57da2a782..ee60c7660ef49041 100644
--- a/drivers/clk/imx/clk-pllv1.c
+++ b/drivers/clk/imx/clk-pllv1.c
@@ -114,9 +114,9 @@ static const struct clk_ops clk_pllv1_ops = {
 struct clk_hw *imx_clk_hw_pllv1(enum imx_pllv1_type type, const char *name,
 		const char *parent, void __iomem *base)
 {
+	struct clk_init_data init = {};
 	struct clk_pllv1 *pll;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	pll = kmalloc_obj(*pll);
diff --git a/drivers/clk/imx/clk-pllv2.c b/drivers/clk/imx/clk-pllv2.c
index 43396388030e30e5..aacc3d84e797c2e8 100644
--- a/drivers/clk/imx/clk-pllv2.c
+++ b/drivers/clk/imx/clk-pllv2.c
@@ -249,9 +249,9 @@ static const struct clk_ops clk_pllv2_ops = {
 struct clk_hw *imx_clk_hw_pllv2(const char *name, const char *parent,
 		void __iomem *base)
 {
+	struct clk_init_data init = {};
 	struct clk_pllv2 *pll;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	pll = kzalloc_obj(*pll);
diff --git a/drivers/clk/imx/clk-pllv3.c b/drivers/clk/imx/clk-pllv3.c
index a0ad6f4aae8fa5cc..714d9c723e167d3b 100644
--- a/drivers/clk/imx/clk-pllv3.c
+++ b/drivers/clk/imx/clk-pllv3.c
@@ -422,8 +422,8 @@ struct clk_hw *imx_clk_hw_pllv3(enum imx_pllv3_type type, const char *name,
 {
 	struct clk_pllv3 *pll;
 	const struct clk_ops *ops;
+	struct clk_init_data init = {};
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	pll = kzalloc_obj(*pll);
diff --git a/drivers/clk/imx/clk-pllv4.c b/drivers/clk/imx/clk-pllv4.c
index 8fa2f7111ce9b220..6dc9640d2f19b893 100644
--- a/drivers/clk/imx/clk-pllv4.c
+++ b/drivers/clk/imx/clk-pllv4.c
@@ -246,9 +246,9 @@ static const struct clk_ops clk_pllv4_ops = {
 struct clk_hw *imx_clk_hw_pllv4(enum imx_pllv4_type type, const char *name,
 		 const char *parent_name, void __iomem *base)
 {
+	struct clk_init_data init = {};
 	struct clk_pllv4 *pll;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	pll = kzalloc_obj(*pll);
diff --git a/drivers/clk/imx/clk-scu.c b/drivers/clk/imx/clk-scu.c
index 44220e9c5c2a2331..0d034e206c6bc806 100644
--- a/drivers/clk/imx/clk-scu.c
+++ b/drivers/clk/imx/clk-scu.c
@@ -445,7 +445,7 @@ struct clk_hw *__imx_clk_scu(struct device *dev, const char *name,
 			     const char * const *parents, int num_parents,
 			     u32 rsrc_id, u8 clk_type)
 {
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct clk_scu *clk;
 	struct clk_hw *hw;
 	int ret;
@@ -839,9 +839,9 @@ struct clk_hw *__imx_clk_gpr_scu(const char *name, const char * const *parent_na
 				 bool invert)
 {
 	struct imx_scu_clk_node *clk_node;
+	struct clk_init_data init = {};
 	struct clk_gpr_scu *clk;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	if (rsrc_id >= IMX_SC_R_LAST || gpr_id >= IMX_SC_C_LAST)
diff --git a/drivers/clk/imx/clk-sscg-pll.c b/drivers/clk/imx/clk-sscg-pll.c
index 7f104ecfa80fee49..f6286ec11e0c07d9 100644
--- a/drivers/clk/imx/clk-sscg-pll.c
+++ b/drivers/clk/imx/clk-sscg-pll.c
@@ -504,8 +504,8 @@ struct clk_hw *imx_clk_hw_sscg_pll(const char *name,
 				void __iomem *base,
 				unsigned long flags)
 {
+	struct clk_init_data init = {};
 	struct clk_sscg_pll *pll;
-	struct clk_init_data init;
 	struct clk_hw *hw;
 	int ret;
 
-- 
2.43.0


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

* [PATCH 14/45] clk: ingenic: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (12 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 13/45] clk: imx: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21 10:57   ` Paul Cercueil
  2026-08-21  8:53 ` [PATCH 15/45] clk: keystone: " Geert Uytterhoeven
                   ` (30 subsequent siblings)
  44 siblings, 1 reply; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/ingenic/cgu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/ingenic/cgu.c b/drivers/clk/ingenic/cgu.c
index 41e4c69131bd6ec7..ad223aa20e8db5a5 100644
--- a/drivers/clk/ingenic/cgu.c
+++ b/drivers/clk/ingenic/cgu.c
@@ -644,8 +644,8 @@ static const struct clk_ops ingenic_clk_ops = {
 static int ingenic_register_clock(struct ingenic_cgu *cgu, unsigned idx)
 {
 	const struct ingenic_cgu_clk_info *clk_info = &cgu->clock_info[idx];
-	struct clk_init_data clk_init;
 	struct ingenic_clk *ingenic_clk = NULL;
+	struct clk_init_data clk_init = {};
 	struct clk *clk, *parent;
 	const char *parent_names[4];
 	unsigned caps, i, num_possible;
-- 
2.43.0


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

* [PATCH 15/45] clk: keystone: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (13 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 14/45] clk: ingenic: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 16/45] clk: lmk04832: " Geert Uytterhoeven
                   ` (29 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/keystone/gate.c       | 2 +-
 drivers/clk/keystone/pll.c        | 2 +-
 drivers/clk/keystone/syscon-clk.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/keystone/gate.c b/drivers/clk/keystone/gate.c
index 03e854f10fd98afc..e83e3d4c7d67a1ac 100644
--- a/drivers/clk/keystone/gate.c
+++ b/drivers/clk/keystone/gate.c
@@ -164,7 +164,7 @@ static struct clk *clk_register_psc(struct device *dev,
 			struct clk_psc_data *psc_data,
 			spinlock_t *lock)
 {
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct clk_psc *psc;
 	struct clk *clk;
 
diff --git a/drivers/clk/keystone/pll.c b/drivers/clk/keystone/pll.c
index ed197ee0cc88f8e5..020d5f4e9ed64119 100644
--- a/drivers/clk/keystone/pll.c
+++ b/drivers/clk/keystone/pll.c
@@ -122,7 +122,7 @@ static struct clk *clk_register_pll(struct device *dev,
 			const char *parent_name,
 			struct clk_pll_data *pll_data)
 {
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct clk_pll *pll;
 	struct clk *clk;
 
diff --git a/drivers/clk/keystone/syscon-clk.c b/drivers/clk/keystone/syscon-clk.c
index ecf180a7949c9345..338174be41215fe9 100644
--- a/drivers/clk/keystone/syscon-clk.c
+++ b/drivers/clk/keystone/syscon-clk.c
@@ -67,7 +67,7 @@ static struct clk_hw
 			     const struct ti_syscon_gate_clk_data *data)
 {
 	struct ti_syscon_gate_clk_priv *priv;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	char *name = NULL;
 	int ret;
 
-- 
2.43.0


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

* [PATCH 16/45] clk: lmk04832: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (14 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 15/45] clk: keystone: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 17/45] clk: mediatek: " Geert Uytterhoeven
                   ` (28 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/clk-lmk04832.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/clk-lmk04832.c b/drivers/clk/clk-lmk04832.c
index f9a0684d2628eb7a..10e5cfa96e6be195 100644
--- a/drivers/clk/clk-lmk04832.c
+++ b/drivers/clk/clk-lmk04832.c
@@ -587,8 +587,8 @@ static const struct clk_ops lmk04832_vco_ops = {
  */
 static int lmk04832_register_vco(struct lmk04832 *lmk)
 {
+	struct clk_init_data init = {};
 	const char *parent_names[1];
-	struct clk_init_data init;
 	int ret;
 
 	init.name = "lmk-vco";
@@ -947,8 +947,8 @@ static const struct clk_ops lmk04832_sclk_ops = {
 
 static int lmk04832_register_sclk(struct lmk04832 *lmk)
 {
+	struct clk_init_data init = {};
 	const char *parent_names[1];
-	struct clk_init_data init;
 	int ret;
 
 	init.name = "lmk-sclk";
@@ -1292,8 +1292,8 @@ static int lmk04832_register_clkout(struct lmk04832 *lmk, const int num)
 {
 	char name[] = "lmk-clkoutXX";
 	char dclk_name[] = "lmk-dclkXX_YY";
+	struct clk_init_data init = {};
 	const char *parent_names[2];
-	struct clk_init_data init;
 	int dclk_num = num / 2;
 	int ret;
 
-- 
2.43.0


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

* [PATCH 17/45] clk: mediatek: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (15 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 16/45] clk: lmk04832: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 18/45] clk: milbeaut: " Geert Uytterhoeven
                   ` (27 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/mediatek/clk-cpumux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/mediatek/clk-cpumux.c b/drivers/clk/mediatek/clk-cpumux.c
index 412558b9512772cd..9799bc156dccd650 100644
--- a/drivers/clk/mediatek/clk-cpumux.c
+++ b/drivers/clk/mediatek/clk-cpumux.c
@@ -62,9 +62,9 @@ static struct clk_hw *
 mtk_clk_register_cpumux(struct device *dev, const struct mtk_composite *mux,
 			struct regmap *regmap)
 {
+	struct clk_init_data init = {};
 	struct mtk_clk_cpumux *cpumux;
 	int ret;
-	struct clk_init_data init;
 
 	cpumux = kzalloc_obj(*cpumux);
 	if (!cpumux)
-- 
2.43.0


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

* [PATCH 18/45] clk: milbeaut: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (16 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 17/45] clk: mediatek: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 19/45] clk: mmp: " Geert Uytterhoeven
                   ` (26 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/clk-milbeaut.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/clk-milbeaut.c b/drivers/clk/clk-milbeaut.c
index 4265bc442dfd2988..485540b9552820b1 100644
--- a/drivers/clk/clk-milbeaut.c
+++ b/drivers/clk/clk-milbeaut.c
@@ -328,9 +328,9 @@ static struct clk_hw *m10v_clk_hw_register_mux(struct device *dev,
 			u8 shift, u32 mask, u8 clk_mux_flags, u32 *table,
 			spinlock_t *lock)
 {
+	struct clk_init_data init = {};
 	struct clk_mux *mux;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	mux = kzalloc_obj(*mux);
@@ -459,9 +459,9 @@ static struct clk_hw *m10v_clk_hw_register_divider(struct device *dev,
 		u8 clk_divider_flags, const struct clk_div_table *table,
 		spinlock_t *lock, void __iomem *write_valid_reg)
 {
+	struct clk_init_data init = {};
 	struct m10v_clk_divider *div;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	div = kzalloc_obj(*div);
-- 
2.43.0


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

* [PATCH 19/45] clk: mmp: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (17 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 18/45] clk: milbeaut: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 20/45] clk: mvebu: " Geert Uytterhoeven
                   ` (25 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/mmp/clk-apbc.c | 2 +-
 drivers/clk/mmp/clk-apmu.c | 2 +-
 drivers/clk/mmp/clk-frac.c | 2 +-
 drivers/clk/mmp/clk-gate.c | 2 +-
 drivers/clk/mmp/clk-mix.c  | 2 +-
 drivers/clk/mmp/clk-pll.c  | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/clk/mmp/clk-apbc.c b/drivers/clk/mmp/clk-apbc.c
index 84532ce8fd09431c..338ccd8fe99ca644 100644
--- a/drivers/clk/mmp/clk-apbc.c
+++ b/drivers/clk/mmp/clk-apbc.c
@@ -120,9 +120,9 @@ struct clk *mmp_clk_register_apbc(const char *name, const char *parent_name,
 		void __iomem *base, unsigned int delay,
 		unsigned int apbc_flags, spinlock_t *lock)
 {
+	struct clk_init_data init = {};
 	struct clk_apbc *apbc;
 	struct clk *clk;
-	struct clk_init_data init;
 
 	apbc = kzalloc_obj(*apbc);
 	if (!apbc)
diff --git a/drivers/clk/mmp/clk-apmu.c b/drivers/clk/mmp/clk-apmu.c
index 30bbac1deca14289..887854d8f5b1d645 100644
--- a/drivers/clk/mmp/clk-apmu.c
+++ b/drivers/clk/mmp/clk-apmu.c
@@ -65,9 +65,9 @@ static const struct clk_ops clk_apmu_ops = {
 struct clk *mmp_clk_register_apmu(const char *name, const char *parent_name,
 		void __iomem *base, u32 enable_mask, spinlock_t *lock)
 {
+	struct clk_init_data init = {};
 	struct clk_apmu *apmu;
 	struct clk *clk;
-	struct clk_init_data init;
 
 	apmu = kzalloc_obj(*apmu);
 	if (!apmu)
diff --git a/drivers/clk/mmp/clk-frac.c b/drivers/clk/mmp/clk-frac.c
index 13bfc4c99f3ae5b9..5774354563aa672d 100644
--- a/drivers/clk/mmp/clk-frac.c
+++ b/drivers/clk/mmp/clk-frac.c
@@ -171,8 +171,8 @@ struct clk *mmp_clk_register_factor(const char *name, const char *parent_name,
 		struct mmp_clk_factor_masks *masks,
 		struct u32_fract *ftbl, unsigned int ftbl_cnt, spinlock_t *lock)
 {
+	struct clk_init_data init = {};
 	struct mmp_clk_factor *factor;
-	struct clk_init_data init;
 	struct clk *clk;
 
 	if (!masks) {
diff --git a/drivers/clk/mmp/clk-gate.c b/drivers/clk/mmp/clk-gate.c
index cc2f841ae9d96316..e8dad4ed0125ef7a 100644
--- a/drivers/clk/mmp/clk-gate.c
+++ b/drivers/clk/mmp/clk-gate.c
@@ -94,9 +94,9 @@ struct clk *mmp_clk_register_gate(struct device *dev, const char *name,
 		void __iomem *reg, u32 mask, u32 val_enable, u32 val_disable,
 		unsigned int gate_flags, spinlock_t *lock)
 {
+	struct clk_init_data init = {};
 	struct mmp_clk_gate *gate;
 	struct clk *clk;
-	struct clk_init_data init;
 
 	/* allocate the gate */
 	gate = kzalloc_obj(*gate);
diff --git a/drivers/clk/mmp/clk-mix.c b/drivers/clk/mmp/clk-mix.c
index b1c9899c71afba0c..2f3d1cb6f836c6c6 100644
--- a/drivers/clk/mmp/clk-mix.c
+++ b/drivers/clk/mmp/clk-mix.c
@@ -444,9 +444,9 @@ struct clk *mmp_clk_register_mix(struct device *dev,
 					struct mmp_clk_mix_config *config,
 					spinlock_t *lock)
 {
+	struct clk_init_data init = {};
 	struct mmp_clk_mix *mix;
 	struct clk *clk;
-	struct clk_init_data init;
 
 	mix = kzalloc_obj(*mix);
 	if (!mix)
diff --git a/drivers/clk/mmp/clk-pll.c b/drivers/clk/mmp/clk-pll.c
index 430f5e3c8540e863..e0ea29b5bb66cf98 100644
--- a/drivers/clk/mmp/clk-pll.c
+++ b/drivers/clk/mmp/clk-pll.c
@@ -104,9 +104,9 @@ static struct clk *mmp_clk_register_pll(char *name,
 			unsigned long input_rate,
 			void __iomem *postdiv_reg, u8 postdiv_shift)
 {
+	struct clk_init_data init = {};
 	struct mmp_clk_pll *pll;
 	struct clk *clk;
-	struct clk_init_data init;
 
 	pll = kzalloc_obj(*pll);
 	if (!pll)
-- 
2.43.0


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

* [PATCH 20/45] clk: mvebu: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (18 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 19/45] clk: mmp: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 21/45] clk: mxs: " Geert Uytterhoeven
                   ` (24 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/mvebu/ap-cpu-clk.c  | 2 +-
 drivers/clk/mvebu/clk-corediv.c | 2 +-
 drivers/clk/mvebu/clk-cpu.c     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/mvebu/ap-cpu-clk.c b/drivers/clk/mvebu/ap-cpu-clk.c
index 1e44ace7d95197b2..721cad4218677163 100644
--- a/drivers/clk/mvebu/ap-cpu-clk.c
+++ b/drivers/clk/mvebu/ap-cpu-clk.c
@@ -286,7 +286,7 @@ static int ap_cpu_clock_probe(struct platform_device *pdev)
 
 	for_each_of_cpu_node(dn) {
 		char *clk_name = "cpu-cluster-0";
-		struct clk_init_data init;
+		struct clk_init_data init = {};
 		const char *parent_name;
 		struct clk *parent;
 		u64 cpu;
diff --git a/drivers/clk/mvebu/clk-corediv.c b/drivers/clk/mvebu/clk-corediv.c
index ae48293b0c413fc0..e26ada3c29aeb0c1 100644
--- a/drivers/clk/mvebu/clk-corediv.c
+++ b/drivers/clk/mvebu/clk-corediv.c
@@ -253,7 +253,7 @@ static void __init
 mvebu_corediv_clk_init(struct device_node *node,
 		       const struct clk_corediv_soc_desc *soc_desc)
 {
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct clk_corediv *corediv;
 	struct clk **clks;
 	void __iomem *base;
diff --git a/drivers/clk/mvebu/clk-cpu.c b/drivers/clk/mvebu/clk-cpu.c
index 24196e288fe29cae..a7646a25726b64a5 100644
--- a/drivers/clk/mvebu/clk-cpu.c
+++ b/drivers/clk/mvebu/clk-cpu.c
@@ -192,7 +192,7 @@ static void __init of_cpu_clk_setup(struct device_node *node)
 		goto clks_out;
 
 	for_each_possible_cpu(cpu) {
-		struct clk_init_data init;
+		struct clk_init_data init = {};
 		struct clk *clk;
 		char *clk_name = kzalloc(5, GFP_KERNEL);
 
-- 
2.43.0


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

* [PATCH 21/45] clk: mxs: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (19 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 20/45] clk: mvebu: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 22/45] clk: nomadik: " Geert Uytterhoeven
                   ` (23 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/mxs/clk-div.c  | 2 +-
 drivers/clk/mxs/clk-frac.c | 2 +-
 drivers/clk/mxs/clk-pll.c  | 2 +-
 drivers/clk/mxs/clk-ref.c  | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/mxs/clk-div.c b/drivers/clk/mxs/clk-div.c
index fe7224162b3cc0fa..d4ee785c651190f0 100644
--- a/drivers/clk/mxs/clk-div.c
+++ b/drivers/clk/mxs/clk-div.c
@@ -70,9 +70,9 @@ static const struct clk_ops clk_div_ops = {
 struct clk *mxs_clk_div(const char *name, const char *parent_name,
 			void __iomem *reg, u8 shift, u8 width, u8 busy)
 {
+	struct clk_init_data init = {};
 	struct clk_div *div;
 	struct clk *clk;
-	struct clk_init_data init;
 
 	div = kzalloc_obj(*div);
 	if (!div)
diff --git a/drivers/clk/mxs/clk-frac.c b/drivers/clk/mxs/clk-frac.c
index 52eb82fde322dcc4..e317710ab503a84a 100644
--- a/drivers/clk/mxs/clk-frac.c
+++ b/drivers/clk/mxs/clk-frac.c
@@ -112,9 +112,9 @@ static const struct clk_ops clk_frac_ops = {
 struct clk *mxs_clk_frac(const char *name, const char *parent_name,
 			 void __iomem *reg, u8 shift, u8 width, u8 busy)
 {
+	struct clk_init_data init = {};
 	struct clk_frac *frac;
 	struct clk *clk;
-	struct clk_init_data init;
 
 	frac = kzalloc_obj(*frac);
 	if (!frac)
diff --git a/drivers/clk/mxs/clk-pll.c b/drivers/clk/mxs/clk-pll.c
index 581868e0693c6e5e..5acf48cddbb2859f 100644
--- a/drivers/clk/mxs/clk-pll.c
+++ b/drivers/clk/mxs/clk-pll.c
@@ -82,9 +82,9 @@ static const struct clk_ops clk_pll_ops = {
 struct clk *mxs_clk_pll(const char *name, const char *parent_name,
 			void __iomem *base, u8 power, unsigned long rate)
 {
+	struct clk_init_data init = {};
 	struct clk_pll *pll;
 	struct clk *clk;
-	struct clk_init_data init;
 
 	pll = kzalloc_obj(*pll);
 	if (!pll)
diff --git a/drivers/clk/mxs/clk-ref.c b/drivers/clk/mxs/clk-ref.c
index 9667d4d3c2a885eb..66ea1c229014ed60 100644
--- a/drivers/clk/mxs/clk-ref.c
+++ b/drivers/clk/mxs/clk-ref.c
@@ -113,9 +113,9 @@ static const struct clk_ops clk_ref_ops = {
 struct clk *mxs_clk_ref(const char *name, const char *parent_name,
 			void __iomem *reg, u8 idx)
 {
+	struct clk_init_data init = {};
 	struct clk_ref *ref;
 	struct clk *clk;
-	struct clk_init_data init;
 
 	ref = kzalloc_obj(*ref);
 	if (!ref)
-- 
2.43.0


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

* [PATCH 22/45] clk: nomadik: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (20 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 21/45] clk: mxs: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 23/45] clk: npcm7xx: " Geert Uytterhoeven
                   ` (22 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/clk-nomadik.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/clk-nomadik.c b/drivers/clk/clk-nomadik.c
index da6b89759a14ecb0..890084b3912b4cb5 100644
--- a/drivers/clk/clk-nomadik.c
+++ b/drivers/clk/clk-nomadik.c
@@ -263,7 +263,7 @@ pll_clk_register(struct device *dev, const char *name,
 {
 	int ret;
 	struct clk_pll *pll;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 
 	if (id != 1 && id != 2) {
 		pr_err("%s: the Nomadik has only PLL 1 & 2\n", __func__);
@@ -355,7 +355,7 @@ src_clk_register(struct device *dev, const char *name,
 {
 	int ret;
 	struct clk_src *sclk;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 
 	sclk = kzalloc_obj(*sclk);
 	if (!sclk)
-- 
2.43.0


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

* [PATCH 23/45] clk: npcm7xx: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (21 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 22/45] clk: nomadik: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 24/45] clk: nxp: " Geert Uytterhoeven
                   ` (21 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/clk-npcm7xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-npcm7xx.c b/drivers/clk/clk-npcm7xx.c
index 79eca6ee3120c646..562d2d406d7a00fc 100644
--- a/drivers/clk/clk-npcm7xx.c
+++ b/drivers/clk/clk-npcm7xx.c
@@ -69,8 +69,8 @@ static struct clk_hw *
 npcm7xx_clk_register_pll(void __iomem *pllcon, const char *name,
 			 const char *parent_name, unsigned long flags)
 {
+	struct clk_init_data init = {};
 	struct npcm7xx_clk_pll *pll;
-	struct clk_init_data init;
 	struct clk_hw *hw;
 	int ret;
 
-- 
2.43.0


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

* [PATCH 24/45] clk: nxp: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (22 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 23/45] clk: npcm7xx: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21 11:52   ` Vladimir Zapolskiy
  2026-08-21  8:53 ` [PATCH 25/45] clk: pistachio: " Geert Uytterhoeven
                   ` (20 subsequent siblings)
  44 siblings, 1 reply; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/nxp/clk-lpc18xx-creg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/nxp/clk-lpc18xx-creg.c b/drivers/clk/nxp/clk-lpc18xx-creg.c
index 3d3982e9c661a5c2..de3c214a80fcf903 100644
--- a/drivers/clk/nxp/clk-lpc18xx-creg.c
+++ b/drivers/clk/nxp/clk-lpc18xx-creg.c
@@ -138,7 +138,7 @@ static struct clk *clk_register_creg_clk(struct device *dev,
 					 const char **parent_name,
 					 struct regmap *syscon)
 {
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 
 	init.ops = creg_clk->ops;
 	init.name = creg_clk->name;
-- 
2.43.0


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

* [PATCH 25/45] clk: pistachio: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (23 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 24/45] clk: nxp: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 26/45] clk: pwm: " Geert Uytterhoeven
                   ` (19 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/pistachio/clk-pll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/pistachio/clk-pll.c b/drivers/clk/pistachio/clk-pll.c
index 5b268a985a9c7d0e..ad997a777632a842 100644
--- a/drivers/clk/pistachio/clk-pll.c
+++ b/drivers/clk/pistachio/clk-pll.c
@@ -453,8 +453,8 @@ static struct clk *pll_register(const char *name, const char *parent_name,
 				struct pistachio_pll_rate_table *rates,
 				unsigned int nr_rates)
 {
+	struct clk_init_data init = {};
 	struct pistachio_clk_pll *pll;
-	struct clk_init_data init;
 	struct clk *clk;
 
 	pll = kzalloc_obj(*pll);
-- 
2.43.0


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

* [PATCH 26/45] clk: pwm: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (24 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 25/45] clk: pistachio: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 27/45] clk: renesas: " Geert Uytterhoeven
                   ` (18 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/clk-pwm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-pwm.c b/drivers/clk/clk-pwm.c
index 4709f0338e373b57..2001c7c9367c00ec 100644
--- a/drivers/clk/clk-pwm.c
+++ b/drivers/clk/clk-pwm.c
@@ -95,7 +95,7 @@ static const struct clk_ops clk_pwm_ops = {
 static int clk_pwm_probe(struct platform_device *pdev)
 {
 	struct device_node *node = pdev->dev.of_node;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct clk_pwm *clk_pwm;
 	struct pwm_device *pwm;
 	struct pwm_args pargs;
-- 
2.43.0


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

* [PATCH 27/45] clk: renesas: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (25 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 26/45] clk: pwm: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 28/45] clk: rockchip: " Geert Uytterhoeven
                   ` (17 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Boot-tested on RZ/Five.
---
 drivers/clk/renesas/rzg2l-cpg.c | 18 +++++++++---------
 drivers/clk/renesas/rzv2h-cpg.c |  8 ++++----
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/clk/renesas/rzg2l-cpg.c b/drivers/clk/renesas/rzg2l-cpg.c
index 88d74858687d4866..50b64eb3eafebe71 100644
--- a/drivers/clk/renesas/rzg2l-cpg.c
+++ b/drivers/clk/renesas/rzg2l-cpg.c
@@ -580,7 +580,7 @@ rzg2l_cpg_sd_mux_clk_register(const struct cpg_core_clk *core,
 			      struct rzg2l_cpg_priv *priv)
 {
 	struct sd_mux_hw_data *sd_mux_hw_data;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct clk_hw *clk_hw;
 	int ret;
 
@@ -831,9 +831,9 @@ rzg2l_cpg_dsi_div_clk_register(const struct cpg_core_clk *core,
 			       struct rzg2l_cpg_priv *priv)
 {
 	struct dsi_div_hw_data *clk_hw_data;
+	struct clk_init_data init = {};
 	const struct clk *parent;
 	const char *parent_name;
-	struct clk_init_data init;
 	struct clk_hw *clk_hw;
 	int ret;
 
@@ -916,8 +916,8 @@ static struct clk * __init
 rzg3l_cpg_lvds_div_clk_register(const struct cpg_core_clk *core,
 				struct rzg2l_cpg_priv *priv)
 {
+	struct clk_init_data init = {};
 	struct clk_fixed_factor *ff;
-	struct clk_init_data init;
 	const struct clk *parent;
 	const char *parent_name;
 	int ret;
@@ -1031,9 +1031,9 @@ rzg3l_cpg_dsi_div_clk_register(const struct cpg_core_clk *core,
 			       struct rzg2l_cpg_priv *priv)
 {
 	struct g3l_dsi_div_hw_data *clk_hw_data;
+	struct clk_init_data init = {};
 	const struct clk *parent;
 	const char *parent_name;
-	struct clk_init_data init;
 	struct clk_hw *clk_hw;
 	int ret;
 
@@ -1128,7 +1128,7 @@ rzg2l_cpg_pll5_4_mux_clk_register(const struct cpg_core_clk *core,
 				  struct rzg2l_cpg_priv *priv)
 {
 	struct pll5_mux_hw_data *clk_hw_data;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct clk_hw *clk_hw;
 	int ret;
 
@@ -1255,8 +1255,8 @@ static struct clk * __init
 rzg2l_cpg_sipll5_register(const struct cpg_core_clk *core,
 			  struct rzg2l_cpg_priv *priv)
 {
+	struct clk_init_data init = {};
 	const struct clk *parent;
-	struct clk_init_data init;
 	const char *parent_name;
 	struct sipll5 *sipll5;
 	struct clk_hw *clk_hw;
@@ -1381,9 +1381,9 @@ rzg2l_cpg_pll_clk_register(const struct cpg_core_clk *core,
 			   struct rzg2l_cpg_priv *priv,
 			   const struct clk_ops *ops)
 {
+	struct clk_init_data init = {};
 	struct device *dev = priv->dev;
 	const struct clk *parent;
-	struct clk_init_data init;
 	const char *parent_name;
 	struct pll_clk *pll_clk;
 	int ret;
@@ -1525,8 +1525,8 @@ static struct clk * __init
 rzg3l_cpg_dsi_mux_clk_register(const struct cpg_core_clk *core,
 			       struct rzg2l_cpg_priv *priv)
 {
+	struct clk_init_data init = {};
 	struct clk_mux *mux_data;
-	struct clk_init_data init;
 	int ret;
 
 	mux_data = devm_kzalloc(priv->dev, sizeof(*mux_data), GFP_KERNEL);
@@ -2265,10 +2265,10 @@ rzg2l_cpg_register_mod_clk(const struct rzg2l_mod_clk *mod,
 			   const struct rzg2l_cpg_info *info,
 			   struct rzg2l_cpg_priv *priv)
 {
+	struct clk_init_data init = {};
 	struct mod_clock *clock = NULL;
 	struct device *dev = priv->dev;
 	unsigned int id = mod->id;
-	struct clk_init_data init;
 	struct clk *parent, *clk;
 	const char *parent_name;
 	unsigned int i;
diff --git a/drivers/clk/renesas/rzv2h-cpg.c b/drivers/clk/renesas/rzv2h-cpg.c
index 917fc737f254b916..7003d59ac34b1179 100644
--- a/drivers/clk/renesas/rzv2h-cpg.c
+++ b/drivers/clk/renesas/rzv2h-cpg.c
@@ -338,7 +338,7 @@ rzv2h_cpg_plldsi_div_clk_register(const struct cpg_core_clk *core,
 {
 	struct rzv2h_plldsi_div_clk *clk_hw_data;
 	struct clk **clks = priv->clks;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	const struct clk *parent;
 	const char *parent_name;
 	struct clk_hw *clk_hw;
@@ -582,7 +582,7 @@ rzv2h_cpg_plldsi_smux_clk_register(const struct cpg_core_clk *core,
 				   struct rzv2h_cpg_priv *priv)
 {
 	struct rzv2h_plldsi_mux_clk *clk_hw_data;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct clk_hw *clk_hw;
 	struct smuxed smux;
 	int ret;
@@ -711,7 +711,7 @@ rzv2h_cpg_pll_clk_register(const struct cpg_core_clk *core,
 			   const struct clk_ops *ops)
 {
 	struct device *dev = priv->dev;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	const struct clk *parent;
 	const char *parent_name;
 	struct pll_clk *pll_clk;
@@ -1229,7 +1229,7 @@ rzv2h_cpg_register_mod_clk(const struct rzv2h_mod_clk *mod,
 {
 	struct mod_clock *clock = NULL;
 	struct device *dev = priv->dev;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct clk *parent, *clk;
 	const char *parent_name;
 	unsigned int id;
-- 
2.43.0


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

* [PATCH 28/45] clk: rockchip: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (26 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 27/45] clk: renesas: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 29/45] clk: samsung: " Geert Uytterhoeven
                   ` (16 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/rockchip/clk-cpu.c       | 2 +-
 drivers/clk/rockchip/clk-ddr.c       | 2 +-
 drivers/clk/rockchip/clk-gate-grf.c  | 2 +-
 drivers/clk/rockchip/clk-inverter.c  | 2 +-
 drivers/clk/rockchip/clk-mmc-phase.c | 2 +-
 drivers/clk/rockchip/clk-muxgrf.c    | 2 +-
 drivers/clk/rockchip/clk-pll.c       | 2 +-
 drivers/clk/rockchip/clk.c           | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/clk/rockchip/clk-cpu.c b/drivers/clk/rockchip/clk-cpu.c
index 6205af9ba88a8def..eb6b8b878e4dbeea 100644
--- a/drivers/clk/rockchip/clk-cpu.c
+++ b/drivers/clk/rockchip/clk-cpu.c
@@ -304,7 +304,7 @@ struct clk *rockchip_clk_register_cpuclk(const char *name,
 			int nrates, void __iomem *reg_base, spinlock_t *lock)
 {
 	struct rockchip_cpuclk *cpuclk;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct clk *clk, *cclk;
 	int ret;
 
diff --git a/drivers/clk/rockchip/clk-ddr.c b/drivers/clk/rockchip/clk-ddr.c
index 81ae8a4ee30ed95c..fbb702d0b9d996d5 100644
--- a/drivers/clk/rockchip/clk-ddr.c
+++ b/drivers/clk/rockchip/clk-ddr.c
@@ -97,7 +97,7 @@ struct clk *rockchip_clk_register_ddrclk(const char *name, int flags,
 					 spinlock_t *lock)
 {
 	struct rockchip_ddrclk *ddrclk;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct clk *clk;
 
 	ddrclk = kzalloc_obj(*ddrclk);
diff --git a/drivers/clk/rockchip/clk-gate-grf.c b/drivers/clk/rockchip/clk-gate-grf.c
index 88e409e91a636aa1..458314a2569181d1 100644
--- a/drivers/clk/rockchip/clk-gate-grf.c
+++ b/drivers/clk/rockchip/clk-gate-grf.c
@@ -73,7 +73,7 @@ struct clk *rockchip_clk_register_gate_grf(const char *name,
 		u8 gate_flags)
 {
 	struct rockchip_gate_grf *gate;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct clk *clk;
 
 	if (IS_ERR(regmap)) {
diff --git a/drivers/clk/rockchip/clk-inverter.c b/drivers/clk/rockchip/clk-inverter.c
index bf9072ed9fd4daed..e6c7dad60e966288 100644
--- a/drivers/clk/rockchip/clk-inverter.c
+++ b/drivers/clk/rockchip/clk-inverter.c
@@ -75,8 +75,8 @@ struct clk *rockchip_clk_register_inverter(const char *name,
 				void __iomem *reg, int shift, int flags,
 				spinlock_t *lock)
 {
-	struct clk_init_data init;
 	struct rockchip_inv_clock *inv_clock;
+	struct clk_init_data init = {};
 	struct clk *clk;
 
 	inv_clock = kmalloc_obj(*inv_clock);
diff --git a/drivers/clk/rockchip/clk-mmc-phase.c b/drivers/clk/rockchip/clk-mmc-phase.c
index 4efd22953f3e0533..d92bea75faf73767 100644
--- a/drivers/clk/rockchip/clk-mmc-phase.c
+++ b/drivers/clk/rockchip/clk-mmc-phase.c
@@ -205,8 +205,8 @@ struct clk *rockchip_clk_register_mmc(const char *name,
 				struct regmap *grf, int grf_reg,
 				int shift)
 {
-	struct clk_init_data init;
 	struct rockchip_mmc_clock *mmc_clock;
+	struct clk_init_data init = {};
 	struct clk *clk;
 	int ret;
 
diff --git a/drivers/clk/rockchip/clk-muxgrf.c b/drivers/clk/rockchip/clk-muxgrf.c
index ccbb1379501ab474..ecdc77654813a3c3 100644
--- a/drivers/clk/rockchip/clk-muxgrf.c
+++ b/drivers/clk/rockchip/clk-muxgrf.c
@@ -59,7 +59,7 @@ struct clk *rockchip_clk_register_muxgrf(const char *name,
 				int shift, int width, int mux_flags)
 {
 	struct rockchip_muxgrf_clock *muxgrf_clock;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct clk *clk;
 
 	if (IS_ERR(regmap)) {
diff --git a/drivers/clk/rockchip/clk-pll.c b/drivers/clk/rockchip/clk-pll.c
index 706ca4b344d399a3..7204b09243d483ae 100644
--- a/drivers/clk/rockchip/clk-pll.c
+++ b/drivers/clk/rockchip/clk-pll.c
@@ -1069,7 +1069,7 @@ struct clk *rockchip_clk_register_pll(struct rockchip_clk_provider *ctx,
 		unsigned long flags, u8 clk_pll_flags)
 {
 	const char *pll_parents[3];
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct rockchip_clk_pll *pll;
 	struct clk_mux *pll_mux;
 	struct clk *pll_clk, *mux_clk;
diff --git a/drivers/clk/rockchip/clk.c b/drivers/clk/rockchip/clk.c
index ee8c79b938d3c15b..10df21178ba483e2 100644
--- a/drivers/clk/rockchip/clk.c
+++ b/drivers/clk/rockchip/clk.c
@@ -257,7 +257,7 @@ static struct clk *rockchip_clk_register_frac_branch(
 
 	if (child) {
 		struct clk_mux *frac_mux = &frac->mux;
-		struct clk_init_data init;
+		struct clk_init_data init = {};
 		struct clk *mux_clk;
 		int ret;
 
-- 
2.43.0


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

* [PATCH 29/45] clk: samsung: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (27 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 28/45] clk: rockchip: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21 11:04   ` Krzysztof Kozlowski
  2026-08-21  8:53 ` [PATCH 30/45] clk: scpi: " Geert Uytterhoeven
                   ` (15 subsequent siblings)
  44 siblings, 1 reply; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/samsung/clk-cpu.c | 2 +-
 drivers/clk/samsung/clk-pll.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/samsung/clk-cpu.c b/drivers/clk/samsung/clk-cpu.c
index 37cf47533dc610e1..a17ce26494f3ebd5 100644
--- a/drivers/clk/samsung/clk-cpu.c
+++ b/drivers/clk/samsung/clk-cpu.c
@@ -647,7 +647,7 @@ static int __init exynos_register_cpu_clock(struct samsung_clk_provider *ctx,
 	const struct clk_hw *parent, *alt_parent;
 	struct clk_hw **hws;
 	struct exynos_cpuclk *cpuclk;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	const char *parent_name;
 	unsigned int num_cfgs;
 	int ret = 0;
diff --git a/drivers/clk/samsung/clk-pll.c b/drivers/clk/samsung/clk-pll.c
index e74552846ba34105..813b8834ef16cc9b 100644
--- a/drivers/clk/samsung/clk-pll.c
+++ b/drivers/clk/samsung/clk-pll.c
@@ -1591,8 +1591,8 @@ static const struct clk_ops samsung_a9fraco_clk_min_ops = {
 static void __init _samsung_clk_register_pll(struct samsung_clk_provider *ctx,
 				const struct samsung_pll_clock *pll_clk)
 {
+	struct clk_init_data init = {};
 	struct samsung_clk_pll *pll;
-	struct clk_init_data init;
 	unsigned int len = 0;
 	int ret;
 
-- 
2.43.0


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

* [PATCH 30/45] clk: scpi: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (28 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 29/45] clk: samsung: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 31/45] clk: silabs: " Geert Uytterhoeven
                   ` (14 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/clk-scpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-scpi.c b/drivers/clk/clk-scpi.c
index 2328d2abf6d88012..16796cf3c89271a9 100644
--- a/drivers/clk/clk-scpi.c
+++ b/drivers/clk/clk-scpi.c
@@ -128,7 +128,7 @@ static int
 scpi_clk_ops_init(struct device *dev, const struct of_device_id *match,
 		  struct scpi_clk *sclk, const char *name)
 {
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	unsigned long min = 0, max = 0;
 	int ret;
 
-- 
2.43.0


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

* [PATCH 31/45] clk: silabs: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (29 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 30/45] clk: scpi: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 32/45] clk: socfpga: " Geert Uytterhoeven
                   ` (13 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/clk-si514.c  | 2 +-
 drivers/clk/clk-si5341.c | 2 +-
 drivers/clk/clk-si544.c  | 2 +-
 drivers/clk/clk-si570.c  | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/clk-si514.c b/drivers/clk/clk-si514.c
index c0b433ad93728343..07091b91420d16f8 100644
--- a/drivers/clk/clk-si514.c
+++ b/drivers/clk/clk-si514.c
@@ -337,8 +337,8 @@ static const struct regmap_config si514_regmap_config = {
 
 static int si514_probe(struct i2c_client *client)
 {
+	struct clk_init_data init = {};
 	struct clk_si514 *data;
-	struct clk_init_data init;
 	int err;
 
 	data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL);
diff --git a/drivers/clk/clk-si5341.c b/drivers/clk/clk-si5341.c
index 5311c23532b44b52..88522333525b6828 100644
--- a/drivers/clk/clk-si5341.c
+++ b/drivers/clk/clk-si5341.c
@@ -1556,8 +1556,8 @@ static const struct attribute *si5341_attributes[] = {
 
 static int si5341_probe(struct i2c_client *client)
 {
+	struct clk_init_data init = {};
 	struct clk_si5341 *data;
-	struct clk_init_data init;
 	struct clk *input;
 	const char *root_clock_name;
 	const char *synth_clock_names[SI5341_NUM_SYNTH] = { NULL };
diff --git a/drivers/clk/clk-si544.c b/drivers/clk/clk-si544.c
index 9c520128e0a2c403..3924ec3e216369ce 100644
--- a/drivers/clk/clk-si544.c
+++ b/drivers/clk/clk-si544.c
@@ -445,8 +445,8 @@ static const struct regmap_config si544_regmap_config = {
 
 static int si544_probe(struct i2c_client *client)
 {
+	struct clk_init_data init = {};
 	struct clk_si544 *data;
-	struct clk_init_data init;
 	int err;
 
 	data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL);
diff --git a/drivers/clk/clk-si570.c b/drivers/clk/clk-si570.c
index 3063e38c66da0e77..ac9013e7379c80ab 100644
--- a/drivers/clk/clk-si570.c
+++ b/drivers/clk/clk-si570.c
@@ -412,7 +412,7 @@ static const struct regmap_config si570_regmap_config = {
 static int si570_probe(struct i2c_client *client)
 {
 	struct clk_si570 *data;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	u32 initial_fout, factory_fout, stability;
 	bool skip_recall;
 	int err;
-- 
2.43.0


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

* [PATCH 32/45] clk: socfpga: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (30 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 31/45] clk: silabs: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 33/45] clk: spear: " Geert Uytterhoeven
                   ` (12 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/socfpga/clk-gate-a10.c   | 2 +-
 drivers/clk/socfpga/clk-gate-s10.c   | 6 +++---
 drivers/clk/socfpga/clk-gate.c       | 2 +-
 drivers/clk/socfpga/clk-periph-a10.c | 2 +-
 drivers/clk/socfpga/clk-periph-s10.c | 8 ++++----
 drivers/clk/socfpga/clk-periph.c     | 2 +-
 drivers/clk/socfpga/clk-pll-a10.c    | 2 +-
 drivers/clk/socfpga/clk-pll-s10.c    | 8 ++++----
 drivers/clk/socfpga/clk-pll.c        | 2 +-
 9 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/clk/socfpga/clk-gate-a10.c b/drivers/clk/socfpga/clk-gate-a10.c
index dd8d1713aaff7639..ba12179061b3fe9d 100644
--- a/drivers/clk/socfpga/clk-gate-a10.c
+++ b/drivers/clk/socfpga/clk-gate-a10.c
@@ -49,7 +49,7 @@ static void __init __socfpga_gate_init(struct device_node *node,
 	struct socfpga_gate_clk *socfpga_clk;
 	const char *clk_name = node->name;
 	const char *parent_name[SOCFPGA_MAX_PARENTS];
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	int rc;
 
 	socfpga_clk = kzalloc_obj(*socfpga_clk);
diff --git a/drivers/clk/socfpga/clk-gate-s10.c b/drivers/clk/socfpga/clk-gate-s10.c
index 24f56a9edc44e528..4b23909c58106599 100644
--- a/drivers/clk/socfpga/clk-gate-s10.c
+++ b/drivers/clk/socfpga/clk-gate-s10.c
@@ -128,7 +128,7 @@ struct clk_hw *s10_register_gate(const struct stratix10_gate_clock *clks, void _
 {
 	struct clk_hw *hw_clk;
 	struct socfpga_gate_clk *socfpga_clk;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	const char *parent_name = clks->parent_name;
 	int ret;
 
@@ -186,7 +186,7 @@ struct clk_hw *agilex_register_gate(const struct stratix10_gate_clock *clks, voi
 {
 	struct clk_hw *hw_clk;
 	struct socfpga_gate_clk *socfpga_clk;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	const char *parent_name = clks->parent_name;
 	int ret;
 
@@ -244,7 +244,7 @@ struct clk_hw *agilex5_register_gate(const struct agilex5_gate_clock *clks, void
 {
 	struct clk_hw *hw_clk;
 	struct socfpga_gate_clk *socfpga_clk;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	int ret;
 
 	socfpga_clk = kzalloc_obj(*socfpga_clk);
diff --git a/drivers/clk/socfpga/clk-gate.c b/drivers/clk/socfpga/clk-gate.c
index ced8e09884068a26..d0f9fa44ad182520 100644
--- a/drivers/clk/socfpga/clk-gate.c
+++ b/drivers/clk/socfpga/clk-gate.c
@@ -143,7 +143,7 @@ void __init socfpga_gate_init(struct device_node *node)
 	struct socfpga_gate_clk *socfpga_clk;
 	const char *clk_name = node->name;
 	const char *parent_name[SOCFPGA_MAX_PARENTS];
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct clk_ops *ops;
 	int rc;
 
diff --git a/drivers/clk/socfpga/clk-periph-a10.c b/drivers/clk/socfpga/clk-periph-a10.c
index 4eb5787f0dea3f8e..8aefc58ba4ec3944 100644
--- a/drivers/clk/socfpga/clk-periph-a10.c
+++ b/drivers/clk/socfpga/clk-periph-a10.c
@@ -65,7 +65,7 @@ static void __init __socfpga_periph_init(struct device_node *node,
 	struct socfpga_periph_clk *periph_clk;
 	const char *clk_name = node->name;
 	const char *parent_name[SOCFPGA_MAX_PARENTS];
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	int rc;
 	u32 fixed_div;
 	u32 div_reg[3];
diff --git a/drivers/clk/socfpga/clk-periph-s10.c b/drivers/clk/socfpga/clk-periph-s10.c
index 5195b9476da16977..dc923d0d87869743 100644
--- a/drivers/clk/socfpga/clk-periph-s10.c
+++ b/drivers/clk/socfpga/clk-periph-s10.c
@@ -103,7 +103,7 @@ struct clk_hw *s10_register_periph(const struct stratix10_perip_c_clock *clks,
 {
 	struct clk_hw *hw_clk;
 	struct socfpga_periph_clk *periph_clk;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	const char *name = clks->name;
 	const char *parent_name = clks->parent_name;
 	int ret;
@@ -139,7 +139,7 @@ struct clk_hw *n5x_register_periph(const struct n5x_perip_c_clock *clks,
 {
 	struct clk_hw *hw_clk;
 	struct socfpga_periph_clk *periph_clk;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	const char *name = clks->name;
 	const char *parent_name = clks->parent_name;
 	int ret;
@@ -174,7 +174,7 @@ struct clk_hw *s10_register_cnt_periph(const struct stratix10_perip_cnt_clock *c
 {
 	struct clk_hw *hw_clk;
 	struct socfpga_periph_clk *periph_clk;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	const char *name = clks->name;
 	const char *parent_name = clks->parent_name;
 	int ret;
@@ -220,7 +220,7 @@ struct clk_hw *agilex5_register_cnt_periph(const struct agilex5_perip_cnt_clock
 {
 	struct clk_hw *hw_clk;
 	struct socfpga_periph_clk *periph_clk;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	const char *name = clks->name;
 	int ret;
 
diff --git a/drivers/clk/socfpga/clk-periph.c b/drivers/clk/socfpga/clk-periph.c
index 3821db6777e75413..8fa3d8e20042d731 100644
--- a/drivers/clk/socfpga/clk-periph.c
+++ b/drivers/clk/socfpga/clk-periph.c
@@ -55,7 +55,7 @@ static void __init __socfpga_periph_init(struct device_node *node,
 	struct socfpga_periph_clk *periph_clk;
 	const char *clk_name = node->name;
 	const char *parent_name[SOCFPGA_MAX_PARENTS];
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	int rc;
 	u32 fixed_div;
 	u32 div_reg[3];
diff --git a/drivers/clk/socfpga/clk-pll-a10.c b/drivers/clk/socfpga/clk-pll-a10.c
index c56f276e8d51e00f..63b8b75045aead8d 100644
--- a/drivers/clk/socfpga/clk-pll-a10.c
+++ b/drivers/clk/socfpga/clk-pll-a10.c
@@ -71,7 +71,7 @@ static void __init __socfpga_pll_init(struct device_node *node,
 	struct socfpga_pll *pll_clk;
 	const char *clk_name = node->name;
 	const char *parent_name[SOCFGPA_MAX_PARENTS];
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct device_node *clkmgr_np;
 	int rc;
 	int i = 0;
diff --git a/drivers/clk/socfpga/clk-pll-s10.c b/drivers/clk/socfpga/clk-pll-s10.c
index ee236e87da33c020..1dca54b48375b168 100644
--- a/drivers/clk/socfpga/clk-pll-s10.c
+++ b/drivers/clk/socfpga/clk-pll-s10.c
@@ -192,7 +192,7 @@ struct clk_hw *s10_register_pll(const struct stratix10_pll_clock *clks,
 {
 	struct clk_hw *hw_clk;
 	struct socfpga_pll *pll_clk;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	const char *name = clks->name;
 	int ret;
 
@@ -232,7 +232,7 @@ struct clk_hw *agilex_register_pll(const struct stratix10_pll_clock *clks,
 {
 	struct clk_hw *hw_clk;
 	struct socfpga_pll *pll_clk;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	const char *name = clks->name;
 	int ret;
 
@@ -271,7 +271,7 @@ struct clk_hw *n5x_register_pll(const struct stratix10_pll_clock *clks,
 {
 	struct clk_hw *hw_clk;
 	struct socfpga_pll *pll_clk;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	const char *name = clks->name;
 	int ret;
 
@@ -310,7 +310,7 @@ struct clk_hw *agilex5_register_pll(const struct agilex5_pll_clock *clks,
 {
 	struct clk_hw *hw_clk;
 	struct socfpga_pll *pll_clk;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	const char *name = clks->name;
 	int ret;
 
diff --git a/drivers/clk/socfpga/clk-pll.c b/drivers/clk/socfpga/clk-pll.c
index f85adb16d414040f..aa13cc9d6db115fe 100644
--- a/drivers/clk/socfpga/clk-pll.c
+++ b/drivers/clk/socfpga/clk-pll.c
@@ -78,7 +78,7 @@ static void __init __socfpga_pll_init(struct device_node *node,
 	struct socfpga_pll *pll_clk;
 	const char *clk_name = node->name;
 	const char *parent_name[SOCFPGA_MAX_PARENTS];
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct device_node *clkmgr_np;
 	int rc;
 
-- 
2.43.0


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

* [PATCH 33/45] clk: spear: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (31 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 32/45] clk: socfpga: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 34/45] clk: stm32: " Geert Uytterhoeven
                   ` (11 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/spear/clk-aux-synth.c  | 2 +-
 drivers/clk/spear/clk-frac-synth.c | 2 +-
 drivers/clk/spear/clk-gpt-synth.c  | 2 +-
 drivers/clk/spear/clk-vco-pll.c    | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/spear/clk-aux-synth.c b/drivers/clk/spear/clk-aux-synth.c
index 61a8c3d4c1e40d0c..85cfb9b5ec35346c 100644
--- a/drivers/clk/spear/clk-aux-synth.c
+++ b/drivers/clk/spear/clk-aux-synth.c
@@ -138,8 +138,8 @@ struct clk *clk_register_aux(const char *aux_name, const char *gate_name,
 	        const struct aux_clk_masks *masks, struct aux_rate_tbl *rtbl,
 		u8 rtbl_cnt, spinlock_t *lock, struct clk **gate_clk)
 {
+	struct clk_init_data init = {};
 	struct clk_aux *aux;
-	struct clk_init_data init;
 	struct clk *clk;
 
 	if (!aux_name || !parent_name || !reg || !rtbl || !rtbl_cnt) {
diff --git a/drivers/clk/spear/clk-frac-synth.c b/drivers/clk/spear/clk-frac-synth.c
index 3549f1cfdae1160f..1b5e184d9668fd51 100644
--- a/drivers/clk/spear/clk-frac-synth.c
+++ b/drivers/clk/spear/clk-frac-synth.c
@@ -125,7 +125,7 @@ struct clk *clk_register_frac(const char *name, const char *parent_name,
 		unsigned long flags, void __iomem *reg,
 		struct frac_rate_tbl *rtbl, u8 rtbl_cnt, spinlock_t *lock)
 {
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct clk_frac *frac;
 	struct clk *clk;
 
diff --git a/drivers/clk/spear/clk-gpt-synth.c b/drivers/clk/spear/clk-gpt-synth.c
index 1a431d7ec20c0ff3..411cacdfc11f51b1 100644
--- a/drivers/clk/spear/clk-gpt-synth.c
+++ b/drivers/clk/spear/clk-gpt-synth.c
@@ -114,7 +114,7 @@ struct clk *clk_register_gpt(const char *name, const char *parent_name, unsigned
 		long flags, void __iomem *reg, struct gpt_rate_tbl *rtbl, u8
 		rtbl_cnt, spinlock_t *lock)
 {
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct clk_gpt *gpt;
 	struct clk *clk;
 
diff --git a/drivers/clk/spear/clk-vco-pll.c b/drivers/clk/spear/clk-vco-pll.c
index faba727e2f84365e..21fcc522c738e6b2 100644
--- a/drivers/clk/spear/clk-vco-pll.c
+++ b/drivers/clk/spear/clk-vco-pll.c
@@ -284,7 +284,7 @@ struct clk *clk_register_vco_pll(const char *vco_name, const char *pll_name,
 	struct clk_vco *vco;
 	struct clk_pll *pll;
 	struct clk *vco_clk, *tpll_clk, *tvco_gate_clk;
-	struct clk_init_data vco_init, pll_init;
+	struct clk_init_data vco_init = {}, pll_init = {};
 	const char **vco_parent_name;
 
 	if (!vco_name || !pll_name || !parent_name || !mode_reg || !cfg_reg ||
-- 
2.43.0


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

* [PATCH 34/45] clk: stm32: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (32 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 33/45] clk: spear: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 35/45] clk: st: " Geert Uytterhoeven
                   ` (10 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/clk-stm32f4.c        | 4 ++--
 drivers/clk/clk-stm32h7.c        | 2 +-
 drivers/clk/stm32/clk-stm32mp1.c | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/clk/clk-stm32f4.c b/drivers/clk/clk-stm32f4.c
index 565b4d99bebb06e8..6603d4815514151a 100644
--- a/drivers/clk/clk-stm32f4.c
+++ b/drivers/clk/clk-stm32f4.c
@@ -485,8 +485,8 @@ static struct clk *clk_register_apb_mul(struct device *dev, const char *name,
 					const char *parent_name,
 					unsigned long flags, u8 bit_idx)
 {
+	struct clk_init_data init = {};
 	struct clk_apb_mul *am;
-	struct clk_init_data init;
 	struct clk *clk;
 
 	am = kzalloc_obj(*am);
@@ -810,8 +810,8 @@ static struct clk_hw *clk_register_pll_div(const char *name,
 		struct clk_hw *pll_hw, spinlock_t *lock)
 {
 	struct stm32f4_pll_div *pll_div;
+	struct clk_init_data init = {};
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	/* allocate the divider */
diff --git a/drivers/clk/clk-stm32h7.c b/drivers/clk/clk-stm32h7.c
index 82e0789cf189c7cb..c6afa9b202351c04 100644
--- a/drivers/clk/clk-stm32h7.c
+++ b/drivers/clk/clk-stm32h7.c
@@ -462,8 +462,8 @@ static struct clk_hw *clk_register_stm32_timer_ker(struct device *dev,
 		u8 dppre_shift,
 		spinlock_t *lock)
 {
+	struct clk_init_data init = {};
 	struct timer_ker *element;
-	struct clk_init_data init;
 	struct clk_hw *hw;
 	int err;
 
diff --git a/drivers/clk/stm32/clk-stm32mp1.c b/drivers/clk/stm32/clk-stm32mp1.c
index 2d9ccd96ec98c05e..b265e3f3e94c2805 100644
--- a/drivers/clk/stm32/clk-stm32mp1.c
+++ b/drivers/clk/stm32/clk-stm32mp1.c
@@ -902,8 +902,8 @@ static struct clk_hw *clk_register_pll(struct device *dev, const char *name,
 				       unsigned long flags,
 				       spinlock_t *lock)
 {
+	struct clk_init_data init = {};
 	struct stm32_pll_obj *element;
-	struct clk_init_data init;
 	struct clk_hw *hw;
 	int err;
 
@@ -1041,8 +1041,8 @@ static struct clk_hw *clk_register_cktim(struct device *dev, const char *name,
 					 void __iomem *timpre,
 					 spinlock_t *lock)
 {
+	struct clk_init_data init = {};
 	struct timer_cker *tim_ker;
-	struct clk_init_data init;
 	struct clk_hw *hw;
 	int err;
 
-- 
2.43.0


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

* [PATCH 35/45] clk: st: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (33 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 34/45] clk: stm32: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 36/45] clk: sunxi: " Geert Uytterhoeven
                   ` (9 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/st/clk-flexgen.c | 2 +-
 drivers/clk/st/clkgen-fsyn.c | 4 ++--
 drivers/clk/st/clkgen-pll.c  | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/st/clk-flexgen.c b/drivers/clk/st/clk-flexgen.c
index 211535fd8ac9bf3c..46e5c7be43e8277e 100644
--- a/drivers/clk/st/clk-flexgen.c
+++ b/drivers/clk/st/clk-flexgen.c
@@ -209,7 +209,7 @@ static struct clk *clk_register_flexgen(const char *name,
 				unsigned long flexgen_flags, bool mode) {
 	struct flexgen *fgxbar;
 	struct clk *clk;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	u32  xbar_shift;
 	void __iomem *xbar_reg, *fdiv_reg;
 
diff --git a/drivers/clk/st/clkgen-fsyn.c b/drivers/clk/st/clkgen-fsyn.c
index 3fcc1da20c04ed8b..705133b959d74ed3 100644
--- a/drivers/clk/st/clkgen-fsyn.c
+++ b/drivers/clk/st/clkgen-fsyn.c
@@ -444,9 +444,9 @@ static struct clk * __init st_clk_register_quadfs_pll(
 		struct clkgen_quadfs_data *quadfs, void __iomem *reg,
 		spinlock_t *lock)
 {
+	struct clk_init_data init = {};
 	struct st_clk_quadfs_pll *pll;
 	struct clk *clk;
-	struct clk_init_data init;
 
 	/*
 	 * Sanity check required pointers.
@@ -885,8 +885,8 @@ static struct clk * __init st_clk_register_quadfs_fsynth(
 		unsigned long flags, spinlock_t *lock)
 {
 	struct st_clk_quadfs_fsynth *fs;
+	struct clk_init_data init = {};
 	struct clk *clk;
-	struct clk_init_data init;
 
 	/*
 	 * Sanity check required pointers, note that nsdiv3 is optional.
diff --git a/drivers/clk/st/clkgen-pll.c b/drivers/clk/st/clkgen-pll.c
index 17551c6a879ac480..aaa28aaff6272592 100644
--- a/drivers/clk/st/clkgen-pll.c
+++ b/drivers/clk/st/clkgen-pll.c
@@ -652,9 +652,9 @@ static struct clk * __init clkgen_pll_register(const char *parent_name,
 				void __iomem *reg, unsigned long pll_flags,
 				const char *clk_name, spinlock_t *lock)
 {
+	struct clk_init_data init = {};
 	struct clkgen_pll *pll;
 	struct clk *clk;
-	struct clk_init_data init;
 
 	pll = kzalloc_obj(*pll);
 	if (!pll)
-- 
2.43.0


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

* [PATCH 36/45] clk: sunxi: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (34 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 35/45] clk: st: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 37/45] clk: tegra: " Geert Uytterhoeven
                   ` (8 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/sunxi/clk-sun4i-tcon-ch1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/sunxi/clk-sun4i-tcon-ch1.c b/drivers/clk/sunxi/clk-sun4i-tcon-ch1.c
index b61eba112a7fecf5..b7f55864ea2a519c 100644
--- a/drivers/clk/sunxi/clk-sun4i-tcon-ch1.c
+++ b/drivers/clk/sunxi/clk-sun4i-tcon-ch1.c
@@ -225,7 +225,7 @@ static void __init tcon_ch1_setup(struct device_node *node)
 {
 	const char *parents[TCON_CH1_SCLK2_PARENTS];
 	const char *clk_name = node->name;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct tcon_ch1_clk *tclk;
 	struct resource res;
 	struct clk *clk;
-- 
2.43.0


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

* [PATCH 37/45] clk: tegra: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (35 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 36/45] clk: sunxi: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 38/45] clk: uniphier: " Geert Uytterhoeven
                   ` (7 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/tegra/clk-audio-sync.c       | 2 +-
 drivers/clk/tegra/clk-divider.c          | 2 +-
 drivers/clk/tegra/clk-periph-fixed.c     | 2 +-
 drivers/clk/tegra/clk-periph-gate.c      | 2 +-
 drivers/clk/tegra/clk-periph.c           | 2 +-
 drivers/clk/tegra/clk-pll-out.c          | 2 +-
 drivers/clk/tegra/clk-pll.c              | 2 +-
 drivers/clk/tegra/clk-sdmmc-mux.c        | 2 +-
 drivers/clk/tegra/clk-super.c            | 4 ++--
 drivers/clk/tegra/clk-tegra-super-cclk.c | 2 +-
 drivers/clk/tegra/clk-tegra124-emc.c     | 2 +-
 drivers/clk/tegra/clk-tegra20-emc.c      | 2 +-
 drivers/clk/tegra/clk-tegra210-emc.c     | 2 +-
 13 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/clk/tegra/clk-audio-sync.c b/drivers/clk/tegra/clk-audio-sync.c
index 0bbfcf46bedd521e..0fb4377c80bf2a04 100644
--- a/drivers/clk/tegra/clk-audio-sync.c
+++ b/drivers/clk/tegra/clk-audio-sync.c
@@ -47,7 +47,7 @@ struct clk *tegra_clk_register_sync_source(const char *name,
 					   unsigned long max_rate)
 {
 	struct tegra_clk_sync_source *sync;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct clk *clk;
 
 	sync = kzalloc_obj(*sync);
diff --git a/drivers/clk/tegra/clk-divider.c b/drivers/clk/tegra/clk-divider.c
index 27f43c3da1563e92..2dc7713433451754 100644
--- a/drivers/clk/tegra/clk-divider.c
+++ b/drivers/clk/tegra/clk-divider.c
@@ -145,8 +145,8 @@ struct clk *tegra_clk_register_divider(const char *name,
 		u8 frac_width, spinlock_t *lock)
 {
 	struct tegra_clk_frac_div *divider;
+	struct clk_init_data init = {};
 	struct clk *clk;
-	struct clk_init_data init;
 
 	divider = kzalloc_obj(*divider);
 	if (!divider) {
diff --git a/drivers/clk/tegra/clk-periph-fixed.c b/drivers/clk/tegra/clk-periph-fixed.c
index bb33e32cad4a1732..9ea9d41f47963168 100644
--- a/drivers/clk/tegra/clk-periph-fixed.c
+++ b/drivers/clk/tegra/clk-periph-fixed.c
@@ -77,7 +77,7 @@ struct clk *tegra_clk_register_periph_fixed(const char *name,
 {
 	const struct tegra_clk_periph_regs *regs;
 	struct tegra_clk_periph_fixed *fixed;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct clk *clk;
 
 	regs = get_reg_bank(num);
diff --git a/drivers/clk/tegra/clk-periph-gate.c b/drivers/clk/tegra/clk-periph-gate.c
index fa39d64875154efe..d821e1b9f77e6ba3 100644
--- a/drivers/clk/tegra/clk-periph-gate.c
+++ b/drivers/clk/tegra/clk-periph-gate.c
@@ -139,7 +139,7 @@ struct clk *tegra_clk_register_periph_gate(const char *name,
 {
 	struct tegra_clk_periph_gate *gate;
 	struct clk *clk;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	const struct tegra_clk_periph_regs *pregs;
 
 	pregs = get_reg_bank(clk_num);
diff --git a/drivers/clk/tegra/clk-periph.c b/drivers/clk/tegra/clk-periph.c
index 6ebeaa7cb65648e7..7af832d9af9b011f 100644
--- a/drivers/clk/tegra/clk-periph.c
+++ b/drivers/clk/tegra/clk-periph.c
@@ -166,7 +166,7 @@ static struct clk *_tegra_clk_register_periph(const char *name,
 			unsigned long flags)
 {
 	struct clk *clk;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	const struct tegra_clk_periph_regs *bank;
 	bool div = !(periph->gate.flags & TEGRA_PERIPH_NO_DIV);
 
diff --git a/drivers/clk/tegra/clk-pll-out.c b/drivers/clk/tegra/clk-pll-out.c
index 2299545fc386f87b..285b0af811fb1903 100644
--- a/drivers/clk/tegra/clk-pll-out.c
+++ b/drivers/clk/tegra/clk-pll-out.c
@@ -90,8 +90,8 @@ struct clk *tegra_clk_register_pll_out(const char *name,
 		spinlock_t *lock)
 {
 	struct tegra_clk_pll_out *pll_out;
+	struct clk_init_data init = {};
 	struct clk *clk;
-	struct clk_init_data init;
 
 	pll_out = kzalloc_obj(*pll_out);
 	if (!pll_out)
diff --git a/drivers/clk/tegra/clk-pll.c b/drivers/clk/tegra/clk-pll.c
index adfb74f111ef1afd..fc3abe86414ddd11 100644
--- a/drivers/clk/tegra/clk-pll.c
+++ b/drivers/clk/tegra/clk-pll.c
@@ -1903,7 +1903,7 @@ static struct clk *_tegra_clk_register_pll(struct tegra_clk_pll *pll,
 		const char *name, const char *parent_name, unsigned long flags,
 		const struct clk_ops *ops)
 {
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 
 	init.name = name;
 	init.ops = ops;
diff --git a/drivers/clk/tegra/clk-sdmmc-mux.c b/drivers/clk/tegra/clk-sdmmc-mux.c
index 14b5439a100a0cef..74fe06fa546abf47 100644
--- a/drivers/clk/tegra/clk-sdmmc-mux.c
+++ b/drivers/clk/tegra/clk-sdmmc-mux.c
@@ -236,7 +236,7 @@ struct clk *tegra_clk_register_sdmmc_mux_div(const char *name,
 	unsigned long flags, void *lock)
 {
 	struct clk *clk;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	const struct tegra_clk_periph_regs *bank;
 	struct tegra_sdmmc_mux *sdmmc_mux;
 
diff --git a/drivers/clk/tegra/clk-super.c b/drivers/clk/tegra/clk-super.c
index 370445e3d5acc34e..7aa3c3774445d32c 100644
--- a/drivers/clk/tegra/clk-super.c
+++ b/drivers/clk/tegra/clk-super.c
@@ -204,8 +204,8 @@ struct clk *tegra_clk_register_super_mux(const char *name,
 		u8 width, u8 pllx_index, u8 div2_index, spinlock_t *lock)
 {
 	struct tegra_clk_super_mux *super;
+	struct clk_init_data init = {};
 	struct clk *clk;
-	struct clk_init_data init;
 
 	super = kzalloc_obj(*super);
 	if (!super)
@@ -240,8 +240,8 @@ struct clk *tegra_clk_register_super_clk(const char *name,
 		spinlock_t *lock)
 {
 	struct tegra_clk_super_mux *super;
+	struct clk_init_data init = {};
 	struct clk *clk;
-	struct clk_init_data init;
 
 	super = kzalloc_obj(*super);
 	if (!super)
diff --git a/drivers/clk/tegra/clk-tegra-super-cclk.c b/drivers/clk/tegra/clk-tegra-super-cclk.c
index e7aeb67606b11390..1047a1104ec1f5d7 100644
--- a/drivers/clk/tegra/clk-tegra-super-cclk.c
+++ b/drivers/clk/tegra/clk-tegra-super-cclk.c
@@ -135,8 +135,8 @@ struct clk *tegra_clk_register_super_cclk(const char *name,
 		spinlock_t *lock)
 {
 	struct tegra_clk_super_mux *super;
+	struct clk_init_data init = {};
 	struct clk *clk;
-	struct clk_init_data init;
 	u32 val;
 
 	if (WARN_ON(cclk_super))
diff --git a/drivers/clk/tegra/clk-tegra124-emc.c b/drivers/clk/tegra/clk-tegra124-emc.c
index 94ac24ea1e6adc37..0fc74808fe39b2f7 100644
--- a/drivers/clk/tegra/clk-tegra124-emc.c
+++ b/drivers/clk/tegra/clk-tegra124-emc.c
@@ -485,8 +485,8 @@ static const struct clk_ops tegra_clk_emc_ops = {
 struct clk *tegra124_clk_register_emc(void __iomem *base, struct device_node *np,
 				      spinlock_t *lock)
 {
+	struct clk_init_data init = {};
 	struct tegra_clk_emc *tegra;
-	struct clk_init_data init;
 	struct device_node *node;
 	u32 node_ram_code;
 	struct clk *clk;
diff --git a/drivers/clk/tegra/clk-tegra20-emc.c b/drivers/clk/tegra/clk-tegra20-emc.c
index 44465726a8a67005..5cd026e8f305a35a 100644
--- a/drivers/clk/tegra/clk-tegra20-emc.c
+++ b/drivers/clk/tegra/clk-tegra20-emc.c
@@ -245,8 +245,8 @@ bool tegra20_clk_emc_driver_available(struct clk_hw *emc_hw)
 
 struct clk *tegra20_clk_register_emc(void __iomem *ioaddr, bool low_jitter)
 {
+	struct clk_init_data init = {};
 	struct tegra_clk_emc *emc;
-	struct clk_init_data init;
 	struct clk *clk;
 
 	emc = kzalloc_obj(*emc);
diff --git a/drivers/clk/tegra/clk-tegra210-emc.c b/drivers/clk/tegra/clk-tegra210-emc.c
index 9f140d94bef75560..2e559d95d40e7d50 100644
--- a/drivers/clk/tegra/clk-tegra210-emc.c
+++ b/drivers/clk/tegra/clk-tegra210-emc.c
@@ -274,8 +274,8 @@ static const struct clk_ops tegra210_clk_emc_ops = {
 struct clk *tegra210_clk_register_emc(struct device_node *np,
 				      void __iomem *regs)
 {
+	struct clk_init_data init = {};
 	struct tegra210_clk_emc *emc;
-	struct clk_init_data init;
 	struct clk *clk;
 
 	emc = kzalloc_obj(*emc);
-- 
2.43.0


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

* [PATCH 38/45] clk: uniphier: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (36 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 37/45] clk: tegra: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 39/45] clk: ux500: " Geert Uytterhoeven
                   ` (6 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/uniphier/clk-uniphier-cpugear.c      | 2 +-
 drivers/clk/uniphier/clk-uniphier-fixed-factor.c | 2 +-
 drivers/clk/uniphier/clk-uniphier-fixed-rate.c   | 2 +-
 drivers/clk/uniphier/clk-uniphier-gate.c         | 2 +-
 drivers/clk/uniphier/clk-uniphier-mux.c          | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/clk/uniphier/clk-uniphier-cpugear.c b/drivers/clk/uniphier/clk-uniphier-cpugear.c
index a2f01a4da1276903..165c6832b722faa9 100644
--- a/drivers/clk/uniphier/clk-uniphier-cpugear.c
+++ b/drivers/clk/uniphier/clk-uniphier-cpugear.c
@@ -79,7 +79,7 @@ struct clk_hw *uniphier_clk_register_cpugear(struct device *dev,
 				const struct uniphier_clk_cpugear_data *data)
 {
 	struct uniphier_clk_cpugear *gear;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	int ret;
 
 	gear = devm_kzalloc(dev, sizeof(*gear), GFP_KERNEL);
diff --git a/drivers/clk/uniphier/clk-uniphier-fixed-factor.c b/drivers/clk/uniphier/clk-uniphier-fixed-factor.c
index a6a37a6bca3ab047..c86683fce20549d9 100644
--- a/drivers/clk/uniphier/clk-uniphier-fixed-factor.c
+++ b/drivers/clk/uniphier/clk-uniphier-fixed-factor.c
@@ -13,8 +13,8 @@ struct clk_hw *uniphier_clk_register_fixed_factor(struct device *dev,
 						  const char *name,
 			const struct uniphier_clk_fixed_factor_data *data)
 {
+	struct clk_init_data init = {};
 	struct clk_fixed_factor *fix;
-	struct clk_init_data init;
 	int ret;
 
 	fix = devm_kzalloc(dev, sizeof(*fix), GFP_KERNEL);
diff --git a/drivers/clk/uniphier/clk-uniphier-fixed-rate.c b/drivers/clk/uniphier/clk-uniphier-fixed-rate.c
index 3bc55ab75314bf8d..63f49d3bab80bae8 100644
--- a/drivers/clk/uniphier/clk-uniphier-fixed-rate.c
+++ b/drivers/clk/uniphier/clk-uniphier-fixed-rate.c
@@ -13,8 +13,8 @@ struct clk_hw *uniphier_clk_register_fixed_rate(struct device *dev,
 						const char *name,
 				const struct uniphier_clk_fixed_rate_data *data)
 {
+	struct clk_init_data init = {};
 	struct clk_fixed_rate *fixed;
-	struct clk_init_data init;
 	int ret;
 
 	/* allocate fixed-rate clock */
diff --git a/drivers/clk/uniphier/clk-uniphier-gate.c b/drivers/clk/uniphier/clk-uniphier-gate.c
index e58093e79dd7dc23..9f49e6bb6b2042f7 100644
--- a/drivers/clk/uniphier/clk-uniphier-gate.c
+++ b/drivers/clk/uniphier/clk-uniphier-gate.c
@@ -61,8 +61,8 @@ struct clk_hw *uniphier_clk_register_gate(struct device *dev,
 					  const char *name,
 				const struct uniphier_clk_gate_data *data)
 {
+	struct clk_init_data init = {};
 	struct uniphier_clk_gate *gate;
-	struct clk_init_data init;
 	int ret;
 
 	gate = devm_kzalloc(dev, sizeof(*gate), GFP_KERNEL);
diff --git a/drivers/clk/uniphier/clk-uniphier-mux.c b/drivers/clk/uniphier/clk-uniphier-mux.c
index 1998e9d4cfc0224a..a63ad4df8e65ebcf 100644
--- a/drivers/clk/uniphier/clk-uniphier-mux.c
+++ b/drivers/clk/uniphier/clk-uniphier-mux.c
@@ -58,8 +58,8 @@ struct clk_hw *uniphier_clk_register_mux(struct device *dev,
 					 const char *name,
 				const struct uniphier_clk_mux_data *data)
 {
+	struct clk_init_data init = {};
 	struct uniphier_clk_mux *mux;
-	struct clk_init_data init;
 	int ret;
 
 	mux = devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL);
-- 
2.43.0


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

* [PATCH 39/45] clk: ux500: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (37 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 38/45] clk: uniphier: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 40/45] clk: versatile: " Geert Uytterhoeven
                   ` (5 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/ux500/clk-prcc.c    | 2 +-
 drivers/clk/ux500/clk-prcmu.c   | 4 ++--
 drivers/clk/ux500/clk-sysctrl.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/ux500/clk-prcc.c b/drivers/clk/ux500/clk-prcc.c
index dce235df2576dfb2..dde72d2fd0ac67ae 100644
--- a/drivers/clk/ux500/clk-prcc.c
+++ b/drivers/clk/ux500/clk-prcc.c
@@ -97,8 +97,8 @@ static struct clk *clk_reg_prcc(const char *name,
 				unsigned long flags,
 				const struct clk_ops *clk_prcc_ops)
 {
+	struct clk_init_data clk_prcc_init = {};
 	struct clk_prcc *clk;
-	struct clk_init_data clk_prcc_init;
 	struct clk *clk_reg;
 
 	if (!name) {
diff --git a/drivers/clk/ux500/clk-prcmu.c b/drivers/clk/ux500/clk-prcmu.c
index ac96c46bd1bbf76b..d89f3b634f8bbd26 100644
--- a/drivers/clk/ux500/clk-prcmu.c
+++ b/drivers/clk/ux500/clk-prcmu.c
@@ -200,8 +200,8 @@ static struct clk_hw *clk_reg_prcmu(const char *name,
 				    unsigned long flags,
 				    const struct clk_ops *clk_prcmu_ops)
 {
+	struct clk_init_data clk_prcmu_init = {};
 	struct clk_prcmu *clk;
-	struct clk_init_data clk_prcmu_init;
 	int ret;
 
 	if (!name) {
@@ -357,8 +357,8 @@ struct clk_hw *clk_reg_prcmu_clkout(const char *name,
 				    u8 source, u8 divider)
 
 {
+	struct clk_init_data clk_prcmu_clkout_init = {};
 	struct clk_prcmu_clkout *clk;
-	struct clk_init_data clk_prcmu_clkout_init;
 	u8 clkout_id;
 	int ret;
 
diff --git a/drivers/clk/ux500/clk-sysctrl.c b/drivers/clk/ux500/clk-sysctrl.c
index ba3258c88d28e101..2127a949e56ccf27 100644
--- a/drivers/clk/ux500/clk-sysctrl.c
+++ b/drivers/clk/ux500/clk-sysctrl.c
@@ -127,8 +127,8 @@ static struct clk *clk_reg_sysctrl(struct device *dev,
 				unsigned long flags,
 				const struct clk_ops *clk_sysctrl_ops)
 {
+	struct clk_init_data clk_sysctrl_init = {};
 	struct clk_sysctrl *clk;
-	struct clk_init_data clk_sysctrl_init;
 	struct clk *clk_reg;
 	int i;
 
-- 
2.43.0


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

* [PATCH 40/45] clk: versatile: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (38 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 39/45] clk: ux500: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21 11:28   ` Liviu Dudau
  2026-08-21  8:53 ` [PATCH 41/45] clk: vt8500: " Geert Uytterhoeven
                   ` (4 subsequent siblings)
  44 siblings, 1 reply; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/versatile/clk-icst.c         | 2 +-
 drivers/clk/versatile/clk-sp810.c        | 2 +-
 drivers/clk/versatile/clk-vexpress-osc.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/versatile/clk-icst.c b/drivers/clk/versatile/clk-icst.c
index 6bd3db54dd229d28..97a1bfd6cf0ed995 100644
--- a/drivers/clk/versatile/clk-icst.c
+++ b/drivers/clk/versatile/clk-icst.c
@@ -360,8 +360,8 @@ struct clk *icst_clk_setup(struct device *dev,
 {
 	struct clk *clk;
 	struct clk_icst *icst;
-	struct clk_init_data init;
 	struct icst_params *pclone;
+	struct clk_init_data init = {};
 
 	icst = kzalloc_obj(*icst);
 	if (!icst)
diff --git a/drivers/clk/versatile/clk-sp810.c b/drivers/clk/versatile/clk-sp810.c
index b0e69686f7a9a93e..28e5c0cf1fda38e4 100644
--- a/drivers/clk/versatile/clk-sp810.c
+++ b/drivers/clk/versatile/clk-sp810.c
@@ -86,7 +86,7 @@ static void __init clk_sp810_of_setup(struct device_node *node)
 	const char *parent_names[2];
 	int num = ARRAY_SIZE(parent_names);
 	char name[12];
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	static int instance;
 	int i;
 	bool deprecated;
diff --git a/drivers/clk/versatile/clk-vexpress-osc.c b/drivers/clk/versatile/clk-vexpress-osc.c
index 9adbf5c33bd1cada..72e872ec6b7c9b47 100644
--- a/drivers/clk/versatile/clk-vexpress-osc.c
+++ b/drivers/clk/versatile/clk-vexpress-osc.c
@@ -64,7 +64,7 @@ static const struct clk_ops vexpress_osc_ops = {
 
 static int vexpress_osc_probe(struct platform_device *pdev)
 {
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct vexpress_osc *osc;
 	u32 range[2];
 	int ret;
-- 
2.43.0


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

* [PATCH 41/45] clk: vt8500: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (39 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 40/45] clk: versatile: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 42/45] clk: x86: " Geert Uytterhoeven
                   ` (3 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/clk-vt8500.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/clk-vt8500.c b/drivers/clk/clk-vt8500.c
index 3e62cb853d5e90e7..581ac00c31bc0448 100644
--- a/drivers/clk/clk-vt8500.c
+++ b/drivers/clk/clk-vt8500.c
@@ -227,8 +227,8 @@ static __init void vtwm_device_clk_init(struct device_node *node)
 	struct clk_hw *hw;
 	struct clk_device *dev_clk;
 	const char *clk_name = node->name;
+	struct clk_init_data init = {};
 	const char *parent_name;
-	struct clk_init_data init;
 	int rc;
 	int clk_init_flags = 0;
 
@@ -687,8 +687,8 @@ static __init void vtwm_pll_clk_init(struct device_node *node, int pll_type)
 	struct clk_hw *hw;
 	struct clk_pll *pll_clk;
 	const char *clk_name = node->name;
+	struct clk_init_data init = {};
 	const char *parent_name;
-	struct clk_init_data init;
 	int rc;
 
 	if (!pmc_base)
-- 
2.43.0


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

* [PATCH 42/45] clk: x86: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (40 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 41/45] clk: vt8500: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 43/45] clk: xgene: " Geert Uytterhoeven
                   ` (2 subsequent siblings)
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/x86/clk-pmc-atom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/x86/clk-pmc-atom.c b/drivers/clk/x86/clk-pmc-atom.c
index 08c83e0abc41d942..43dda274e329d19e 100644
--- a/drivers/clk/x86/clk-pmc-atom.c
+++ b/drivers/clk/x86/clk-pmc-atom.c
@@ -151,8 +151,8 @@ static struct clk_plt *plt_clk_register(struct platform_device *pdev, int id,
 					const char **parent_names,
 					int num_parents)
 {
+	struct clk_init_data init = {};
 	struct clk_plt *pclk;
-	struct clk_init_data init;
 	int ret;
 
 	pclk = devm_kzalloc(&pdev->dev, sizeof(*pclk), GFP_KERNEL);
-- 
2.43.0


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

* [PATCH 43/45] clk: xgene: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (41 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 42/45] clk: x86: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 44/45] clk: xilinx: " Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 45/45] clk: zynqmp: " Geert Uytterhoeven
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/clk-xgene.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/clk-xgene.c b/drivers/clk/clk-xgene.c
index c9e371fce0939771..5cf015da49ad336e 100644
--- a/drivers/clk/clk-xgene.c
+++ b/drivers/clk/clk-xgene.c
@@ -126,9 +126,9 @@ static struct clk *xgene_register_clk_pll(struct device *dev,
 	unsigned long flags, void __iomem *reg, u32 pll_offset,
 	u32 type, spinlock_t *lock, int version)
 {
+	struct clk_init_data init = {};
 	struct xgene_clk_pll *apmclk;
 	struct clk *clk;
-	struct clk_init_data init;
 
 	/* allocate the APM clock structure */
 	apmclk = kzalloc_obj(*apmclk);
@@ -351,8 +351,8 @@ xgene_register_clk_pmd(struct device *dev,
 		       unsigned long flags, void __iomem *reg, u8 shift,
 		       u8 width, u64 denom, u32 clk_flags, spinlock_t *lock)
 {
+	struct clk_init_data init = {};
 	struct xgene_clk_pmd *fd;
-	struct clk_init_data init;
 	struct clk *clk;
 
 	fd = kzalloc_obj(*fd);
@@ -635,9 +635,9 @@ static struct clk *xgene_register_clk(struct device *dev,
 		const char *name, const char *parent_name,
 		struct xgene_dev_parameters *parameters, spinlock_t *lock)
 {
+	struct clk_init_data init = {};
 	struct xgene_clk *apmclk;
 	struct clk *clk;
-	struct clk_init_data init;
 	int rc;
 
 	/* allocate the APM clock structure */
-- 
2.43.0


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

* [PATCH 44/45] clk: xilinx: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (42 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 43/45] clk: xgene: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 45/45] clk: zynqmp: " Geert Uytterhoeven
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/xilinx/clk-xlnx-clock-wizard.c | 6 +++---
 drivers/clk/xilinx/xlnx_vcu.c              | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/xilinx/clk-xlnx-clock-wizard.c b/drivers/clk/xilinx/clk-xlnx-clock-wizard.c
index edf8c0eaca27cab4..4e5b9cb3754b9a18 100644
--- a/drivers/clk/xilinx/clk-xlnx-clock-wizard.c
+++ b/drivers/clk/xilinx/clk-xlnx-clock-wizard.c
@@ -936,9 +936,9 @@ static struct clk_hw *clk_wzrd_register_divf(struct device *dev,
 					  u32 div_type,
 					  spinlock_t *lock)
 {
+	struct clk_init_data init = {};
 	struct clk_wzrd_divider *div;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	div = devm_kzalloc(dev, sizeof(*div), GFP_KERNEL);
@@ -980,9 +980,9 @@ static struct clk_hw *clk_wzrd_ver_register_divider(struct device *dev,
 						 u32 div_type,
 						 spinlock_t *lock)
 {
+	struct clk_init_data init = {};
 	struct clk_wzrd_divider *div;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	div = devm_kzalloc(dev, sizeof(*div), GFP_KERNEL);
@@ -1026,9 +1026,9 @@ static struct clk_hw *clk_wzrd_register_divider(struct device *dev,
 					     u32 div_type,
 					     spinlock_t *lock)
 {
+	struct clk_init_data init = {};
 	struct clk_wzrd_divider *div;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	div = devm_kzalloc(dev, sizeof(*div), GFP_KERNEL);
diff --git a/drivers/clk/xilinx/xlnx_vcu.c b/drivers/clk/xilinx/xlnx_vcu.c
index f14bda375e353e6a..ccd9d7c0b18098a5 100644
--- a/drivers/clk/xilinx/xlnx_vcu.c
+++ b/drivers/clk/xilinx/xlnx_vcu.c
@@ -406,9 +406,9 @@ static struct clk_hw *xvcu_register_pll(struct device *dev,
 					const char *name, const char *parent,
 					unsigned long flags)
 {
+	struct clk_init_data init = {};
 	struct vcu_pll *pll;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	init.name = name;
-- 
2.43.0


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

* [PATCH 45/45] clk: zynqmp: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
                   ` (43 preceding siblings ...)
  2026-08-21  8:53 ` [PATCH 44/45] clk: xilinx: " Geert Uytterhoeven
@ 2026-08-21  8:53 ` Geert Uytterhoeven
  44 siblings, 0 replies; 52+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 drivers/clk/zynqmp/clk-gate-zynqmp.c | 2 +-
 drivers/clk/zynqmp/clk-mux-zynqmp.c  | 2 +-
 drivers/clk/zynqmp/divider.c         | 2 +-
 drivers/clk/zynqmp/pll.c             | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/zynqmp/clk-gate-zynqmp.c b/drivers/clk/zynqmp/clk-gate-zynqmp.c
index db10eb69f3fe01a5..1a462af7b8ea3efa 100644
--- a/drivers/clk/zynqmp/clk-gate-zynqmp.c
+++ b/drivers/clk/zynqmp/clk-gate-zynqmp.c
@@ -109,10 +109,10 @@ struct clk_hw *zynqmp_clk_register_gate(const char *name, u32 clk_id,
 					u8 num_parents,
 					const struct clock_topology *nodes)
 {
+	struct clk_init_data init = {};
 	struct zynqmp_clk_gate *gate;
 	struct clk_hw *hw;
 	int ret;
-	struct clk_init_data init;
 
 	/* allocate the gate */
 	gate = kzalloc_obj(*gate);
diff --git a/drivers/clk/zynqmp/clk-mux-zynqmp.c b/drivers/clk/zynqmp/clk-mux-zynqmp.c
index e37bd3516974c1ee..79509e387b51fe40 100644
--- a/drivers/clk/zynqmp/clk-mux-zynqmp.c
+++ b/drivers/clk/zynqmp/clk-mux-zynqmp.c
@@ -133,9 +133,9 @@ struct clk_hw *zynqmp_clk_register_mux(const char *name, u32 clk_id,
 				       u8 num_parents,
 				       const struct clock_topology *nodes)
 {
+	struct clk_init_data init = {};
 	struct zynqmp_clk_mux *mux;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	mux = kzalloc_obj(*mux);
diff --git a/drivers/clk/zynqmp/divider.c b/drivers/clk/zynqmp/divider.c
index 4075f6ecf076a8e6..3eabd1cf211ddba3 100644
--- a/drivers/clk/zynqmp/divider.c
+++ b/drivers/clk/zynqmp/divider.c
@@ -278,9 +278,9 @@ struct clk_hw *zynqmp_clk_register_divider(const char *name,
 					   u8 num_parents,
 					   const struct clock_topology *nodes)
 {
+	struct clk_init_data init = {};
 	struct zynqmp_clk_divider *div;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	/* allocate the divider */
diff --git a/drivers/clk/zynqmp/pll.c b/drivers/clk/zynqmp/pll.c
index 6463787cf57b6018..6158386ca743d1f8 100644
--- a/drivers/clk/zynqmp/pll.c
+++ b/drivers/clk/zynqmp/pll.c
@@ -313,9 +313,9 @@ struct clk_hw *zynqmp_clk_register_pll(const char *name, u32 clk_id,
 				       u8 num_parents,
 				       const struct clock_topology *nodes)
 {
+	struct clk_init_data init = {};
 	struct zynqmp_pll *pll;
 	struct clk_hw *hw;
-	struct clk_init_data init;
 	int ret;
 
 	init.name = name;
-- 
2.43.0


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

* Re: [PATCH 14/45] clk: ingenic: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 ` [PATCH 14/45] clk: ingenic: " Geert Uytterhoeven
@ 2026-08-21 10:57   ` Paul Cercueil
  0 siblings, 0 replies; 52+ messages in thread
From: Paul Cercueil @ 2026-08-21 10:57 UTC (permalink / raw)
  To: Geert Uytterhoeven, Ryan Chen, Joel Stanley, Stephen Boyd,
	Brian Masney, Jerome Brunet, Andrew Jeffery, Billy Tsai,
	Nicolas Ferre, Alexandre Belloni, Claudiu Beznea, Ray Jui,
	Scott Branden, Broadcom internal kernel review list,
	Taichi Sugaya, Takao Orito, Linus Walleij, Avi Fishman,
	Tomer Maimon, Tali Perry, Patrick Venture, Nancy Yuen,
	Benjamin Fair, Sudeep Holla, Cristian Marussi, David Lechner,
	Abel Vesa, Peng Fan, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Santosh Shilimkar,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Vladimir Zapolskiy, Heiko Stuebner, Krzysztof Kozlowski,
	Sylwester Nawrocki, Chanwoo Choi, Peter Griffin, Alim Akhtar,
	Dinh Nguyen, Viresh Kumar, Maxime Coquelin, Alexandre Torgue,
	Emilio López, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
	Prashant Gaikwad, Thierry Reding, Jonathan Hunter,
	Kunihiko Hayashi, Masami Hiramatsu, Ulf Hansson, Liviu Dudau,
	Lorenzo Pieralisi, Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek

Hi Geert,

Le vendredi 21 août 2026 à 10:53 +0200, Geert Uytterhoeven a écrit :
> The clk_init_data structure contains several mutually-exclusive
> members
> for different methods to specify the possible parents of a clock,
> prompting drivers to initialize only the members they need.  However,
> not initializing all members may cause subtle issues, which are only
> exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE
> is
> enabled.
> 
> Make sure all members are fully initialized, to avoid such bugs, and
> to
> prevent future breakage when converting drivers to a different method
> for specifying the parents.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Acked-by: Paul Cercueil <paul@crapouillou.net>

Cheers,
-Paul

> ---
> Compile-tested only.
> ---
>  drivers/clk/ingenic/cgu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/ingenic/cgu.c b/drivers/clk/ingenic/cgu.c
> index 41e4c69131bd6ec7..ad223aa20e8db5a5 100644
> --- a/drivers/clk/ingenic/cgu.c
> +++ b/drivers/clk/ingenic/cgu.c
> @@ -644,8 +644,8 @@ static const struct clk_ops ingenic_clk_ops = {
>  static int ingenic_register_clock(struct ingenic_cgu *cgu, unsigned
> idx)
>  {
>  	const struct ingenic_cgu_clk_info *clk_info = &cgu-
> >clock_info[idx];
> -	struct clk_init_data clk_init;
>  	struct ingenic_clk *ingenic_clk = NULL;
> +	struct clk_init_data clk_init = {};
>  	struct clk *clk, *parent;
>  	const char *parent_names[4];
>  	unsigned caps, i, num_possible;

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

* Re: [PATCH 29/45] clk: samsung: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 ` [PATCH 29/45] clk: samsung: " Geert Uytterhoeven
@ 2026-08-21 11:04   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 52+ messages in thread
From: Krzysztof Kozlowski @ 2026-08-21 11:04 UTC (permalink / raw)
  To: Geert Uytterhoeven, Ryan Chen, Joel Stanley, Stephen Boyd,
	Brian Masney, Jerome Brunet, Andrew Jeffery, Billy Tsai,
	Nicolas Ferre, Alexandre Belloni, Claudiu Beznea, Ray Jui,
	Scott Branden, Broadcom internal kernel review list,
	Taichi Sugaya, Takao Orito, Linus Walleij, Avi Fishman,
	Tomer Maimon, Tali Perry, Patrick Venture, Nancy Yuen,
	Benjamin Fair, Sudeep Holla, Cristian Marussi, David Lechner,
	Abel Vesa, Peng Fan, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Paul Cercueil,
	Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Sylwester Nawrocki, Chanwoo Choi, Peter Griffin, Alim Akhtar,
	Dinh Nguyen, Viresh Kumar, Maxime Coquelin, Alexandre Torgue,
	Emilio López, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
	Prashant Gaikwad, Thierry Reding, Jonathan Hunter,
	Kunihiko Hayashi, Masami Hiramatsu, Ulf Hansson, Liviu Dudau,
	Lorenzo Pieralisi, Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek

On 21/08/2026 10:53, Geert Uytterhoeven wrote:
> The clk_init_data structure contains several mutually-exclusive members
> for different methods to specify the possible parents of a clock,
> prompting drivers to initialize only the members they need.  However,
> not initializing all members may cause subtle issues, which are only
> exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
> enabled.
> 
> Make sure all members are fully initialized, to avoid such bugs, and to
> prevent future breakage when converting drivers to a different method
> for specifying the parents.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> Compile-tested only.
> ---
>  drivers/clk/samsung/clk-cpu.c | 2 +-
>  drivers/clk/samsung/clk-pll.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

Let me know if I should take it via Samsung SoC clock tree. I assume by
default this will go directly via clock tree.

Best regards,
Krzysztof

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

* Re: [PATCH 05/45] clk: cdce925: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 ` [PATCH 05/45] clk: cdce925: " Geert Uytterhoeven
@ 2026-08-21 11:25   ` Liviu Dudau
  0 siblings, 0 replies; 52+ messages in thread
From: Liviu Dudau @ 2026-08-21 11:25 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Lorenzo Pieralisi, Michal Simek,
	Matthias Brugger, linux-clk, linux-aspeed, linux-arm-kernel,
	linux-kernel, openbmc, arm-scmi, imx, linux-mips,
	linux-renesas-soc, linux-rockchip, linux-samsung-soc, soc,
	linux-stm32, linux-sunxi, linux-tegra, linux-mediatek

On Fri, Aug 21, 2026 at 10:53:15AM +0200, Geert Uytterhoeven wrote:
> The clk_init_data structure contains several mutually-exclusive members
> for different methods to specify the possible parents of a clock,
> prompting drivers to initialize only the members they need.  However,
> not initializing all members may cause subtle issues, which are only
> exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
> enabled.
> 
> Make sure all members are fully initialized, to avoid such bugs, and to
> prevent future breakage when converting drivers to a different method
> for specifying the parents.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>

Best regards,
Liviu

> ---
> Compile-tested only.
> ---
>  drivers/clk/clk-cdce925.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/clk-cdce925.c b/drivers/clk/clk-cdce925.c
> index 30d0493c771818ff..4d49cc1659c07be2 100644
> --- a/drivers/clk/clk-cdce925.c
> +++ b/drivers/clk/clk-cdce925.c
> @@ -620,7 +620,7 @@ static int cdce925_probe(struct i2c_client *client)
>  	struct device_node *node = client->dev.of_node;
>  	const char *parent_name;
>  	const char *pll_clk_name[MAX_NUMBER_OF_PLLS] = {NULL,};
> -	struct clk_init_data init;
> +	struct clk_init_data init = {};
>  	u32 value;
>  	int i;
>  	int err;
> -- 
> 2.43.0
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯

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

* Re: [PATCH 40/45] clk: versatile: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 ` [PATCH 40/45] clk: versatile: " Geert Uytterhoeven
@ 2026-08-21 11:28   ` Liviu Dudau
  0 siblings, 0 replies; 52+ messages in thread
From: Liviu Dudau @ 2026-08-21 11:28 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Lorenzo Pieralisi, Michal Simek,
	Matthias Brugger, linux-clk, linux-aspeed, linux-arm-kernel,
	linux-kernel, openbmc, arm-scmi, imx, linux-mips,
	linux-renesas-soc, linux-rockchip, linux-samsung-soc, soc,
	linux-stm32, linux-sunxi, linux-tegra, linux-mediatek

On Fri, Aug 21, 2026 at 10:53:50AM +0200, Geert Uytterhoeven wrote:
> The clk_init_data structure contains several mutually-exclusive members
> for different methods to specify the possible parents of a clock,
> prompting drivers to initialize only the members they need.  However,
> not initializing all members may cause subtle issues, which are only
> exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
> enabled.
> 
> Make sure all members are fully initialized, to avoid such bugs, and to
> prevent future breakage when converting drivers to a different method
> for specifying the parents.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>

Best regards,
Liviu

> ---
> Compile-tested only.
> ---
>  drivers/clk/versatile/clk-icst.c         | 2 +-
>  drivers/clk/versatile/clk-sp810.c        | 2 +-
>  drivers/clk/versatile/clk-vexpress-osc.c | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/clk/versatile/clk-icst.c b/drivers/clk/versatile/clk-icst.c
> index 6bd3db54dd229d28..97a1bfd6cf0ed995 100644
> --- a/drivers/clk/versatile/clk-icst.c
> +++ b/drivers/clk/versatile/clk-icst.c
> @@ -360,8 +360,8 @@ struct clk *icst_clk_setup(struct device *dev,
>  {
>  	struct clk *clk;
>  	struct clk_icst *icst;
> -	struct clk_init_data init;
>  	struct icst_params *pclone;
> +	struct clk_init_data init = {};
>  
>  	icst = kzalloc_obj(*icst);
>  	if (!icst)
> diff --git a/drivers/clk/versatile/clk-sp810.c b/drivers/clk/versatile/clk-sp810.c
> index b0e69686f7a9a93e..28e5c0cf1fda38e4 100644
> --- a/drivers/clk/versatile/clk-sp810.c
> +++ b/drivers/clk/versatile/clk-sp810.c
> @@ -86,7 +86,7 @@ static void __init clk_sp810_of_setup(struct device_node *node)
>  	const char *parent_names[2];
>  	int num = ARRAY_SIZE(parent_names);
>  	char name[12];
> -	struct clk_init_data init;
> +	struct clk_init_data init = {};
>  	static int instance;
>  	int i;
>  	bool deprecated;
> diff --git a/drivers/clk/versatile/clk-vexpress-osc.c b/drivers/clk/versatile/clk-vexpress-osc.c
> index 9adbf5c33bd1cada..72e872ec6b7c9b47 100644
> --- a/drivers/clk/versatile/clk-vexpress-osc.c
> +++ b/drivers/clk/versatile/clk-vexpress-osc.c
> @@ -64,7 +64,7 @@ static const struct clk_ops vexpress_osc_ops = {
>  
>  static int vexpress_osc_probe(struct platform_device *pdev)
>  {
> -	struct clk_init_data init;
> +	struct clk_init_data init = {};
>  	struct vexpress_osc *osc;
>  	u32 range[2];
>  	int ret;
> -- 
> 2.43.0
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯

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

* Re: [PATCH 13/45] clk: imx: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 ` [PATCH 13/45] clk: imx: " Geert Uytterhoeven
@ 2026-08-21 11:44   ` Abel Vesa
  0 siblings, 0 replies; 52+ messages in thread
From: Abel Vesa @ 2026-08-21 11:44 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger, linux-clk, linux-aspeed,
	linux-arm-kernel, linux-kernel, openbmc, arm-scmi, imx,
	linux-mips, linux-renesas-soc, linux-rockchip, linux-samsung-soc,
	soc, linux-stm32, linux-sunxi, linux-tegra, linux-mediatek

On 26-08-21 10:53:23, Geert Uytterhoeven wrote:
> The clk_init_data structure contains several mutually-exclusive members
> for different methods to specify the possible parents of a clock,
> prompting drivers to initialize only the members they need.  However,
> not initializing all members may cause subtle issues, which are only
> exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
> enabled.
> 
> Make sure all members are fully initialized, to avoid such bugs, and to
> prevent future breakage when converting drivers to a different method
> for specifying the parents.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Acked-by: Abel Vesa <abel.vesa@oss.qualcomm.com>

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

* Re: [PATCH 24/45] clk: nxp: Make sure clk_init_data is fully initialized
  2026-08-21  8:53 ` [PATCH 24/45] clk: nxp: " Geert Uytterhoeven
@ 2026-08-21 11:52   ` Vladimir Zapolskiy
  0 siblings, 0 replies; 52+ messages in thread
From: Vladimir Zapolskiy @ 2026-08-21 11:52 UTC (permalink / raw)
  To: Geert Uytterhoeven, Ryan Chen, Joel Stanley, Stephen Boyd,
	Brian Masney, Jerome Brunet, Andrew Jeffery, Billy Tsai,
	Nicolas Ferre, Alexandre Belloni, Claudiu Beznea, Ray Jui,
	Scott Branden, Broadcom internal kernel review list,
	Taichi Sugaya, Takao Orito, Linus Walleij, Avi Fishman,
	Tomer Maimon, Tali Perry, Patrick Venture, Nancy Yuen,
	Benjamin Fair, Sudeep Holla, Cristian Marussi, David Lechner,
	Abel Vesa, Peng Fan, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Paul Cercueil,
	Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Heiko Stuebner, Krzysztof Kozlowski,
	Sylwester Nawrocki, Chanwoo Choi, Peter Griffin, Alim Akhtar,
	Dinh Nguyen, Viresh Kumar, Maxime Coquelin, Alexandre Torgue,
	Emilio López, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
	Prashant Gaikwad, Thierry Reding, Jonathan Hunter,
	Kunihiko Hayashi, Masami Hiramatsu, Ulf Hansson, Liviu Dudau,
	Lorenzo Pieralisi, Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek

On 8/21/26 11:53, Geert Uytterhoeven wrote:
> The clk_init_data structure contains several mutually-exclusive members
> for different methods to specify the possible parents of a clock,
> prompting drivers to initialize only the members they need.  However,
> not initializing all members may cause subtle issues, which are only
> exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
> enabled.
> 
> Make sure all members are fully initialized, to avoid such bugs, and to
> prevent future breakage when converting drivers to a different method
> for specifying the parents.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> Compile-tested only.
> ---
>   drivers/clk/nxp/clk-lpc18xx-creg.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/nxp/clk-lpc18xx-creg.c b/drivers/clk/nxp/clk-lpc18xx-creg.c
> index 3d3982e9c661a5c2..de3c214a80fcf903 100644
> --- a/drivers/clk/nxp/clk-lpc18xx-creg.c
> +++ b/drivers/clk/nxp/clk-lpc18xx-creg.c
> @@ -138,7 +138,7 @@ static struct clk *clk_register_creg_clk(struct device *dev,
>   					 const char **parent_name,
>   					 struct regmap *syscon)
>   {
> -	struct clk_init_data init;
> +	struct clk_init_data init = {};
>   
>   	init.ops = creg_clk->ops;
>   	init.name = creg_clk->name;

Reviewed-by: Vladimir Zapolskiy <vz@mleia.com>

-- 
Best wishes,
Vladimir

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

end of thread, other threads:[~2026-08-21 12:01 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 01/45] clk: aspeed: Make sure clk_init_data is fully initialized Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 02/45] clk: at91: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 03/45] clk: bcm: iproc: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 04/45] clk: berlin: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 05/45] clk: cdce925: " Geert Uytterhoeven
2026-08-21 11:25   ` Liviu Dudau
2026-08-21  8:53 ` [PATCH 06/45] clk: clk-axi-clkgen: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 07/45] clk: cs2000-cp: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 08/45] clk: davinci: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 09/45] clk: fractional-divider: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 10/45] clk: gemini: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 11/45] clk: highbank: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 12/45] clk: hisilicon: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 13/45] clk: imx: " Geert Uytterhoeven
2026-08-21 11:44   ` Abel Vesa
2026-08-21  8:53 ` [PATCH 14/45] clk: ingenic: " Geert Uytterhoeven
2026-08-21 10:57   ` Paul Cercueil
2026-08-21  8:53 ` [PATCH 15/45] clk: keystone: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 16/45] clk: lmk04832: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 17/45] clk: mediatek: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 18/45] clk: milbeaut: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 19/45] clk: mmp: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 20/45] clk: mvebu: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 21/45] clk: mxs: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 22/45] clk: nomadik: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 23/45] clk: npcm7xx: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 24/45] clk: nxp: " Geert Uytterhoeven
2026-08-21 11:52   ` Vladimir Zapolskiy
2026-08-21  8:53 ` [PATCH 25/45] clk: pistachio: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 26/45] clk: pwm: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 27/45] clk: renesas: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 28/45] clk: rockchip: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 29/45] clk: samsung: " Geert Uytterhoeven
2026-08-21 11:04   ` Krzysztof Kozlowski
2026-08-21  8:53 ` [PATCH 30/45] clk: scpi: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 31/45] clk: silabs: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 32/45] clk: socfpga: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 33/45] clk: spear: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 34/45] clk: stm32: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 35/45] clk: st: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 36/45] clk: sunxi: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 37/45] clk: tegra: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 38/45] clk: uniphier: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 39/45] clk: ux500: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 40/45] clk: versatile: " Geert Uytterhoeven
2026-08-21 11:28   ` Liviu Dudau
2026-08-21  8:53 ` [PATCH 41/45] clk: vt8500: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 42/45] clk: x86: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 43/45] clk: xgene: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 44/45] clk: xilinx: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 45/45] clk: zynqmp: " Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox