* [PATCH net-next 1/3] net: macb: Make sure clk_init_data is fully initialized
2026-08-21 10:07 [PATCH net-next 0/3] net: Make sure clk_init_data is fully initialized Geert Uytterhoeven
@ 2026-08-21 10:07 ` Geert Uytterhoeven
2026-08-21 10:07 ` [PATCH net-next 2/3] net: mdio: mux-meson-g12a: " Geert Uytterhoeven
2026-08-21 10:07 ` [PATCH net-next 3/3] net: phy: air_en8811h: " Geert Uytterhoeven
2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21 10:07 UTC (permalink / raw)
To: Théo Lebrun, Conor Dooley, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Heiner Kallweit,
Russell King, Neil Armstrong, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl
Cc: netdev, linux-arm-kernel, linux-amlogic, linux-clk, Geert Uytterhoeven
The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need. However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.
Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
drivers/net/ethernet/cadence/macb_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 1476bce77f34d2a5..319e43098f57ed7b 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -5376,7 +5376,7 @@ static int fu540_c000_clk_init(struct platform_device *pdev, struct clk **pclk,
struct clk **hclk, struct clk **tx_clk,
struct clk **rx_clk, struct clk **tsu_clk)
{
- struct clk_init_data init;
+ struct clk_init_data init = {};
int err = 0;
err = macb_clk_init_dflt(pdev, pclk, hclk, tx_clk, rx_clk, tsu_clk);
--
2.43.0
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH net-next 2/3] net: mdio: mux-meson-g12a: Make sure clk_init_data is fully initialized
2026-08-21 10:07 [PATCH net-next 0/3] net: Make sure clk_init_data is fully initialized Geert Uytterhoeven
2026-08-21 10:07 ` [PATCH net-next 1/3] net: macb: " Geert Uytterhoeven
@ 2026-08-21 10:07 ` Geert Uytterhoeven
2026-08-21 10:07 ` [PATCH net-next 3/3] net: phy: air_en8811h: " Geert Uytterhoeven
2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21 10:07 UTC (permalink / raw)
To: Théo Lebrun, Conor Dooley, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Heiner Kallweit,
Russell King, Neil Armstrong, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl
Cc: netdev, linux-arm-kernel, linux-amlogic, linux-clk, Geert Uytterhoeven
The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need. However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.
Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
drivers/net/mdio/mdio-mux-meson-g12a.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mdio/mdio-mux-meson-g12a.c b/drivers/net/mdio/mdio-mux-meson-g12a.c
index 08d6a6c93fb8bf02..e6c9ef3641afa27e 100644
--- a/drivers/net/mdio/mdio-mux-meson-g12a.c
+++ b/drivers/net/mdio/mdio-mux-meson-g12a.c
@@ -223,7 +223,7 @@ static int g12a_ephy_glue_clk_register(struct device *dev)
{
struct g12a_mdio_mux *priv = dev_get_drvdata(dev);
const char *parent_names[PLL_MUX_NUM_PARENT];
- struct clk_init_data init;
+ struct clk_init_data init = {};
struct g12a_ephy_pll *pll;
struct clk_mux *mux;
struct clk *clk;
--
2.43.0
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH net-next 3/3] net: phy: air_en8811h: Make sure clk_init_data is fully initialized
2026-08-21 10:07 [PATCH net-next 0/3] net: Make sure clk_init_data is fully initialized Geert Uytterhoeven
2026-08-21 10:07 ` [PATCH net-next 1/3] net: macb: " Geert Uytterhoeven
2026-08-21 10:07 ` [PATCH net-next 2/3] net: mdio: mux-meson-g12a: " Geert Uytterhoeven
@ 2026-08-21 10:07 ` Geert Uytterhoeven
2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21 10:07 UTC (permalink / raw)
To: Théo Lebrun, Conor Dooley, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Heiner Kallweit,
Russell King, Neil Armstrong, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl
Cc: netdev, linux-arm-kernel, linux-amlogic, linux-clk, Geert Uytterhoeven
The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need. However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.
Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
drivers/net/phy/air_en8811h.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/air_en8811h.c b/drivers/net/phy/air_en8811h.c
index edd49c193e476838..d1ab8744288bba0c 100644
--- a/drivers/net/phy/air_en8811h.c
+++ b/drivers/net/phy/air_en8811h.c
@@ -932,7 +932,7 @@ static const struct clk_ops an8811hb_clk_ops = {
static int an8811hb_clk_provider_setup(struct device *dev, struct clk_hw *hw)
{
- struct clk_init_data init;
+ struct clk_init_data init = {};
int ret;
if (!IS_ENABLED(CONFIG_COMMON_CLK))
@@ -1031,7 +1031,7 @@ static const struct clk_ops en8811h_clk_ops = {
static int en8811h_clk_provider_setup(struct device *dev, struct clk_hw *hw)
{
- struct clk_init_data init;
+ struct clk_init_data init = {};
int ret;
if (!IS_ENABLED(CONFIG_COMMON_CLK))
--
2.43.0
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 4+ messages in thread