clk: Make sure clk_init_data is fully initialized (part two)
Subsystems (34)
Geert Uytterhoeven
maintainercover clk: Make sure clk_init_data is fully initialized (part two)
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/[email protected]
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(-)
Signature · 12 lines
2.43.0
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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 TorvaldsGeert Uytterhoeven
maintainerPATCH 1/45 clk: aspeed: Make sure clk_init_data is fully initialized
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.
---
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(-)
drivers/clk/aspeed/clk-aspeed.c +1 -1
@@ -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;
drivers/clk/aspeed/clk-ast2600.c +1 -1
@@ -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;
drivers/clk/aspeed/clk-ast2700.c +1 -1
@@ -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 ;
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 2/45 clk: at91: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
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(-)
drivers/clk/at91/clk-audio-pll.c +2 -2
@@ -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);
drivers/clk/at91/clk-h32mx.c +1 -1
@@ -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);
drivers/clk/at91/clk-main.c +1 -1
@@ -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;
drivers/clk/at91/clk-pll.c +1 -1
@@ -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;
drivers/clk/at91/clk-plldiv.c +1 -1
@@ -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);
drivers/clk/at91/clk-slow.c +1 -1
@@ -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)
drivers/clk/at91/clk-smd.c +1 -1
@@ -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);
drivers/clk/at91/clk-usb.c +3 -3
@@ -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);
drivers/clk/at91/sckc.c +1 -1
@@ -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)
Signature · 1 line
2.43.0
Re: [PATCH 02/45] clk: at91: Make sure clk_init_data is fully initialized
Quoted 14 lines · Geert Uytterhoeven
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis 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 <[email protected]>---
Compile-tested only.
Quoted 11 lines
--- 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(-)
Thanks Geert,
Nicolas
Geert Uytterhoeven
maintainerPATCH 3/45 clk: bcm: iproc: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
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(-)
drivers/clk/bcm/clk-iproc-armpll.c +1 -1
@@ -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);
drivers/clk/bcm/clk-iproc-asiu.c +1 -1
@@ -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;
drivers/clk/bcm/clk-iproc-pll.c +1 -1
@@ -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;
Signature · 1 line
2.43.0
Re: [PATCH 03/45] clk: bcm: iproc: Make sure clk_init_data is fully initialized
Quoted 7 lines · Geert Uytterhoeven
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis enabled.
Quoted 5 lines
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 <[email protected]>
Signature · 1 line
Florian
Geert Uytterhoeven
maintainerPATCH 4/45 clk: berlin: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
Compile-tested only.
--- drivers/clk/berlin/berlin2-avpll.c | 4 ++-- drivers/clk/berlin/berlin2-pll.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/clk/berlin/berlin2-avpll.c +2 -2
@@ -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)
drivers/clk/berlin/berlin2-pll.c +1 -1
@@ -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);
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 5/45 clk: cdce925: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
Compile-tested only.
--- drivers/clk/clk-cdce925.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-cdce925.c +1 -1
@@ -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;
Signature · 1 line
2.43.0
Re: [PATCH 05/45] clk: cdce925: Make sure clk_init_data is fully initialized
Quoted 7 lines · Geert Uytterhoeven
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis enabled.
Quoted 5 lines
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 <[email protected]>
Best regards,
Liviu
Quoted 22 lines
---
Compile-tested only.--- drivers/clk/clk-cdce925.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/clk/clk-cdce925.c +1
-1@@ -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;Signature · 1 line
2.43.0
Signature · 8 lines
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯Geert Uytterhoeven
maintainerPATCH 6/45 clk: clk-axi-clkgen: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
Compile-tested only.
--- drivers/clk/clk-axi-clkgen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-axi-clkgen.c +1 -1
@@ -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;
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 7/45 clk: cs2000-cp: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
Boot-tested on Salvator-X(S) and Ebisu-4D.
--- drivers/clk/clk-cs2000-cp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-cs2000-cp.c +1 -1
@@ -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 ;
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 8/45 clk: davinci: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
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(-)
drivers/clk/davinci/da8xx-cfgchip.c +2 -2
@@ -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 );
drivers/clk/davinci/pll.c +1 -1
@@ -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 ;
drivers/clk/davinci/psc.c +1 -1
@@ -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;
Signature · 1 line
2.43.0
Re: [PATCH 08/45] clk: davinci: Make sure clk_init_data is fully initialized
Quoted 7 lines · Geert Uytterhoeven
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis enabled.
Quoted 6 lines
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 <[email protected]>---
(had to trim the recipients to get my mail server to let me send the message)
Geert Uytterhoeven
maintainerPATCH 9/45 clk: fractional-divider: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
Compile-tested only.
--- drivers/clk/clk-fractional-divider.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-fractional-divider.c +1 -1
@@ -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;
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 10/45 clk: gemini: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
Compile-tested only.
--- drivers/clk/clk-gemini.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-gemini.c +1 -1
@@ -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);
Signature · 1 line
2.43.0
Re: [PATCH 10/45] clk: gemini: Make sure clk_init_data is fully initialized
Quoted 7 lines · Geert Uytterhoeven
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis enabled.
Quoted 5 lines
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 <[email protected]>
Yours,
Linus Walleij
Geert Uytterhoeven
maintainerPATCH 11/45 clk: highbank: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
Compile-tested only.
--- drivers/clk/clk-highbank.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-highbank.c +1 -1
@@ -269,7 +269,7 @@ static void __init hb_clk_init(struct device_node *node, const struct clk_ops *ostruct 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;
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 12/45 clk: hisilicon: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
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(-)
drivers/clk/hisilicon/clk-hi3559a.c +1 -1
@@ -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 );
drivers/clk/hisilicon/clk-hi3620.c +1 -1
@@ -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)
drivers/clk/hisilicon/clk-hi6220-stub.c +1 -1
@@ -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;
drivers/clk/hisilicon/clk-hisi-phase.c +1 -1
@@ -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)
drivers/clk/hisilicon/clk-hix5hd2.c +1 -1
@@ -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)
drivers/clk/hisilicon/clkdivider-hi6220.c +1 -1
@@ -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;
drivers/clk/hisilicon/clkgate-separated.c +1 -1
@@ -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)
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 13/45 clk: imx: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
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(-)
drivers/clk/imx/clk-busy.c +2 -2
@@ -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);
drivers/clk/imx/clk-cpu.c +1 -1
@@ -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);
drivers/clk/imx/clk-divider-gate.c +1 -1
@@ -179,8 +179,8 @@ struct clk_hw *imx_clk_hw_divider_gate(const char *name, const char *parent_nameconst 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;
drivers/clk/imx/clk-fixup-div.c +1 -1
@@ -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)
drivers/clk/imx/clk-fixup-mux.c +1 -1
@@ -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)
drivers/clk/imx/clk-frac-pll.c +1 -1
@@ -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;
drivers/clk/imx/clk-fracn-gppll.c +1 -1
@@ -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);
drivers/clk/imx/clk-gate-93.c +1 -1
@@ -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;
drivers/clk/imx/clk-gate-exclusive.c +1 -1
@@ -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 )
drivers/clk/imx/clk-gate2.c +1 -1
@@ -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);
drivers/clk/imx/clk-lpcg-scu.c +1 -1
@@ -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;
drivers/clk/imx/clk-pfd.c +1 -1
@@ -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);
drivers/clk/imx/clk-pfdv2.c +1 -1
@@ -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;
drivers/clk/imx/clk-pll14xx.c +1 -1
@@ -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;
drivers/clk/imx/clk-pllv1.c +1 -1
@@ -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);
drivers/clk/imx/clk-pllv2.c +1 -1
@@ -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);
drivers/clk/imx/clk-pllv3.c +1 -1
@@ -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);
drivers/clk/imx/clk-pllv4.c +1 -1
@@ -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);
drivers/clk/imx/clk-scu.c +2 -2
@@ -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 )
drivers/clk/imx/clk-sscg-pll.c +1 -1
@@ -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;
Signature · 1 line
2.43.0
Re: [PATCH 13/45] clk: imx: Make sure clk_init_data is fully initialized
Quoted 7 lines · Geert Uytterhoeven
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis enabled.
Quoted 5 lines
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 <[email protected]>
RE: [PATCH 13/45] clk: imx: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenQuoted 10 lines
Subject: [PATCH 13/45] clk: imx: Make sure
clk_init_datais fully initializedThe
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis enabled.
Quoted 5 lines
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 <[email protected]>
NXP Confidential
Geert Uytterhoeven
maintainerPATCH 14/45 clk: ingenic: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
Compile-tested only.
--- drivers/clk/ingenic/cgu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/ingenic/cgu.c +1 -1
@@ -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;
Signature · 1 line
2.43.0
Re: [PATCH 14/45] clk: ingenic: Make sure clk_init_data is fully initialized
Hi Geert,
Le vendredi 21 août 2026 à 10:53 +0200, Geert Uytterhoeven a écrit :
Quoted 9 lines
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis
enabled.
Quoted 6 lines
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 <[email protected]>
Cheers,
-Paul
Quoted 22 lines
---
Compile-tested only.
---
drivers/clk/ingenic/cgu.c | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/clk/ingenic/cgu.c +0
-0@@ -644,8 +644,8 @@ static const struct clk_ops ingenic_clk_ops = {static int
ingenic_register_clock(struct ingenic_cgu *cgu, unsigned idx)
{
const structingenic_cgu_clk_info*clk_info= &cgu-Quoted 1 line
clock_info[idx];
drivers/clk/ingenic/cgu.c +0
-1-struct clk_init_data clk_init;struct
ingenic_clk*ingenic_clk= NULL;drivers/clk/ingenic/cgu.c +1
-0+struct clk_init_data clk_init = {};struct clk *clk, *parent;
const char *parent_names[4];
unsigned caps, i,num_possible;
Geert Uytterhoeven
maintainerPATCH 15/45 clk: keystone: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
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(-)
drivers/clk/keystone/gate.c +1 -1
@@ -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;
drivers/clk/keystone/pll.c +1 -1
@@ -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;
drivers/clk/keystone/syscon-clk.c +1 -1
@@ -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;
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 16/45 clk: lmk04832: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
Compile-tested only.
--- drivers/clk/clk-lmk04832.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/clk/clk-lmk04832.c +3 -3
@@ -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;
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 17/45 clk: mediatek: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
Compile-tested only.
--- drivers/clk/mediatek/clk-cpumux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/mediatek/clk-cpumux.c +1 -1
@@ -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)
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 18/45 clk: milbeaut: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
Compile-tested only.
--- drivers/clk/clk-milbeaut.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/clk-milbeaut.c +2 -2
@@ -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);
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 19/45 clk: mmp: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
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(-)
drivers/clk/mmp/clk-apbc.c +1 -1
@@ -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)
drivers/clk/mmp/clk-apmu.c +1 -1
@@ -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)
drivers/clk/mmp/clk-frac.c +1 -1
@@ -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) {
drivers/clk/mmp/clk-gate.c +1 -1
@@ -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);
drivers/clk/mmp/clk-mix.c +1 -1
@@ -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)
drivers/clk/mmp/clk-pll.c +1 -1
@@ -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)
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 20/45 clk: mvebu: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
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(-)
drivers/clk/mvebu/ap-cpu-clk.c +1 -1
@@ -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;
drivers/clk/mvebu/clk-corediv.c +1 -1
@@ -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;
drivers/clk/mvebu/clk-cpu.c +1 -1
@@ -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 );
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 21/45 clk: mxs: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
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(-)
drivers/clk/mxs/clk-div.c +1 -1
@@ -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)
drivers/clk/mxs/clk-frac.c +1 -1
@@ -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)
drivers/clk/mxs/clk-pll.c +1 -1
@@ -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)
drivers/clk/mxs/clk-ref.c +1 -1
@@ -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)
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 22/45 clk: nomadik: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
Compile-tested only.
--- drivers/clk/clk-nomadik.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/clk-nomadik.c +2 -2
@@ -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)
Signature · 1 line
2.43.0
Re: [PATCH 22/45] clk: nomadik: Make sure clk_init_data is fully initialized
Quoted 7 lines · Geert Uytterhoeven
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis enabled.
Quoted 5 lines
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 <[email protected]>
Yours,
Linus Walleij
Geert Uytterhoeven
maintainerPATCH 23/45 clk: npcm7xx: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
Compile-tested only.
--- drivers/clk/clk-npcm7xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-npcm7xx.c +1 -1
@@ -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;
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 24/45 clk: nxp: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
Compile-tested only.
--- drivers/clk/nxp/clk-lpc18xx-creg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/nxp/clk-lpc18xx-creg.c +1 -1
@@ -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;
Signature · 1 line
2.43.0
Re: [PATCH 24/45] clk: nxp: Make sure clk_init_data is fully initialized
Quoted 23 lines · Geert Uytterhoeven
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis 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 <[email protected]>---
Compile-tested only.--- drivers/clk/nxp/clk-lpc18xx-creg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/clk/nxp/clk-lpc18xx-creg.c +0
-0
drivers/clk/nxp/clk-lpc18xx-creg.c static struct clk *clk_register_creg_clk(struct device *dev, · line 144
Quoted 8 lines
drivers/clk/nxp/clk-lpc18xx-creg.c +1
-1@@ -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;
Signature · 2 lines
Best wishes, Vladimir
Geert Uytterhoeven
maintainerPATCH 25/45 clk: pistachio: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
Compile-tested only.
--- drivers/clk/pistachio/clk-pll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/pistachio/clk-pll.c +1 -1
@@ -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);
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 26/45 clk: pwm: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
Compile-tested only.
--- drivers/clk/clk-pwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-pwm.c +1 -1
@@ -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;
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 27/45 clk: renesas: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
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(-)
drivers/clk/renesas/rzg2l-cpg.c +9 -9
@@ -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;
drivers/clk/renesas/rzv2h-cpg.c +4 -4
@@ -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;
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 28/45 clk: rockchip: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
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(-)
drivers/clk/rockchip/clk-cpu.c +1 -1
@@ -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;
drivers/clk/rockchip/clk-ddr.c +1 -1
@@ -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);
drivers/clk/rockchip/clk-gate-grf.c +1 -1
@@ -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)) {
drivers/clk/rockchip/clk-inverter.c +1 -1
@@ -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);
drivers/clk/rockchip/clk-mmc-phase.c +1 -1
@@ -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;
drivers/clk/rockchip/clk-muxgrf.c +1 -1
@@ -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)) {
drivers/clk/rockchip/clk-pll.c +1 -1
@@ -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;
drivers/clk/rockchip/clk.c +1 -1
@@ -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;
Signature · 1 line
2.43.0
Re: [PATCH 28/45] clk: rockchip: Make sure clk_init_data is fully initialized
Hi,
Quoted 7 lines · Geert Uytterhoeven
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis enabled.
Quoted 8 lines
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 <[email protected]>---
Compile-tested only.
---
Greetings,
-- Sebstian
Quoted 120 lines
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(-)drivers/clk/rockchip/clk-cpu.c +1
-1@@ -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;drivers/clk/rockchip/clk-ddr.c +1
-1@@ -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);drivers/clk/rockchip/clk-gate-grf.c +1
-1@@ -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)) {drivers/clk/rockchip/clk-inverter.c +1
-1@@ -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);drivers/clk/rockchip/clk-mmc-phase.c +1
-1@@ -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;drivers/clk/rockchip/clk-muxgrf.c +1
-1@@ -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)) {drivers/clk/rockchip/clk-pll.c +1
-1@@ -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;drivers/clk/rockchip/clk.c +1
-1@@ -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;Signature · 1 line
2.43.0
Re: [PATCH 28/45] clk: rockchip: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenAm Freitag, 21. August 2026, 10:53:38 Mitteleuropäische Sommerzeit schrieb Geert Uytterhoeven:
Quoted 7 lines
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis enabled.
Quoted 5 lines
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 <[email protected]>
Geert Uytterhoeven
maintainerPATCH 29/45 clk: samsung: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
Compile-tested only.
--- drivers/clk/samsung/clk-cpu.c | 2 +- drivers/clk/samsung/clk-pll.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/clk/samsung/clk-cpu.c +1 -1
@@ -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 ;
drivers/clk/samsung/clk-pll.c +1 -1
@@ -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;
Signature · 1 line
2.43.0
Re: [PATCH 29/45] clk: samsung: Make sure clk_init_data is fully initialized
Quoted 11 lines · Geert Uytterhoeven
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis 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.
Quoted 7 lines
Signed-off-by Geert Uytterhoeven <[email protected]>---
Compile-tested only.--- drivers/clk/samsung/clk-cpu.c | 2 +- drivers/clk/samsung/clk-pll.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
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
Re: [PATCH 29/45] clk: samsung: Make sure clk_init_data is fully initialized
Hi Krzysztof,
Quoted 8 lines · Krzysztof Kozlowski
Quoted 7 lines · Geert Uytterhoeven
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis enabled.
Quoted 7 lines
Quoted 5 lines
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 <[email protected]>Reviewed-by Krzysztof Kozlowski <[email protected]>
Thank you!
Quoted 2 lines
Let me know if I should take it via Samsung SoC clock tree. I assume by default this will go directly via clock tree.
In that case, please provide your Acked-by, so the clock maintainers don't have to parse your English response to find out ;-)
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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
Re: [PATCH 29/45] clk: samsung: Make sure clk_init_data is fully initialized
In reply to Krzysztof KozlowskiHi Krzysztof,
Quoted 21 lines · Krzysztof Kozlowski
Quoted 11 lines · Geert Uytterhoeven
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis 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.
Quoted 7 lines
Signed-off-by Geert Uytterhoeven <[email protected]>---
Compile-tested only.--- drivers/clk/samsung/clk-cpu.c | 2 +- drivers/clk/samsung/clk-pll.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Quoted 4 lines
Reviewed-by Krzysztof Kozlowski <[email protected]>Let me know if I should take it via Samsung SoC clock tree. I assume by default this will go directly via clock tree.
Please take it through your Samsung tree to avoid merge conflicts if there are other changes to these files during this development cycle.
Brian
Geert Uytterhoeven
maintainerPATCH 30/45 clk: scpi: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
Compile-tested only.
--- drivers/clk/clk-scpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-scpi.c +1 -1
@@ -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;
Signature · 1 line
2.43.0
Re: [PATCH 30/45] clk: scpi: Make sure clk_init_data is fully initialized
Quoted 11 lines · Geert Uytterhoeven
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis 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.
FWIW:
Signature · 2 lines
Regards, Sudeep
Geert Uytterhoeven
maintainerPATCH 31/45 clk: silabs: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
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(-)
drivers/clk/clk-si514.c +1 -1
@@ -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 );
drivers/clk/clk-si5341.c +1 -1
@@ -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 };
drivers/clk/clk-si544.c +1 -1
@@ -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 );
drivers/clk/clk-si570.c +1 -1
@@ -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;
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 32/45 clk: socfpga: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
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(-)
drivers/clk/socfpga/clk-gate-a10.c +1 -1
@@ -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);
drivers/clk/socfpga/clk-gate-s10.c +3 -3
@@ -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);
drivers/clk/socfpga/clk-gate.c +1 -1
@@ -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;
drivers/clk/socfpga/clk-periph-a10.c +1 -1
@@ -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 ];
drivers/clk/socfpga/clk-periph-s10.c +4 -4
@@ -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;
drivers/clk/socfpga/clk-periph.c +1 -1
@@ -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 ];
drivers/clk/socfpga/clk-pll-a10.c +1 -1
@@ -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 ;
drivers/clk/socfpga/clk-pll-s10.c +4 -4
@@ -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;
drivers/clk/socfpga/clk-pll.c +1 -1
@@ -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;
Signature · 1 line
2.43.0
Re: [PATCH 32/45] clk: socfpga: Make sure clk_init_data is fully initialized
Quoted 14 lines · Geert Uytterhoeven
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis 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 <[email protected]>---
Compile-tested only.
Quoted 12 lines
--- 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(-)
Thanks,
Dinh
Geert Uytterhoeven
maintainerPATCH 33/45 clk: spear: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
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(-)
drivers/clk/spear/clk-aux-synth.c +1 -1
@@ -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) {
drivers/clk/spear/clk-frac-synth.c +1 -1
@@ -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;
drivers/clk/spear/clk-gpt-synth.c +1 -1
@@ -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;
drivers/clk/spear/clk-vco-pll.c +1 -1
@@ -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 ||
Signature · 1 line
2.43.0
Re: [PATCH 33/45] clk: spear: Make sure clk_init_data is fully initialized
Quoted 12 lines · Geert Uytterhoeven
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis 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 <[email protected]>
Quoted 8 lines
---
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(-)
Signature · 1 line
viresh
Geert Uytterhoeven
maintainerPATCH 34/45 clk: stm32: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
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(-)
drivers/clk/clk-stm32f4.c +2 -2
@@ -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 */
drivers/clk/clk-stm32h7.c +1 -1
@@ -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;
drivers/clk/stm32/clk-stm32mp1.c +2 -2
@@ -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;
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 35/45 clk: st: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
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(-)
drivers/clk/st/clk-flexgen.c +1 -1
@@ -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;
drivers/clk/st/clkgen-fsyn.c +2 -2
@@ -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.
drivers/clk/st/clkgen-pll.c +1 -1
@@ -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)
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 36/45 clk: sunxi: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
Compile-tested only.
--- drivers/clk/sunxi/clk-sun4i-tcon-ch1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/sunxi/clk-sun4i-tcon-ch1.c +1 -1
@@ -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;
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 37/45 clk: tegra: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
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(-)
drivers/clk/tegra/clk-audio-sync.c +1 -1
@@ -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);
drivers/clk/tegra/clk-divider.c +1 -1
@@ -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) {
drivers/clk/tegra/clk-periph-fixed.c +1 -1
@@ -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);
drivers/clk/tegra/clk-periph-gate.c +1 -1
@@ -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);
drivers/clk/tegra/clk-periph.c +1 -1
@@ -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 );
drivers/clk/tegra/clk-pll-out.c +1 -1
@@ -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)
drivers/clk/tegra/clk-pll.c +1 -1
@@ -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;
drivers/clk/tegra/clk-sdmmc-mux.c +1 -1
@@ -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;
drivers/clk/tegra/clk-super.c +2 -2
@@ -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)
drivers/clk/tegra/clk-tegra-super-cclk.c +1 -1
@@ -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))
drivers/clk/tegra/clk-tegra124-emc.c +1 -1
@@ -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;
drivers/clk/tegra/clk-tegra20-emc.c +1 -1
@@ -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);
drivers/clk/tegra/clk-tegra210-emc.c +1 -1
@@ -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);
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 38/45 clk: uniphier: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
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(-)
drivers/clk/uniphier/clk-uniphier-cpugear.c +1 -1
@@ -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 );
drivers/clk/uniphier/clk-uniphier-fixed-factor.c +1 -1
@@ -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 );
drivers/clk/uniphier/clk-uniphier-fixed-rate.c +1 -1
@@ -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 */
drivers/clk/uniphier/clk-uniphier-gate.c +1 -1
@@ -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 );
drivers/clk/uniphier/clk-uniphier-mux.c +1 -1
@@ -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 );
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 39/45 clk: ux500: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
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(-)
drivers/clk/ux500/clk-prcc.c +1 -1
@@ -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) {
drivers/clk/ux500/clk-prcmu.c +2 -2
@@ -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;
drivers/clk/ux500/clk-sysctrl.c +1 -1
@@ -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;
Signature · 1 line
2.43.0
Re: [PATCH 39/45] clk: ux500: Make sure clk_init_data is fully initialized
Quoted 7 lines · Geert Uytterhoeven
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis enabled.
Quoted 5 lines
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 <[email protected]>
OK I trust you on this one:
Yours,
Linus Walleij
Re: [PATCH 39/45] clk: ux500: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenQuoted 8 lines · Geert Uytterhoeven
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis enabled.
Quoted 5 lines
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 <[email protected]>
Kind regards
Uffe
Quoted 63 lines
---
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(-)drivers/clk/ux500/clk-prcc.c +1
-1@@ -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) {drivers/clk/ux500/clk-prcmu.c +2
-2@@ -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;drivers/clk/ux500/clk-sysctrl.c +1
-2@@ -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
Geert Uytterhoeven
maintainerPATCH 40/45 clk: versatile: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
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(-)
drivers/clk/versatile/clk-icst.c +1 -1
@@ -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)
drivers/clk/versatile/clk-sp810.c +1 -1
@@ -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;
drivers/clk/versatile/clk-vexpress-osc.c +1 -1
@@ -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;
Signature · 1 line
2.43.0
Re: [PATCH 40/45] clk: versatile: Make sure clk_init_data is fully initialized
Quoted 7 lines · Geert Uytterhoeven
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis enabled.
Quoted 5 lines
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 <[email protected]>
Best regards,
Liviu
Quoted 51 lines
---
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(-)drivers/clk/versatile/clk-icst.c +1
-1@@ -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)drivers/clk/versatile/clk-sp810.c +1
-1@@ -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;drivers/clk/versatile/clk-vexpress-osc.c +1
-1@@ -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;Signature · 1 line
2.43.0
Signature · 8 lines
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯Re: [PATCH 40/45] clk: versatile: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenQuoted 7 lines · Geert Uytterhoeven
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis enabled.
Quoted 5 lines
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 <[email protected]>
Yours,
Linus Walleij
Geert Uytterhoeven
maintainerPATCH 41/45 clk: vt8500: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
Compile-tested only.
--- drivers/clk/clk-vt8500.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/clk-vt8500.c +2 -2
@@ -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)
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 42/45 clk: x86: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
Compile-tested only.
--- drivers/clk/x86/clk-pmc-atom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/x86/clk-pmc-atom.c +1 -1
@@ -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 );
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 43/45 clk: xgene: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
Compile-tested only.
--- drivers/clk/clk-xgene.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/clk/clk-xgene.c +3 -3
@@ -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 */
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 44/45 clk: xilinx: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
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(-)
drivers/clk/xilinx/clk-xlnx-clock-wizard.c +3 -3
@@ -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 );
drivers/clk/xilinx/xlnx_vcu.c +1 -1
@@ -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;
Signature · 1 line
2.43.0
Geert Uytterhoeven
maintainerPATCH 45/45 clk: zynqmp: Make sure clk_init_data is fully initialized
In reply to Geert UytterhoevenThe 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.
---
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(-)
drivers/clk/zynqmp/clk-gate-zynqmp.c +1 -1
@@ -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);
drivers/clk/zynqmp/clk-mux-zynqmp.c +1 -1
@@ -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);
drivers/clk/zynqmp/divider.c +1 -1
@@ -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 */
drivers/clk/zynqmp/pll.c +1 -1
@@ -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;
Signature · 1 line
2.43.0
Quoted 21 lines · Geert Uytterhoeven
Hi all,
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis 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.
Quoted 5 lines
Thanks for your comments!
[1] "[PATCH treewide 0/5] clk: Make sure
clk_init_datais fully initialized (part 1)"
https://lore.kernel.org/[email protected]
Thanks for cleaning this all up! For the series:
Heiko Stübner
maintainerHi Geert,
Am Freitag, 21. August 2026, 10:53:10 Mitteleuropäische Sommerzeit schrieb Geert Uytterhoeven:
Quoted 16 lines
Hi all,
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis 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.
Quoted 6 lines
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!
I guess more a handling question, how do you expect this series to be applied?
I.e. each clk-arch-maintainer, or in one big thing by the core clock maintainers? Just wondering if I should pick the Rockchip patch or just let the whole series get applied by the clock maintainers.
Heiko
Hi Heiko,
Quoted 22 lines · Heiko Stübner
Am Freitag, 21. August 2026, 10:53:10 Mitteleuropäische Sommerzeit schrieb Geert Uytterhoeven:
Quoted 21 lines
Hi all,
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis 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.
Quoted 8 lines
Quoted 1 line
Thanks for your comments!
I guess more a handling question, how do you expect this series to be applied?
I.e. each clk-arch-maintainer, or in one big thing by the core clock maintainers? Just wondering if I should pick the Rockchip patch or just let the whole series get applied by the clock maintainers.
Before you pick up anything, let's see if Stephen picks up this series the next few days before he sends his pull to Linus.
Next development cycle, Jerome Brunet and I will be clk co-maintainers
[1] and will start collecting patches then. If Stephen doesn't pick up this whole series this week, then pick up the patch(es) relevant for your tree and send Jerome and I pull as usual. That's just in case there's other patches that come in during the next development cycle to these files and to avoid merge conflicts. I don't have a strong opinion about this though, and could be convinced to take the whole series for simplicity.
Brian
Heiko Stübner
maintainerAm Dienstag, 25. August 2026, 17:11:47 Mitteleuropäische Sommerzeit schrieb Brian Masney:
Quoted 37 lines
Hi Heiko,
Quoted 22 lines · Heiko Stübner
Am Freitag, 21. August 2026, 10:53:10 Mitteleuropäische Sommerzeit schrieb Geert Uytterhoeven:
Quoted 21 lines
Hi all,
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis 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.
Quoted 8 lines
Quoted 1 line
Thanks for your comments!
I guess more a handling question, how do you expect this series to be applied?
I.e. each clk-arch-maintainer, or in one big thing by the core clock maintainers? Just wondering if I should pick the Rockchip patch or just let the whole series get applied by the clock maintainers.
Before you pick up anything, let's see if Stephen picks up this series the next few days before he sends his pull to Linus.
Quoted 8 lines
Next development cycle, Jerome Brunet and I will be clk co-maintainers
[1] and will start collecting patches then. If Stephen doesn't pick up this whole series this week, then pick up the patch(es) relevant for your tree and send Jerome and I pull as usual. That's just in case there's other patches that come in during the next development cycle to these files and to avoid merge conflicts. I don't have a strong opinion about this though, and could be convinced to take the whole series for simplicity.
Thanks for the heads up on the maintainer expansion :-) .
At least for me both work - Geert's fixes are for the clock types used by the Rockchip clock drivers and generally we mostly get new clock trees, so there shouldn't be any conflicts between this and other new stuff ;-) .
Heiko
Hi Geert / all,
Quoted 65 lines · Geert Uytterhoeven
Hi all,
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis 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_datais fully initialized (part 1)"
https://lore.kernel.org/[email protected]Geert Uytterhoeven (45):
clk: aspeed: Make sureclk_init_datais fully initialized
clk: at91: Make sureclk_init_datais fully initialized
clk: bcm: iproc: Make sureclk_init_datais fully initialized
clk: berlin: Make sureclk_init_datais fully initialized
clk: cdce925: Make sureclk_init_datais fully initialized
clk: clk-axi-clkgen: Make sureclk_init_datais fully initialized
clk: cs2000-cp: Make sureclk_init_datais fully initialized
clk: davinci: Make sureclk_init_datais fully initialized
clk: fractional-divider: Make sureclk_init_datais fully initialized
clk: gemini: Make sureclk_init_datais fully initialized
clk: highbank: Make sureclk_init_datais fully initialized
clk: hisilicon: Make sureclk_init_datais fully initialized
clk: imx: Make sureclk_init_datais fully initialized
clk: ingenic: Make sureclk_init_datais fully initialized
clk: keystone: Make sureclk_init_datais fully initialized
clk: lmk04832: Make sureclk_init_datais fully initialized
clk: mediatek: Make sureclk_init_datais fully initialized
clk: milbeaut: Make sureclk_init_datais fully initialized
clk: mmp: Make sureclk_init_datais fully initialized
clk: mvebu: Make sureclk_init_datais fully initialized
clk: mxs: Make sureclk_init_datais fully initialized
clk: nomadik: Make sureclk_init_datais fully initialized
clk: npcm7xx: Make sureclk_init_datais fully initialized
clk: nxp: Make sureclk_init_datais fully initialized
clk: pistachio: Make sureclk_init_datais fully initialized
clk: pwm: Make sureclk_init_datais fully initialized
clk: renesas: Make sureclk_init_datais fully initialized
clk: rockchip: Make sureclk_init_datais fully initialized
clk: samsung: Make sureclk_init_datais fully initialized
clk: scpi: Make sureclk_init_datais fully initialized
clk: silabs: Make sureclk_init_datais fully initialized
clk: socfpga: Make sureclk_init_datais fully initialized
clk: spear: Make sureclk_init_datais fully initialized
clk: stm32: Make sureclk_init_datais fully initialized
clk: st: Make sureclk_init_datais fully initialized
clk: sunxi: Make sureclk_init_datais fully initialized
clk: tegra: Make sureclk_init_datais fully initialized
Quoted 8 lines
clk: uniphier: Make sure
clk_init_datais fully initialized
clk: ux500: Make sureclk_init_datais fully initialized
clk: versatile: Make sureclk_init_datais fully initialized
clk: vt8500: Make sureclk_init_datais fully initialized
clk: x86: Make sureclk_init_datais fully initialized
clk: xgene: Make sureclk_init_datais fully initialized
clk: xilinx: Make sureclk_init_datais fully initialized
clk: zynqmp: Make sureclk_init_datais fully initialized
44 / 45 patches have been added to clk-next. I took it all for simplicity rather than everyone trying to cherry pick just their parts.
Geert: The only patch that didn't apply was:
[PATCH 27/45] clk: renesas: Make sure clk_init_data is fully initialized
I didn't look into it too much.
Brian
Hi Brian,
Quoted 19 lines · Brian Masney
Quoted 18 lines · Geert Uytterhoeven
The
clk_init_datastructure 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 whenCONFIG_INIT_STACK_ALL_PATTERNorCONFIG_INIT_STACK_NONEis 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.
[...]
Quoted 2 lines
44 / 45 patches have been added to clk-next. I took it all for simplicity rather than everyone trying to cherry pick just their parts.
Thanks!
Quoted 5 lines
Geert: The only patch that didn't apply was:
[PATCH 27/45] clk: renesas: Make sure
clk_init_datais fully initializedI didn't look into it too much.
No worries, I have queued it in renesas-clk for v7.4.
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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