Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Liviu Dudau <liviu.dudau@arm.com>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: "Ryan Chen" <ryan_chen@aspeedtech.com>,
	"Joel Stanley" <joel@jms.id.au>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Brian Masney" <bmasney+clk@redhat.com>,
	"Jerome Brunet" <jbrunet+clk@baylibre.com>,
	"Andrew Jeffery" <andrew@codeconstruct.com.au>,
	"Billy Tsai" <billy_tsai@aspeedtech.com>,
	"Nicolas Ferre" <nicolas.ferre@microchip.com>,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
	"Claudiu Beznea" <claudiu.beznea@tuxon.dev>,
	"Ray Jui" <rjui@broadcom.com>,
	"Scott Branden" <sbranden@broadcom.com>,
	"Broadcom internal kernel review list"
	<bcm-kernel-feedback-list@broadcom.com>,
	"Taichi Sugaya" <sugaya.taichi@socionext.com>,
	"Takao Orito" <orito.takao@socionext.com>,
	"Linus Walleij" <linusw@kernel.org>,
	"Avi Fishman" <avifishman70@gmail.com>,
	"Tomer Maimon" <tmaimon77@gmail.com>,
	"Tali Perry" <tali.perry1@gmail.com>,
	"Patrick Venture" <venture@google.com>,
	"Nancy Yuen" <yuenn@google.com>,
	"Benjamin Fair" <benjaminfair@google.com>,
	"Sudeep Holla" <sudeep.holla@kernel.org>,
	"Cristian Marussi" <cristian.marussi@arm.com>,
	"David Lechner" <david@lechnology.com>,
	"Abel Vesa" <abelvesa@kernel.org>, "Peng Fan" <peng.fan@nxp.com>,
	"Frank Li" <Frank.Li@nxp.com>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	"Fabio Estevam" <festevam@gmail.com>,
	"Paul Cercueil" <paul@crapouillou.net>,
	"Santosh Shilimkar" <ssantosh@kernel.org>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Gregory Clement" <gregory.clement@bootlin.com>,
	"Sebastian Hesselbarth" <sebastian.hesselbarth@gmail.com>,
	"Vladimir Zapolskiy" <vz@mleia.com>,
	"Heiko Stuebner" <heiko@sntech.de>,
	"Krzysztof Kozlowski" <krzk@kernel.org>,
	"Sylwester Nawrocki" <s.nawrocki@samsung.com>,
	"Chanwoo Choi" <cw00.choi@samsung.com>,
	"Peter Griffin" <peter.griffin@linaro.org>,
	"Alim Akhtar" <alim.akhtar@samsung.com>,
	"Dinh Nguyen" <dinguyen@kernel.org>,
	"Viresh Kumar" <vireshk@kernel.org>,
	"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
	"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
	"Emilio López" <emilio@elopez.com.ar>,
	"Chen-Yu Tsai" <wens@kernel.org>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Samuel Holland" <samuel@sholland.org>,
	"Prashant Gaikwad" <pgaikwad@nvidia.com>,
	"Thierry Reding" <thierry.reding@kernel.org>,
	"Jonathan Hunter" <jonathanh@nvidia.com>,
	"Kunihiko Hayashi" <hayashi.kunihiko@socionext.com>,
	"Masami Hiramatsu" <mhiramat@kernel.org>,
	"Ulf Hansson" <ulfh@kernel.org>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Michal Simek" <michal.simek@amd.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	linux-clk@vger.kernel.org, linux-aspeed@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org,
	arm-scmi@vger.kernel.org, imx@lists.linux.dev,
	linux-mips@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-rockchip@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, soc@lists.linux.dev,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH 40/45] clk: versatile: Make sure clk_init_data is fully initialized
Date: Fri, 21 Aug 2026 12:28:01 +0100	[thread overview]
Message-ID: <aog2QXT_86BrtvTs@e142607> (raw)
In-Reply-To: <7c480e73222bb51982fb82dc0cc6cd503f2e8b92.1787239813.git.geert+renesas@glider.be>

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

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

Best regards,
Liviu

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

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


  reply	other threads:[~2026-08-21 11:29 UTC|newest]

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

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=aog2QXT_86BrtvTs@e142607 \
    --to=liviu.dudau@arm.com \
    --cc=Frank.Li@nxp.com \
    --cc=abelvesa@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=alim.akhtar@samsung.com \
    --cc=andrew@codeconstruct.com.au \
    --cc=andrew@lunn.ch \
    --cc=arm-scmi@vger.kernel.org \
    --cc=avifishman70@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=benjaminfair@google.com \
    --cc=billy_tsai@aspeedtech.com \
    --cc=bmasney+clk@redhat.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=cristian.marussi@arm.com \
    --cc=cw00.choi@samsung.com \
    --cc=david@lechnology.com \
    --cc=dinguyen@kernel.org \
    --cc=emilio@elopez.com.ar \
    --cc=festevam@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=gregory.clement@bootlin.com \
    --cc=hayashi.kunihiko@socionext.com \
    --cc=heiko@sntech.de \
    --cc=imx@lists.linux.dev \
    --cc=jbrunet+clk@baylibre.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=joel@jms.id.au \
    --cc=jonathanh@nvidia.com \
    --cc=kernel@pengutronix.de \
    --cc=krzk@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=linux-tegra@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=mhiramat@kernel.org \
    --cc=michal.simek@amd.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=orito.takao@socionext.com \
    --cc=paul@crapouillou.net \
    --cc=peng.fan@nxp.com \
    --cc=peter.griffin@linaro.org \
    --cc=pgaikwad@nvidia.com \
    --cc=rjui@broadcom.com \
    --cc=ryan_chen@aspeedtech.com \
    --cc=s.hauer@pengutronix.de \
    --cc=s.nawrocki@samsung.com \
    --cc=samuel@sholland.org \
    --cc=sboyd@kernel.org \
    --cc=sbranden@broadcom.com \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=soc@lists.linux.dev \
    --cc=ssantosh@kernel.org \
    --cc=sudeep.holla@kernel.org \
    --cc=sugaya.taichi@socionext.com \
    --cc=tali.perry1@gmail.com \
    --cc=thierry.reding@kernel.org \
    --cc=tmaimon77@gmail.com \
    --cc=ulfh@kernel.org \
    --cc=venture@google.com \
    --cc=vireshk@kernel.org \
    --cc=vz@mleia.com \
    --cc=wens@kernel.org \
    --cc=yuenn@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox