From: "Théo Lebrun" <theo.lebrun@bootlin.com>
To: "Geert Uytterhoeven" <geert+renesas@glider.be>,
"Conor Dooley" <conor.dooley@microchip.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
"Russell King" <linux@armlinux.org.uk>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Kevin Hilman" <khilman@baylibre.com>,
"Jerome Brunet" <jbrunet@baylibre.com>,
"Martin Blumenstingl" <martin.blumenstingl@googlemail.com>
Cc: <netdev@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>,
<linux-amlogic@lists.infradead.org>, <linux-clk@vger.kernel.org>
Subject: Re: [PATCH net-next 1/3] net: macb: Make sure clk_init_data is fully initialized
Date: Mon, 24 Aug 2026 18:03:32 +0200 [thread overview]
Message-ID: <DKXAUOKYDIWV.B30CB2QWDDXQ@bootlin.com> (raw)
In-Reply-To: <00772e2fb1f8433a5d6c47dbd28cb4149495e1ab.1787240118.git.geert+renesas@glider.be>
Hello Geert,
On Fri Aug 21, 2026 at 12:07 PM CEST, Geert Uytterhoeven wrote:
> The clk_init_data structure contains several mutually-exclusive members
> for different methods to specify the possible parents of a clock,
> prompting drivers to initialize only the members they need. However,
> not initializing all members may cause subtle issues, which are only
> exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
> enabled.
>
> Make sure all members are fully initialized, to avoid such bugs, and to
> prevent future breakage when converting drivers to a different method
> for specifying the parents.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> Compile-tested only.
> ---
> drivers/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);
Reviewed-by: Théo Lebrun <theo.lebrun@bootlin.com>
I cannot give you a Tested-by because this triggers only on
sifive,fu540-c000-gem compatible matching upstream devicetrees
sifive/hifive-{unleashed,unmatched}-a00.dts
Thanks,
--
Théo Lebrun, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
WARNING: multiple messages have this Message-ID (diff)
From: "Théo Lebrun" <theo.lebrun@bootlin.com>
To: "Geert Uytterhoeven" <geert+renesas@glider.be>,
"Conor Dooley" <conor.dooley@microchip.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
"Russell King" <linux@armlinux.org.uk>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Kevin Hilman" <khilman@baylibre.com>,
"Jerome Brunet" <jbrunet@baylibre.com>,
"Martin Blumenstingl" <martin.blumenstingl@googlemail.com>
Cc: <netdev@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>,
<linux-amlogic@lists.infradead.org>, <linux-clk@vger.kernel.org>
Subject: Re: [PATCH net-next 1/3] net: macb: Make sure clk_init_data is fully initialized
Date: Mon, 24 Aug 2026 18:03:32 +0200 [thread overview]
Message-ID: <DKXAUOKYDIWV.B30CB2QWDDXQ@bootlin.com> (raw)
In-Reply-To: <00772e2fb1f8433a5d6c47dbd28cb4149495e1ab.1787240118.git.geert+renesas@glider.be>
Hello Geert,
On Fri Aug 21, 2026 at 12:07 PM CEST, Geert Uytterhoeven wrote:
> The clk_init_data structure contains several mutually-exclusive members
> for different methods to specify the possible parents of a clock,
> prompting drivers to initialize only the members they need. However,
> not initializing all members may cause subtle issues, which are only
> exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
> enabled.
>
> Make sure all members are fully initialized, to avoid such bugs, and to
> prevent future breakage when converting drivers to a different method
> for specifying the parents.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> Compile-tested only.
> ---
> drivers/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);
Reviewed-by: Théo Lebrun <theo.lebrun@bootlin.com>
I cannot give you a Tested-by because this triggers only on
sifive,fu540-c000-gem compatible matching upstream devicetrees
sifive/hifive-{unleashed,unmatched}-a00.dts
Thanks,
--
Théo Lebrun, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2026-08-24 16:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
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 1/3] net: macb: " Geert Uytterhoeven
2026-08-21 10:07 ` Geert Uytterhoeven
2026-08-22 10:08 ` sashiko-bot
2026-08-22 10:08 ` sashiko-bot
2026-08-24 16:03 ` Théo Lebrun [this message]
2026-08-24 16:03 ` Théo Lebrun
2026-08-21 10:07 ` [PATCH net-next 2/3] net: mdio: mux-meson-g12a: " Geert Uytterhoeven
2026-08-21 10:07 ` Geert Uytterhoeven
2026-08-22 10:08 ` sashiko-bot
2026-08-22 10:08 ` sashiko-bot
2026-08-21 10:07 ` [PATCH net-next 3/3] net: phy: air_en8811h: " Geert Uytterhoeven
2026-08-21 10:07 ` Geert Uytterhoeven
2026-08-22 10:08 ` sashiko-bot
2026-08-22 10:08 ` sashiko-bot
2026-08-22 19:44 ` [PATCH net-next 0/3] net: " Jakub Kicinski
2026-08-22 19:44 ` Jakub Kicinski
2026-08-24 15:23 ` Brian Masney
2026-08-24 15:23 ` Brian Masney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DKXAUOKYDIWV.B30CB2QWDDXQ@bootlin.com \
--to=theo.lebrun@bootlin.com \
--cc=andrew+netdev@lunn.ch \
--cc=conor.dooley@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=geert+renesas@glider.be \
--cc=hkallweit1@gmail.com \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=kuba@kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.