From patchwork Fri Aug 21 08:53:11 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3000 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mxe881.netcup.net (Postfix) with ESMTPS id 9BD431C05A3 for ; Fri, 21 Aug 2026 10:54:45 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 104.64.211.4) smtp.mailfrom=linux-sunxi+bounces-25245-noreply=patchwork.local@lists.linux.dev smtp.helo=sin.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 104.64.211.4 as permitted sender) client-ip=104.64.211.4; envelope-from=linux-sunxi+bounces-25245-noreply=patchwork.local@lists.linux.dev; helo=sin.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sin.lore.kernel.org (Postfix) with ESMTP id 7B2B030294B1 for ; Fri, 21 Aug 2026 08:54:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4E9CE41A4EF; Fri, 21 Aug 2026 08:54:37 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 033533AE6F5; Fri, 21 Aug 2026 08:54:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302477; cv=none; b=GbeKFWvtTSO29VpACxGiHQO7oqO7SbXfYDIUaUnjiPT3jW6Vu95Hsi/LK4em/bRwMRGeAfyONojEgv+bNzOejEaSC1cJYQyvu+xkfQ6KSGIUJ/DPJWYWL/Dv8xGEneyhOk6RzeiyPIOHrAwFq9BEk6PPwZAjkMNHbLaoHzxN48E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302477; c=relaxed/simple; bh=uv9NAhUELaCrHm4TyUUfw9jLoYul/ZrMHyB98EttRFs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QskDLW6hED7VK4zEpZyNiz2jHpQRAizkAK93FhrNu66htfVJ33ly4sgJzLcr75TLX9ynm0ypPgQFex5h8LA30qga8fML4r6wdXrjIdexnDcDzHLZ2sbdOQvt1h5EXCwi+P8gdAgCUTSTqHCHbfkiuU8W6xS03X0JKEicwfLEnEU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A57EA1F00A3A; Fri, 21 Aug 2026 08:54:20 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 01/45] clk: aspeed: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:11 +0200 Message-ID: <029b50dbb60753ef1e27045fc379802930c4085e.1787239813.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/aspeed/clk-aspeed.c | 2 +- drivers/clk/aspeed/clk-ast2600.c | 2 +- drivers/clk/aspeed/clk-ast2700.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/aspeed/clk-aspeed.c b/drivers/clk/aspeed/clk-aspeed.c index 38a5766a435ca27f..d32a3e9f300a2d74 100644 --- a/drivers/clk/aspeed/clk-aspeed.c +++ b/drivers/clk/aspeed/clk-aspeed.c @@ -349,8 +349,8 @@ static struct clk_hw *aspeed_clk_hw_register_gate(struct device *dev, struct regmap *map, u8 clock_idx, u8 reset_idx, u8 clk_gate_flags, spinlock_t *lock) { + struct clk_init_data init = {}; struct aspeed_clk_gate *gate; - struct clk_init_data init; struct clk_hw *hw; int ret; diff --git a/drivers/clk/aspeed/clk-ast2600.c b/drivers/clk/aspeed/clk-ast2600.c index 70061c961b69eccc..cc3d26602b16eba7 100644 --- a/drivers/clk/aspeed/clk-ast2600.c +++ b/drivers/clk/aspeed/clk-ast2600.c @@ -425,8 +425,8 @@ static struct clk_hw *aspeed_g6_clk_hw_register_gate(struct device *dev, struct regmap *map, u8 clock_idx, u8 reset_idx, u8 clk_gate_flags, spinlock_t *lock) { + struct clk_init_data init = {}; struct aspeed_clk_gate *gate; - struct clk_init_data init; struct clk_hw *hw; int ret; diff --git a/drivers/clk/aspeed/clk-ast2700.c b/drivers/clk/aspeed/clk-ast2700.c index 536600fcd0244e59..495b7fa3395b2106 100644 --- a/drivers/clk/aspeed/clk-ast2700.c +++ b/drivers/clk/aspeed/clk-ast2700.c @@ -824,7 +824,7 @@ static struct clk_hw *ast2700_clk_hw_register_gate(struct device *dev, const cha void __iomem *reg, u8 clock_idx, unsigned long flags, spinlock_t *lock) { - struct clk_init_data init; + struct clk_init_data init = {}; struct clk_gate *gate; struct clk_hw *hw; int ret = -EINVAL; From patchwork Fri Aug 21 08:53:12 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3009 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 1FCDD1C3812 for ; Fri, 21 Aug 2026 10:59:24 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25246-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25246-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 1F145317A85C for ; Fri, 21 Aug 2026 08:54:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B6F6041F5D8; Fri, 21 Aug 2026 08:54:52 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A5103E0724; Fri, 21 Aug 2026 08:54:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302492; cv=none; b=A71R6sm1qFBxAyYLGvqiwaJpTiNc6jPpGHXGXDT7ZxS74+l+5D6AMpdjluFUVn8olvfgONmdXu/cBjXk9Bi5pV6iVC6LYbv0f8nuXixxTu6q0qG2bNkvxhGl7j1IQwl596bqwQzleYyIlmYAGQSqq2CEf6oGosR+RC/rxKa8URE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302492; c=relaxed/simple; bh=JlqkPX1ms5jVGRajPjXnogE55ZXi2nFVYIiHcSd8Qik=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bb2SyUtBu3TlmcoKBeilbatni3z2pZqvlvAVwfD3FWwpsgLMx98dTtmhAwtxx6JkbqizeORAO43hBoNVvDYmvvsy9e7deW/FQTwi9BGnzZVEcUGk1jWPjLb2i1M630xu1Jo2GGx0/zGRdmEXBzHfvjGZ5UvCrXW8Ij6NHEWwkRU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B9A21F000E9; Fri, 21 Aug 2026 08:54:35 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 02/45] clk: at91: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:12 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 Acked-by: Nicolas Ferre --- Compile-tested only. --- drivers/clk/at91/clk-audio-pll.c | 4 ++-- drivers/clk/at91/clk-h32mx.c | 2 +- drivers/clk/at91/clk-main.c | 2 +- drivers/clk/at91/clk-pll.c | 2 +- drivers/clk/at91/clk-plldiv.c | 2 +- drivers/clk/at91/clk-slow.c | 2 +- drivers/clk/at91/clk-smd.c | 2 +- drivers/clk/at91/clk-usb.c | 6 +++--- drivers/clk/at91/sckc.c | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/clk/at91/clk-audio-pll.c b/drivers/clk/at91/clk-audio-pll.c index 732037bfbda836fe..26875ad0cce79ae0 100644 --- a/drivers/clk/at91/clk-audio-pll.c +++ b/drivers/clk/at91/clk-audio-pll.c @@ -486,8 +486,8 @@ struct clk_hw * __init at91_clk_register_audio_pll_pad(struct regmap *regmap, const char *name, const char *parent_name) { + struct clk_init_data init = {}; struct clk_audio_pad *apad_ck; - struct clk_init_data init; int ret; apad_ck = kzalloc_obj(*apad_ck); @@ -517,8 +517,8 @@ struct clk_hw * __init at91_clk_register_audio_pll_pmc(struct regmap *regmap, const char *name, const char *parent_name) { + struct clk_init_data init = {}; struct clk_audio_pmc *apmc_ck; - struct clk_init_data init; int ret; apmc_ck = kzalloc_obj(*apmc_ck); diff --git a/drivers/clk/at91/clk-h32mx.c b/drivers/clk/at91/clk-h32mx.c index 12bd112d3c509fe6..8d5488223e4937ef 100644 --- a/drivers/clk/at91/clk-h32mx.c +++ b/drivers/clk/at91/clk-h32mx.c @@ -97,7 +97,7 @@ at91_clk_register_h32mx(struct regmap *regmap, const char *name, const char *parent_name) { struct clk_sama5d4_h32mx *h32mxclk; - struct clk_init_data init; + struct clk_init_data init = {}; int ret; h32mxclk = kzalloc_obj(*h32mxclk); diff --git a/drivers/clk/at91/clk-main.c b/drivers/clk/at91/clk-main.c index ab515239adcf49e6..6074ed2a16cede94 100644 --- a/drivers/clk/at91/clk-main.c +++ b/drivers/clk/at91/clk-main.c @@ -298,8 +298,8 @@ at91_clk_register_main_rc_osc(struct regmap *regmap, const char *name, u32 frequency, u32 accuracy) { + struct clk_init_data init = {}; struct clk_main_rc_osc *osc; - struct clk_init_data init; struct clk_hw *hw; int ret; diff --git a/drivers/clk/at91/clk-pll.c b/drivers/clk/at91/clk-pll.c index b89f60cf02416eb6..1b9a37a9e0701b56 100644 --- a/drivers/clk/at91/clk-pll.c +++ b/drivers/clk/at91/clk-pll.c @@ -318,7 +318,7 @@ at91_clk_register_pll(struct regmap *regmap, const char *name, { struct clk_pll *pll; struct clk_hw *hw; - struct clk_init_data init; + struct clk_init_data init = {}; int offset = PLL_REG(id); unsigned int pllr; int ret; diff --git a/drivers/clk/at91/clk-plldiv.c b/drivers/clk/at91/clk-plldiv.c index 5f93aead03fa5810..135ca0abeb18898f 100644 --- a/drivers/clk/at91/clk-plldiv.c +++ b/drivers/clk/at91/clk-plldiv.c @@ -86,9 +86,9 @@ struct clk_hw * __init at91_clk_register_plldiv(struct regmap *regmap, const char *name, const char *parent_name) { + struct clk_init_data init = {}; struct clk_plldiv *plldiv; struct clk_hw *hw; - struct clk_init_data init; int ret; plldiv = kzalloc_obj(*plldiv); diff --git a/drivers/clk/at91/clk-slow.c b/drivers/clk/at91/clk-slow.c index f0cad50e490bf16e..dc0009ca2cef55b8 100644 --- a/drivers/clk/at91/clk-slow.c +++ b/drivers/clk/at91/clk-slow.c @@ -42,8 +42,8 @@ at91_clk_register_sam9260_slow(struct regmap *regmap, int num_parents) { struct clk_sam9260_slow *slowck; + struct clk_init_data init = {}; struct clk_hw *hw; - struct clk_init_data init; int ret; if (!name) diff --git a/drivers/clk/at91/clk-smd.c b/drivers/clk/at91/clk-smd.c index 77f2b8fe6cabd5fb..4eff52a9798ba443 100644 --- a/drivers/clk/at91/clk-smd.c +++ b/drivers/clk/at91/clk-smd.c @@ -113,9 +113,9 @@ struct clk_hw * __init at91sam9x5_clk_register_smd(struct regmap *regmap, const char *name, const char **parent_names, u8 num_parents) { + struct clk_init_data init = {}; struct at91sam9x5_clk_smd *smd; struct clk_hw *hw; - struct clk_init_data init; int ret; smd = kzalloc_obj(*smd); diff --git a/drivers/clk/at91/clk-usb.c b/drivers/clk/at91/clk-usb.c index b4dc86193e09fbd0..0e4c0367c1afa77c 100644 --- a/drivers/clk/at91/clk-usb.c +++ b/drivers/clk/at91/clk-usb.c @@ -224,9 +224,9 @@ _at91sam9x5_clk_register_usb(struct regmap *regmap, const char *name, const char **parent_names, u8 num_parents, u32 usbs_mask) { + struct clk_init_data init = {}; struct at91sam9x5_clk_usb *usb; struct clk_hw *hw; - struct clk_init_data init; int ret; usb = kzalloc_obj(*usb); @@ -275,9 +275,9 @@ struct clk_hw * __init at91sam9n12_clk_register_usb(struct regmap *regmap, const char *name, const char *parent_name) { + struct clk_init_data init = {}; struct at91sam9x5_clk_usb *usb; struct clk_hw *hw; - struct clk_init_data init; int ret; usb = kzalloc_obj(*usb); @@ -394,9 +394,9 @@ struct clk_hw * __init at91rm9200_clk_register_usb(struct regmap *regmap, const char *name, const char *parent_name, const u32 *divisors) { + struct clk_init_data init = {}; struct at91rm9200_clk_usb *usb; struct clk_hw *hw; - struct clk_init_data init; int ret; usb = kzalloc_obj(*usb); diff --git a/drivers/clk/at91/sckc.c b/drivers/clk/at91/sckc.c index 776118f14867de02..fc5ca22d181a7502 100644 --- a/drivers/clk/at91/sckc.c +++ b/drivers/clk/at91/sckc.c @@ -231,9 +231,9 @@ at91_clk_register_slow_rc_osc(void __iomem *sckcr, unsigned long startup, const struct clk_slow_bits *bits) { + struct clk_init_data init = {}; struct clk_slow_rc_osc *osc; struct clk_hw *hw; - struct clk_init_data init; int ret; if (!sckcr || !name) From patchwork Fri Aug 21 08:53:13 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3011 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 0C66E1C05B2 for ; Fri, 21 Aug 2026 11:00:50 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25247-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25247-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 22E2B3185F43 for ; Fri, 21 Aug 2026 08:55:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B04A53E0724; Fri, 21 Aug 2026 08:55:07 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 80D623AEF57; Fri, 21 Aug 2026 08:55:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302507; cv=none; b=IT2K5emCoPM4EeakG7tlAwtR7nWSJBCxXpLrL98SvbpIHcO+4KMbF2eyD2zQcF8A7F85r4kfOb6T9qBe+w7BzCGz/EQWQNhvuUF9OuNYb7SzzEFwMS4thsUXa3pGTIxO0kMAWZnswZfsTen50j6goUNcqiaaDlcV63rLXYrjmqM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302507; c=relaxed/simple; bh=ijPgJdxH5wANv6UsM6rlK1A0lxPiQHRfRYRszGaz6HI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cnQuHaVs2glYM0VmyCmPxFJ4udgN4kPXRH1VjsBanQi8ApbDLxKdBbFP91dwE6TjmeJo6tUhElrS2FEhLobRlRzw7E6T+mlsYswFH70qqiA0qPOCajy1CmH+LjaHy1u067JvaPFpyRZPytkeCKmNc7Id+/G1uW1GczP5PZUgL0A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64BD61F00A3A; Fri, 21 Aug 2026 08:54:51 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 03/45] clk: bcm: iproc: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:13 +0200 Message-ID: <28233748ddbdefe6a2eb18127d5cd5f72984ab62.1787239813.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/bcm/clk-iproc-armpll.c | 2 +- drivers/clk/bcm/clk-iproc-asiu.c | 2 +- drivers/clk/bcm/clk-iproc-pll.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/bcm/clk-iproc-armpll.c b/drivers/clk/bcm/clk-iproc-armpll.c index 8485428fe49ce667..aca53e2bda010cca 100644 --- a/drivers/clk/bcm/clk-iproc-armpll.c +++ b/drivers/clk/bcm/clk-iproc-armpll.c @@ -235,7 +235,7 @@ void __init iproc_armpll_setup(struct device_node *node) { int ret; struct iproc_arm_pll *pll; - struct clk_init_data init; + struct clk_init_data init = {}; const char *parent_name; pll = kzalloc_obj(*pll); diff --git a/drivers/clk/bcm/clk-iproc-asiu.c b/drivers/clk/bcm/clk-iproc-asiu.c index 56a8132279814d03..86c0100934f81bd5 100644 --- a/drivers/clk/bcm/clk-iproc-asiu.c +++ b/drivers/clk/bcm/clk-iproc-asiu.c @@ -206,7 +206,7 @@ void __init iproc_asiu_setup(struct device_node *node, goto err_iomap_gate; for (i = 0; i < num_clks; i++) { - struct clk_init_data init; + struct clk_init_data init = {}; const char *parent_name; struct iproc_asiu_clk *asiu_clk; const char *clk_name; diff --git a/drivers/clk/bcm/clk-iproc-pll.c b/drivers/clk/bcm/clk-iproc-pll.c index d708f770971ceed1..4354aac2d2707d71 100644 --- a/drivers/clk/bcm/clk-iproc-pll.c +++ b/drivers/clk/bcm/clk-iproc-pll.c @@ -722,7 +722,7 @@ void iproc_pll_clk_setup(struct device_node *node, int i, ret; struct iproc_pll *pll; struct iproc_clk *iclk; - struct clk_init_data init; + struct clk_init_data init = {}; const char *parent_name; struct iproc_clk *iclk_array; struct clk_hw_onecell_data *clk_data; From patchwork Fri Aug 21 08:53:14 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3001 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mxe881.netcup.net (Postfix) with ESMTPS id 155981C05B2 for ; Fri, 21 Aug 2026 10:55:29 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.105.105.114) smtp.mailfrom=linux-sunxi+bounces-25248-noreply=patchwork.local@lists.linux.dev smtp.helo=tor.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.105.105.114 as permitted sender) client-ip=172.105.105.114; envelope-from=linux-sunxi+bounces-25248-noreply=patchwork.local@lists.linux.dev; helo=tor.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by tor.lore.kernel.org (Postfix) with ESMTP id 1787C3047496 for ; Fri, 21 Aug 2026 08:55:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E65A426438; Fri, 21 Aug 2026 08:55:23 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D890F381B04; Fri, 21 Aug 2026 08:55:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302523; cv=none; b=M0c6QWrzbqUc+axwXlFfXWieL37MX6bGlH9a0Ab698P8qQ5QsxzVOPUB/ybPLEIo1mKHqhkQvGFqw8LlK6qNo0f3rNLXbvOCGwmBdKuE59zlE2LSrPd62o5Me48IjtJdHbJFY+eSi6einQMt4zUOfJmLKJO4xPhd5x14VX6Q/Cg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302523; c=relaxed/simple; bh=arpWXg/Hfm5mytg++7VEom9twtaQYTFYbcFpfRZXGDo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=du+20WfahXwNTyt+uDOGAIime9RkgW4uwViWcKX2J2hoggpU6kn+yaydLhoOMSAb030UcqkRTFzk1jcTVjoqPR/DwSz1z8GO6ILPA+AZtOGkaxXKC8FMxorhaUh8IlM+IWLIzF1r2w4Pea5XEl5T+NlZgY2TMOgqOuQuurPhtPE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A05811F000E9; Fri, 21 Aug 2026 08:55:06 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 04/45] clk: berlin: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:14 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [3.84 / 15.00]; RBL_SENDERSCORE(2.00)[172.105.105.114:from]; SUSPICIOUS_RECIPS(1.50)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; PRECEDENCE_BULK(0.00)[]; DMARC_NA(0.00)[glider.be]; RCVD_COUNT_FIVE(0.00)[5]; TAGGED_RCPT(0.00)[clk,renesas]; DBL_BLOCKED_OPENRESOLVER(0.00)[glider.be:email,tor.lore.kernel.org:rdns,tor.lore.kernel.org:helo]; FROM_NEQ_ENVFROM(0.00)[geert@glider.be,linux-sunxi@lists.linux.dev]; ASN(0.00)[asn:63949, ipnet:172.105.96.0/20, country:SG]; TAGGED_FROM(0.00)[bounces-25248-noreply=patchwork.local,renesas]; RCPT_COUNT_GT_50(0.00)[78]; FREEMAIL_TO(0.00)[aspeedtech.com,jms.id.au,kernel.org,redhat.com,baylibre.com,codeconstruct.com.au,microchip.com,bootlin.com,tuxon.dev,broadcom.com,socionext.com,gmail.com,google.com,arm.com,lechnology.com,nxp.com,pengutronix.de,crapouillou.net,lunn.ch,mleia.com,sntech.de,samsung.com,linaro.org,foss.st.com,elopez.com.ar,sholland.org,nvidia.com,amd.com]; R_SPF_ALLOW(0.00)[+ip4:172.105.105.114]; TO_DN_SOME(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 155981C05B2 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/berlin/berlin2-avpll.c | 4 ++-- drivers/clk/berlin/berlin2-pll.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/berlin/berlin2-avpll.c b/drivers/clk/berlin/berlin2-avpll.c index c801d42397bf06b2..33a3cc16b0cc5f4b 100644 --- a/drivers/clk/berlin/berlin2-avpll.c +++ b/drivers/clk/berlin/berlin2-avpll.c @@ -181,8 +181,8 @@ int __init berlin2_avpll_vco_register(void __iomem *base, const char *name, const char *parent_name, u8 vco_flags, unsigned long flags) { + struct clk_init_data init = {}; struct berlin2_avpll_vco *vco; - struct clk_init_data init; vco = kzalloc_obj(*vco); if (!vco) @@ -358,7 +358,7 @@ int __init berlin2_avpll_channel_register(void __iomem *base, u8 ch_flags, unsigned long flags) { struct berlin2_avpll_channel *ch; - struct clk_init_data init; + struct clk_init_data init = {}; ch = kzalloc_obj(*ch); if (!ch) diff --git a/drivers/clk/berlin/berlin2-pll.c b/drivers/clk/berlin/berlin2-pll.c index d0ec3d0bcf3e57ea..1c4203736ecf4ff7 100644 --- a/drivers/clk/berlin/berlin2-pll.c +++ b/drivers/clk/berlin/berlin2-pll.c @@ -78,7 +78,7 @@ berlin2_pll_register(const struct berlin2_pll_map *map, void __iomem *base, const char *name, const char *parent_name, unsigned long flags) { - struct clk_init_data init; + struct clk_init_data init = {}; struct berlin2_pll *pll; pll = kzalloc_obj(*pll); From patchwork Fri Aug 21 08:53:15 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3002 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mxe881.netcup.net (Postfix) with ESMTPS id 1D8821C05A3 for ; Fri, 21 Aug 2026 10:55:44 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 104.64.211.4) smtp.mailfrom=linux-sunxi+bounces-25249-noreply=patchwork.local@lists.linux.dev smtp.helo=sin.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 104.64.211.4 as permitted sender) client-ip=104.64.211.4; envelope-from=linux-sunxi+bounces-25249-noreply=patchwork.local@lists.linux.dev; helo=sin.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sin.lore.kernel.org (Postfix) with ESMTP id 6EAB9302FB1E for ; Fri, 21 Aug 2026 08:55:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 28FA03921C0; Fri, 21 Aug 2026 08:55:38 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E64F93CC7DC; Fri, 21 Aug 2026 08:55:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302538; cv=none; b=mtW8tzRTedDyYBgog2QR9K2PWaHWryCtan1d7f4H2ObP9vHhhORj/veFjew5md5I+eRLAqJ7zNHyQe9772xnvuYROO3U/1USqSdplNdrmZ3N0aa/a41gM8cvSt8/o0CEVQ2vckmbpaR1rj4QAnj1te2Y56u5IG8jGXoRLvl8hfo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302538; c=relaxed/simple; bh=wfACtApy8SnRG+HDs/DBA6DzFytGoZ6j8iXvHrz5gQI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SfbUzLaXDDvGznfbNLIbV86r0LI+shwafrs8IakOJ4yaseaZYnEDa4G+4/3D6B8zjmjNb0R8B+O/szbbY7MkWdXPHA4DFu0TZGuut8nN88ybPcS3gH/54xRg7ETvravuyn1ygYmBb4Up9ifoXGNjTnJTaUUGlntpQAx0br4Gfbg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E23181F00A3D; Fri, 21 Aug 2026 08:55:21 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 05/45] clk: cdce925: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:15 +0200 Message-ID: <308a33a0e63241d94ee08a08a6de6cffa739556e.1787239813.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 Reviewed-by: Liviu Dudau --- Compile-tested only. --- drivers/clk/clk-cdce925.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-cdce925.c b/drivers/clk/clk-cdce925.c index 30d0493c771818ff..4d49cc1659c07be2 100644 --- a/drivers/clk/clk-cdce925.c +++ b/drivers/clk/clk-cdce925.c @@ -620,7 +620,7 @@ static int cdce925_probe(struct i2c_client *client) struct device_node *node = client->dev.of_node; const char *parent_name; const char *pll_clk_name[MAX_NUMBER_OF_PLLS] = {NULL,}; - struct clk_init_data init; + struct clk_init_data init = {}; u32 value; int i; int err; From patchwork Fri Aug 21 08:53:16 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3004 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mxe881.netcup.net (Postfix) with ESMTPS id 96C391C05A3 for ; Fri, 21 Aug 2026 10:56:12 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 104.64.211.4) smtp.mailfrom=linux-sunxi+bounces-25250-noreply=patchwork.local@lists.linux.dev smtp.helo=sin.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 104.64.211.4 as permitted sender) client-ip=104.64.211.4; envelope-from=linux-sunxi+bounces-25250-noreply=patchwork.local@lists.linux.dev; helo=sin.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sin.lore.kernel.org (Postfix) with ESMTP id 938553057897 for ; Fri, 21 Aug 2026 08:55:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BFA0C433050; Fri, 21 Aug 2026 08:55:53 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C994425CC6; Fri, 21 Aug 2026 08:55:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302553; cv=none; b=fJZ/Z00ST+cKiDWQgQlznAd/+cj5af5HPU1pcljajkThmCIV8EGCUX0co00g2C3zH7oVZ5Rg6YpsWc0sZ1aLSBW9GvavAmGCOxfHNLMta3aot/m4gV05AUvmPGPIN7Q13wthZ8J5S7XSL99wqfaiMro7ByJaG4VEPPjFADjVQrE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302553; c=relaxed/simple; bh=XzmIDgOn2YE5OwhiRZTWxqQvN61zX1F1fAS8zHOFyiI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kgWlqFOkzM1dGW716OlXKB5T6NZgGchXnsQ4B2pSL1U7fbTflQafIznMtc2yHBZfbrJ8XlTwq+A5AXF5Kj9slvfoc9BFDlhWF8vhvTxrOKAUreMFdP44kikBGLcx+0N0pGK07Mwwgzm1yPSGk2gyBDDYAyaHS4zXsCgHX/xWT80= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4AC911F000E9; Fri, 21 Aug 2026 08:55:37 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 06/45] clk: clk-axi-clkgen: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:16 +0200 Message-ID: <2c6fe5e2efb86c8fec0b19cb14cfa1e3be5b6b99.1787239813.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/clk-axi-clkgen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-axi-clkgen.c b/drivers/clk/clk-axi-clkgen.c index 6fcee41447e45581..e53256c56dfabc4e 100644 --- a/drivers/clk/clk-axi-clkgen.c +++ b/drivers/clk/clk-axi-clkgen.c @@ -568,7 +568,7 @@ static int axi_clkgen_probe(struct platform_device *pdev) const struct axi_clkgen_limits *dflt_limits; struct axi_clkgen *axi_clkgen; unsigned int pcore_version; - struct clk_init_data init; + struct clk_init_data init = {}; const char *parent_names[2]; const char *clk_name; struct clk *axi_clk; From patchwork Fri Aug 21 08:53:17 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3003 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mxe881.netcup.net (Postfix) with ESMTPS id E9D931C2A1B for ; Fri, 21 Aug 2026 10:56:12 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.232.135.74) smtp.mailfrom=linux-sunxi+bounces-25251-noreply=patchwork.local@lists.linux.dev smtp.helo=sto.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.232.135.74 as permitted sender) client-ip=172.232.135.74; envelope-from=linux-sunxi+bounces-25251-noreply=patchwork.local@lists.linux.dev; helo=sto.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sto.lore.kernel.org (Postfix) with ESMTP id 806B3304B370 for ; Fri, 21 Aug 2026 08:56:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A16DC42A179; Fri, 21 Aug 2026 08:56:08 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C9ED3AEF57; Fri, 21 Aug 2026 08:56:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302568; cv=none; b=aodZJ+TmtH41z19TQdlX+ezg7af8VLka/HHp7A4/IICRS+UyudD20PklsMmAGRxTLybOfpcydoeauDqiCOM55W/hkcJ5cfCbXMtPvPZ1TYYJF7CGfnSlrg2zvoJiT0y26FGLFLHoZCUr3HkINUO4eohnFPDTJFxai6AoGlwP2Jw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302568; c=relaxed/simple; bh=a5sY6jutGFnQCsgYxiykCyRLQP7z6dasP+kwxF4c/I4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LlQT0uFjTEqkybE4JufNPc4dgFORvjubmOoQ9WDIlqQsTRibGbu9iuf/D1ziKJ4XGZ/XoLPVswXCDGZuL5B7c6nLwZ4TQVBPxPnsZEto2JNo9p4uYc8PKF00mNAvSHXtdLBRWrKAOw7vbsZUgcrkBxmyQ+2QXcUXBwQPr2D+44A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F09E1F00A3D; Fri, 21 Aug 2026 08:55:52 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 07/45] clk: cs2000-cp: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:17 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Boot-tested on Salvator-X(S) and Ebisu-4D. --- drivers/clk/clk-cs2000-cp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-cs2000-cp.c b/drivers/clk/clk-cs2000-cp.c index 5a7758f5a1e4a0f1..b28fd4e5615ff7a7 100644 --- a/drivers/clk/clk-cs2000-cp.c +++ b/drivers/clk/clk-cs2000-cp.c @@ -461,7 +461,7 @@ static int cs2000_clk_register(struct cs2000_priv *priv) { struct device *dev = priv_to_dev(priv); struct device_node *np = dev->of_node; - struct clk_init_data init; + struct clk_init_data init = {}; const char *name = np->name; static const char *parent_names[CLK_MAX]; u32 aux_out = 0; From patchwork Fri Aug 21 08:53:18 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3005 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mxe881.netcup.net (Postfix) with ESMTPS id 803F21C05A3 for ; Fri, 21 Aug 2026 10:56:25 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.232.135.74) smtp.mailfrom=linux-sunxi+bounces-25252-noreply=patchwork.local@lists.linux.dev smtp.helo=sto.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.232.135.74 as permitted sender) client-ip=172.232.135.74; envelope-from=linux-sunxi+bounces-25252-noreply=patchwork.local@lists.linux.dev; helo=sto.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sto.lore.kernel.org (Postfix) with ESMTP id ECD0F301D687 for ; Fri, 21 Aug 2026 08:56:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 050C8429008; Fri, 21 Aug 2026 08:56:24 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD42C381B04; Fri, 21 Aug 2026 08:56:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302583; cv=none; b=rXAtZkEyUSswa8QJZvByeCe1ezhNjZ3TBIth9yiq22TfrQGmyLB/AgZJMQCF/pOeXFLJTIdLk3LpjmhHaTd4bsVraCB1FvGlEbNIYdWH9V6DwAJe5iR7H58kEaiUCvIB1CTfagblGUGVsbTsc/HjAdafMvOxJekLcaLG3PxzM40= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302583; c=relaxed/simple; bh=VJmVCbLrCbLGtojVZx4RHnDDAe7NuIL6xDGc/j5UHmQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LPtTmN8VVCrHAf9iek4IYAz/jV0xrroiNsC6em8XbkpK/i/2NBdqBuQ7nzj24zQLlk/kke5AWSLQOVYYgMdSRz1UOtIPBNRhrG2p3t35PMhA45sGTCxp4JjNgqUCew0jf5Pa/OmXXblAxAn2n5W6UIUJUTOeJB60n8/Gwlqz9ZM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A27A51F000E9; Fri, 21 Aug 2026 08:56:07 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 08/45] clk: davinci: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:18 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.66 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.232.135.74:from]; SUSPICIOUS_RECIPS(1.50)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; BAD_REP_POLICIES(0.10)[]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; DMARC_NA(0.00)[glider.be]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; PRECEDENCE_BULK(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[glider.be:email,sto.lore.kernel.org:rdns,sto.lore.kernel.org:helo]; TAGGED_RCPT(0.00)[clk,renesas]; RCVD_COUNT_FIVE(0.00)[5]; FROM_NEQ_ENVFROM(0.00)[geert@glider.be,linux-sunxi@lists.linux.dev]; ASN(0.00)[asn:63949, ipnet:172.232.128.0/19, country:SG]; RCPT_COUNT_GT_50(0.00)[78]; FREEMAIL_TO(0.00)[aspeedtech.com,jms.id.au,kernel.org,redhat.com,baylibre.com,codeconstruct.com.au,microchip.com,bootlin.com,tuxon.dev,broadcom.com,socionext.com,gmail.com,google.com,arm.com,lechnology.com,nxp.com,pengutronix.de,crapouillou.net,lunn.ch,mleia.com,sntech.de,samsung.com,linaro.org,foss.st.com,elopez.com.ar,sholland.org,nvidia.com,amd.com]; R_SPF_ALLOW(0.00)[+ip4:172.232.135.74]; TO_DN_SOME(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; R_DKIM_NA(0.00)[]; TAGGED_FROM(0.00)[bounces-25252-noreply=patchwork.local,renesas]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 803F21C05A3 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 Reviewed-by: David Lechner --- Compile-tested only. --- drivers/clk/davinci/da8xx-cfgchip.c | 4 ++-- drivers/clk/davinci/pll.c | 2 +- drivers/clk/davinci/psc.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/davinci/da8xx-cfgchip.c b/drivers/clk/davinci/da8xx-cfgchip.c index a5109fe8b16e9b40..9d7fced898ae07fc 100644 --- a/drivers/clk/davinci/da8xx-cfgchip.c +++ b/drivers/clk/davinci/da8xx-cfgchip.c @@ -91,7 +91,7 @@ da8xx_cfgchip_gate_clk_register(struct device *dev, struct clk *parent; const char *parent_name; struct da8xx_cfgchip_gate_clk *gate; - struct clk_init_data init; + struct clk_init_data init = {}; int ret; parent = devm_clk_get(dev, NULL); @@ -241,7 +241,7 @@ da8xx_cfgchip_mux_clk_register(struct device *dev, { const char * const parent_names[] = { info->parent0, info->parent1 }; struct da8xx_cfgchip_mux_clk *mux; - struct clk_init_data init; + struct clk_init_data init = {}; int ret; mux = devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL); diff --git a/drivers/clk/davinci/pll.c b/drivers/clk/davinci/pll.c index f73b0ac5d8a08bf1..0e58b02d7acaf175 100644 --- a/drivers/clk/davinci/pll.c +++ b/drivers/clk/davinci/pll.c @@ -371,7 +371,7 @@ struct clk *davinci_pll_clk_register(struct device *dev, char pllout_name[MAX_NAME_SIZE]; char postdiv_name[MAX_NAME_SIZE]; char pllen_name[MAX_NAME_SIZE]; - struct clk_init_data init; + struct clk_init_data init = {}; struct davinci_pll_clk *pllout; struct davinci_pllen_clk *pllen; struct clk *oscin_clk = NULL; diff --git a/drivers/clk/davinci/psc.c b/drivers/clk/davinci/psc.c index ff603520d56f94d6..73dce7ce2be6cc88 100644 --- a/drivers/clk/davinci/psc.c +++ b/drivers/clk/davinci/psc.c @@ -234,7 +234,7 @@ davinci_lpsc_clk_register(struct device *dev, const char *name, const char *parent_name, struct regmap *regmap, u32 md, u32 pd, u32 flags) { - struct clk_init_data init; + struct clk_init_data init = {}; struct davinci_lpsc_clk *lpsc; int ret; bool is_on; From patchwork Fri Aug 21 08:53:19 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3007 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mxe881.netcup.net (Postfix) with ESMTPS id CCB9A1C0130 for ; Fri, 21 Aug 2026 10:58:36 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.105.105.114) smtp.mailfrom=linux-sunxi+bounces-25253-noreply=patchwork.local@lists.linux.dev smtp.helo=tor.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.105.105.114 as permitted sender) client-ip=172.105.105.114; envelope-from=linux-sunxi+bounces-25253-noreply=patchwork.local@lists.linux.dev; helo=tor.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by tor.lore.kernel.org (Postfix) with ESMTP id 43E2C305ADD5 for ; Fri, 21 Aug 2026 08:56:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 61567437130; Fri, 21 Aug 2026 08:56:39 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2632441A79C; Fri, 21 Aug 2026 08:56:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302599; cv=none; b=hntl2d7D4Neuj3cj8dbsOt1SU98TUkJOM6uVp6MrVrrbiRTZXlI/Ar4QUW4uNjgvHoIdEzdC8o9XFb8oL9Iiujf8VDHYTXiR0dC0A8Y46qp31PukQbXLu3zeqqS1sCOZOeOKEnsXJuMyTURyPCPOdTev5wRGDnQRaM/UvcrtGqU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302599; c=relaxed/simple; bh=2csDdVgbkcL7guxCVq9zbWFLDrCoHYwPmFFdCCL2bmo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mnILo73aHxsNFPzNCN5g3wRwjyyAxHo7AO2bO5GEiukTR629F4subHoLEmgia7YsMG1FQw6v7zIR7cB/D935W5yuMoShYSJqzO2rEOH3S6AknSGk5MALdcGZ6gTXI8rDy//132bwE6u0EQahAPHIEmYSuKDBECpYXD6egTSHHhM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C82CD1F00A3A; Fri, 21 Aug 2026 08:56:22 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 09/45] clk: fractional-divider: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:19 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/clk-fractional-divider.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-fractional-divider.c b/drivers/clk/clk-fractional-divider.c index 1c5fdcb68a5048e3..c8e00d75cd14d8f1 100644 --- a/drivers/clk/clk-fractional-divider.c +++ b/drivers/clk/clk-fractional-divider.c @@ -271,7 +271,7 @@ struct clk_hw *clk_hw_register_fractional_divider(struct device *dev, u8 clk_divider_flags, spinlock_t *lock) { struct clk_fractional_divider *fd; - struct clk_init_data init; + struct clk_init_data init = {}; struct clk_hw *hw; int ret; From patchwork Fri Aug 21 08:53:20 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3008 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mxe881.netcup.net (Postfix) with ESMTPS id E89141C0130 for ; Fri, 21 Aug 2026 10:59:08 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.105.105.114) smtp.mailfrom=linux-sunxi+bounces-25254-noreply=patchwork.local@lists.linux.dev smtp.helo=tor.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.105.105.114 as permitted sender) client-ip=172.105.105.114; envelope-from=linux-sunxi+bounces-25254-noreply=patchwork.local@lists.linux.dev; helo=tor.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by tor.lore.kernel.org (Postfix) with ESMTP id 16D91312D871 for ; Fri, 21 Aug 2026 08:56:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 47315430CF8; Fri, 21 Aug 2026 08:56:54 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BF4739890A; Fri, 21 Aug 2026 08:56:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302614; cv=none; b=Wa0LXu+M13ZJCDOEM84uc5qeyItwUr4N713tLIGXQiJQ45YRhpeS2jxR7Xb7IH2mYcIT6GefCibqLZRRoecuph4W02OV0Md2CpE28aiVkKaXplWtK1w6eMQTE1iSvR6z4wKx9x2DWXmdVJl50oipg+hZiDBE8yqd4fbQ+sfeLhs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302614; c=relaxed/simple; bh=W1aUgOy2ijtVKWH2JYcirEC/1LUykLGh8rjF7Q3s/fQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=n4rWVYuBGCCtdtlZ3PdtcXllymejarZXoX3OxL/6hC3f2C6aqZqTNVs3cdDWG0S1bvDizoWltV8OHimIBVAhbjqc33AMtEz3ImclSndGY8022AXOHyp7oo7KGXeQeiMClwI4Oo4NxFPxdQY9oHp5Hq2TDLmNNwRl35bG7jxBv4U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47C2C1F000E9; Fri, 21 Aug 2026 08:56:38 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 10/45] clk: gemini: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:20 +0200 Message-ID: <33f8a87834a75b6677894f1993c90f00eb6a2547.1787239813.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/clk-gemini.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-gemini.c b/drivers/clk/clk-gemini.c index 9c0e6e7a7cacdf59..4e874392e3b0b57e 100644 --- a/drivers/clk/clk-gemini.c +++ b/drivers/clk/clk-gemini.c @@ -193,8 +193,8 @@ static struct clk_hw *gemini_pci_clk_setup(const char *name, const char *parent_name, struct regmap *map) { + struct clk_init_data init = {}; struct clk_gemini_pci *pciclk; - struct clk_init_data init; int ret; pciclk = kzalloc_obj(*pciclk); From patchwork Fri Aug 21 08:53:21 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3006 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mxe881.netcup.net (Postfix) with ESMTPS id 5449C1C0130 for ; Fri, 21 Aug 2026 10:57:16 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.232.135.74) smtp.mailfrom=linux-sunxi+bounces-25255-noreply=patchwork.local@lists.linux.dev smtp.helo=sto.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.232.135.74 as permitted sender) client-ip=172.232.135.74; envelope-from=linux-sunxi+bounces-25255-noreply=patchwork.local@lists.linux.dev; helo=sto.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sto.lore.kernel.org (Postfix) with ESMTP id 37CE830545A0 for ; Fri, 21 Aug 2026 08:57:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2FD4C43E06B; Fri, 21 Aug 2026 08:57:11 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E6A33921C0; Fri, 21 Aug 2026 08:57:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302631; cv=none; b=YFko1VcjfhrdSGcnsLbfzhOyIyXmLX8XzPawMsD8zYgU6T6kaZxiyXxe7MEvCz+mvTNgcOYZuXoLzLC10QAVPUgw3f7uX85nFZVKXwolCnS9/a0BvzW60N6naBK2OMHhXOQAKLz5fw+ZiWEBxnoXmkrXvWYLpDap3hlcZt1xzLQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302631; c=relaxed/simple; bh=4kCl2QXuVCHznxzU+MNIFwLc0WT09uejnkreOAEfhig=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TvewPEJojsX7IrW47tMkuwjQm4q1IwDlLXiskWADDWR6gJuSx0VsEFE7tzGOpWEcWD5hRrqqarkwZ/p444ezJZZm6XFgqAnvmxftaZEmI6zMNLM3xRL4F04tkunV8Z4sFrf7FtLfrGyjuH6Ft0QnBJWUIuBtBA/6ykdIGh1Th8U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 706AD1F00A3A; Fri, 21 Aug 2026 08:56:53 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 11/45] clk: highbank: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:21 +0200 Message-ID: <21a8ecd80d87eb4fbea3a098957ccf8450299efd.1787239813.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.66 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.232.135.74:from]; SUSPICIOUS_RECIPS(1.50)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; DMARC_NA(0.00)[glider.be]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; FROM_HAS_DN(0.00)[]; PRECEDENCE_BULK(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[sto.lore.kernel.org:rdns,sto.lore.kernel.org:helo,glider.be:email]; TAGGED_RCPT(0.00)[clk,renesas]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; FROM_NEQ_ENVFROM(0.00)[geert@glider.be,linux-sunxi@lists.linux.dev]; RCPT_COUNT_GT_50(0.00)[78]; FREEMAIL_TO(0.00)[aspeedtech.com,jms.id.au,kernel.org,redhat.com,baylibre.com,codeconstruct.com.au,microchip.com,bootlin.com,tuxon.dev,broadcom.com,socionext.com,gmail.com,google.com,arm.com,lechnology.com,nxp.com,pengutronix.de,crapouillou.net,lunn.ch,mleia.com,sntech.de,samsung.com,linaro.org,foss.st.com,elopez.com.ar,sholland.org,nvidia.com,amd.com]; R_SPF_ALLOW(0.00)[+ip4:172.232.135.74:c]; TO_DN_SOME(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:63949, ipnet:172.232.128.0/19, country:SG]; RCVD_TLS_LAST(0.00)[]; TAGGED_FROM(0.00)[bounces-25255-noreply=patchwork.local,renesas]; R_DKIM_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 5449C1C0130 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/clk-highbank.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-highbank.c b/drivers/clk/clk-highbank.c index e9b177811dfc2ced..61c23199763508ea 100644 --- a/drivers/clk/clk-highbank.c +++ b/drivers/clk/clk-highbank.c @@ -269,7 +269,7 @@ static void __init hb_clk_init(struct device_node *node, const struct clk_ops *o struct hb_clk *hb_clk; const char *clk_name = node->name; const char *parent_name; - struct clk_init_data init; + struct clk_init_data init = {}; struct device_node *srnp; int rc; From patchwork Fri Aug 21 08:53:22 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3010 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mxe881.netcup.net (Postfix) with ESMTPS id 221051C05A3 for ; Fri, 21 Aug 2026 11:00:36 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.105.105.114) smtp.mailfrom=linux-sunxi+bounces-25256-noreply=patchwork.local@lists.linux.dev smtp.helo=tor.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.105.105.114 as permitted sender) client-ip=172.105.105.114; envelope-from=linux-sunxi+bounces-25256-noreply=patchwork.local@lists.linux.dev; helo=tor.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by tor.lore.kernel.org (Postfix) with ESMTP id 7F50130BB01F for ; Fri, 21 Aug 2026 08:57:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9DE34441027; Fri, 21 Aug 2026 08:57:28 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 43C7D3AE6F5; Fri, 21 Aug 2026 08:57:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302648; cv=none; b=NXTDrBa/ghIBsr2qpZWbNnvVuIIWfwMnAo+hltPbXlPx5c/06hZ7ms50WmiPZH1Sg+G0ztj2nyaQP39EPYAt53FR26VzV1zymVvQP71Nc6sHKVbmYkWjSBd73Uj1j1tEqUROSTiRBX4PTWxZwLeleb3Erq8OreenvU61OK0vDmU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302648; c=relaxed/simple; bh=14qbOKX2POfHRCCKv8XV9G5vx+HLhR+Dx8EA2U7a0HE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UFqtP+4anLuJyH4QhkKi5L34rrVaUUkQp3y6gJ77vVPcmSwdyxIQyOfHbFEGFYhLNFOzaGp5R98WEwfSjy3WIcGdtmGlj1vOitvPq+sv2Qu18tHwHcEAHVD79DifqNraPekLRWtb63eJ/KgqQaUxnzjESV1sQmkfZ7+SeRZYA5M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E6C41F000E9; Fri, 21 Aug 2026 08:57:08 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 12/45] clk: hisilicon: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:22 +0200 Message-ID: <04ef5b163e1ae63ffd6b568d3544c482b43f347f.1787239813.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [3.84 / 15.00]; RBL_SENDERSCORE(2.00)[172.105.105.114:from]; SUSPICIOUS_RECIPS(1.50)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; PRECEDENCE_BULK(0.00)[]; DMARC_NA(0.00)[glider.be]; RCVD_COUNT_FIVE(0.00)[5]; TAGGED_RCPT(0.00)[clk,renesas]; DBL_BLOCKED_OPENRESOLVER(0.00)[glider.be:email,tor.lore.kernel.org:rdns,tor.lore.kernel.org:helo]; FROM_NEQ_ENVFROM(0.00)[geert@glider.be,linux-sunxi@lists.linux.dev]; ASN(0.00)[asn:63949, ipnet:172.105.96.0/20, country:SG]; TAGGED_FROM(0.00)[bounces-25256-noreply=patchwork.local,renesas]; RCPT_COUNT_GT_50(0.00)[78]; FREEMAIL_TO(0.00)[aspeedtech.com,jms.id.au,kernel.org,redhat.com,baylibre.com,codeconstruct.com.au,microchip.com,bootlin.com,tuxon.dev,broadcom.com,socionext.com,gmail.com,google.com,arm.com,lechnology.com,nxp.com,pengutronix.de,crapouillou.net,lunn.ch,mleia.com,sntech.de,samsung.com,linaro.org,foss.st.com,elopez.com.ar,sholland.org,nvidia.com,amd.com]; R_SPF_ALLOW(0.00)[+ip4:172.105.105.114]; TO_DN_SOME(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 221051C05A3 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/hisilicon/clk-hi3559a.c | 2 +- drivers/clk/hisilicon/clk-hi3620.c | 2 +- drivers/clk/hisilicon/clk-hi6220-stub.c | 2 +- drivers/clk/hisilicon/clk-hisi-phase.c | 2 +- drivers/clk/hisilicon/clk-hix5hd2.c | 2 +- drivers/clk/hisilicon/clkdivider-hi6220.c | 2 +- drivers/clk/hisilicon/clkgate-separated.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/clk/hisilicon/clk-hi3559a.c b/drivers/clk/hisilicon/clk-hi3559a.c index f297fb25c512a322..fea6fb9e98f59a86 100644 --- a/drivers/clk/hisilicon/clk-hi3559a.c +++ b/drivers/clk/hisilicon/clk-hi3559a.c @@ -456,8 +456,8 @@ static void hisi_clk_register_pll(struct hi3559av100_pll_clock *clks, { void __iomem *base = data->base; struct hi3559av100_clk_pll *p_clk = NULL; + struct clk_init_data init = {}; struct clk *clk = NULL; - struct clk_init_data init; int i; p_clk = devm_kcalloc(dev, nums, sizeof(*p_clk), GFP_KERNEL); diff --git a/drivers/clk/hisilicon/clk-hi3620.c b/drivers/clk/hisilicon/clk-hi3620.c index 8dcad74e679aa462..a2c4637eaa9880d5 100644 --- a/drivers/clk/hisilicon/clk-hi3620.c +++ b/drivers/clk/hisilicon/clk-hi3620.c @@ -410,9 +410,9 @@ static const struct clk_ops clk_mmc_ops = { static struct clk *hisi_register_clk_mmc(struct hisi_mmc_clock *mmc_clk, void __iomem *base, struct device_node *np) { + struct clk_init_data init = {}; struct clk_mmc *mclk; struct clk *clk; - struct clk_init_data init; mclk = kzalloc_obj(*mclk); if (!mclk) diff --git a/drivers/clk/hisilicon/clk-hi6220-stub.c b/drivers/clk/hisilicon/clk-hi6220-stub.c index bf99cfafafa0133d..a70544d2bdb9a805 100644 --- a/drivers/clk/hisilicon/clk-hi6220-stub.c +++ b/drivers/clk/hisilicon/clk-hi6220-stub.c @@ -195,7 +195,7 @@ static const struct clk_ops hi6220_stub_clk_ops = { static int hi6220_stub_clk_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct clk_init_data init; + struct clk_init_data init = {}; struct hi6220_stub_clk *stub_clk; struct clk *clk; struct device_node *np = pdev->dev.of_node; diff --git a/drivers/clk/hisilicon/clk-hisi-phase.c b/drivers/clk/hisilicon/clk-hisi-phase.c index ba6afad66a2b0c25..d8e555d9728de9ad 100644 --- a/drivers/clk/hisilicon/clk-hisi-phase.c +++ b/drivers/clk/hisilicon/clk-hisi-phase.c @@ -94,8 +94,8 @@ struct clk *clk_register_hisi_phase(struct device *dev, const struct hisi_phase_clock *clks, void __iomem *base, spinlock_t *lock) { + struct clk_init_data init = {}; struct clk_hisi_phase *phase; - struct clk_init_data init; phase = devm_kzalloc(dev, sizeof(struct clk_hisi_phase), GFP_KERNEL); if (!phase) diff --git a/drivers/clk/hisilicon/clk-hix5hd2.c b/drivers/clk/hisilicon/clk-hix5hd2.c index 57db6fab43aacd41..4b7ebebfac4be608 100644 --- a/drivers/clk/hisilicon/clk-hix5hd2.c +++ b/drivers/clk/hisilicon/clk-hix5hd2.c @@ -258,8 +258,8 @@ hix5hd2_clk_register_complex(struct hix5hd2_complex_clock *clks, int nums, for (i = 0; i < nums; i++) { struct hix5hd2_clk_complex *p_clk; + struct clk_init_data init = {}; struct clk *clk; - struct clk_init_data init; p_clk = kzalloc_obj(*p_clk); if (!p_clk) diff --git a/drivers/clk/hisilicon/clkdivider-hi6220.c b/drivers/clk/hisilicon/clkdivider-hi6220.c index 20a337383a1e1fea..cc53d0a33e3c4e92 100644 --- a/drivers/clk/hisilicon/clkdivider-hi6220.c +++ b/drivers/clk/hisilicon/clkdivider-hi6220.c @@ -103,7 +103,7 @@ struct clk *hi6220_register_clkdiv(struct device *dev, const char *name, { struct hi6220_clk_divider *div; struct clk *clk; - struct clk_init_data init; + struct clk_init_data init = {}; struct clk_div_table *table; u32 max_div, min_div; int i; diff --git a/drivers/clk/hisilicon/clkgate-separated.c b/drivers/clk/hisilicon/clkgate-separated.c index 199303157ebd84da..e02d6bb5ada79a3c 100644 --- a/drivers/clk/hisilicon/clkgate-separated.c +++ b/drivers/clk/hisilicon/clkgate-separated.c @@ -87,8 +87,8 @@ struct clk *hisi_register_clkgate_sep(struct device *dev, const char *name, u8 clk_gate_flags, spinlock_t *lock) { struct clkgate_separated *sclk; + struct clk_init_data init = {}; struct clk *clk; - struct clk_init_data init; sclk = kzalloc_obj(*sclk); if (!sclk) From patchwork Fri Aug 21 08:53:23 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3012 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 266831C05B2 for ; Fri, 21 Aug 2026 11:03:55 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25257-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25257-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id A288531A5419 for ; Fri, 21 Aug 2026 08:57:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 82FAB44213B; Fri, 21 Aug 2026 08:57:46 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 99BDF44212E; Fri, 21 Aug 2026 08:57:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302664; cv=none; b=RJd0wZdioSGuyTTAxITtot+v0NbmIirtG0JtfGO0DUDqrq8bH2CmE4nb779whxIENlomYSxyKo3fqvmAw3aoUXVxQLQfenm06ddbsdWWzz7K/xlcxHX9Pc7COoJCB2/XauUUZBZZJkVLFY1UGizjMPKxoPowmd0xKXgmk5Zv9/E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302664; c=relaxed/simple; bh=MIUkGPGlOb4phfOZBTDAJ4/bs8pBc6qyq24ZSH+Vd5Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gmtIf20cFRE02oTijOlqoWzulJt4pGd+9tAD47YweQTptByDnCjdwO0xg5TGi4AsraVn3/W39UeDcsIlXT4cZ4mdig7DyUDBIPG0uYPwCy617uHQjyOqugYV1QntQ4THqM7GdOkTKvVT4mQOaHvbxzygdgvJ03KkgoXRdA8AHvc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C13A71F00A3A; Fri, 21 Aug 2026 08:57:23 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 13/45] clk: imx: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:23 +0200 Message-ID: <7300fde72b6449d2cd7c043e4caec9a6c4171424.1787239813.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.66 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; BAD_REP_POLICIES(0.10)[]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; DMARC_NA(0.00)[glider.be]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; PRECEDENCE_BULK(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[sea.lore.kernel.org:rdns,sea.lore.kernel.org:helo,glider.be:email]; TAGGED_RCPT(0.00)[clk,renesas]; RCVD_COUNT_FIVE(0.00)[5]; FROM_NEQ_ENVFROM(0.00)[geert@glider.be,linux-sunxi@lists.linux.dev]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; RCPT_COUNT_GT_50(0.00)[78]; FREEMAIL_TO(0.00)[aspeedtech.com,jms.id.au,kernel.org,redhat.com,baylibre.com,codeconstruct.com.au,microchip.com,bootlin.com,tuxon.dev,broadcom.com,socionext.com,gmail.com,google.com,arm.com,lechnology.com,nxp.com,pengutronix.de,crapouillou.net,lunn.ch,mleia.com,sntech.de,samsung.com,linaro.org,foss.st.com,elopez.com.ar,sholland.org,nvidia.com,amd.com]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; TO_DN_SOME(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; R_DKIM_NA(0.00)[]; TAGGED_FROM(0.00)[bounces-25257-noreply=patchwork.local,renesas]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 266831C05B2 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 Acked-by: Abel Vesa --- Compile-tested only. --- drivers/clk/imx/clk-busy.c | 4 ++-- drivers/clk/imx/clk-cpu.c | 2 +- drivers/clk/imx/clk-divider-gate.c | 2 +- drivers/clk/imx/clk-fixup-div.c | 2 +- drivers/clk/imx/clk-fixup-mux.c | 2 +- drivers/clk/imx/clk-frac-pll.c | 2 +- drivers/clk/imx/clk-fracn-gppll.c | 2 +- drivers/clk/imx/clk-gate-93.c | 2 +- drivers/clk/imx/clk-gate-exclusive.c | 2 +- drivers/clk/imx/clk-gate2.c | 2 +- drivers/clk/imx/clk-lpcg-scu.c | 2 +- drivers/clk/imx/clk-pfd.c | 2 +- drivers/clk/imx/clk-pfdv2.c | 2 +- drivers/clk/imx/clk-pll14xx.c | 2 +- drivers/clk/imx/clk-pllv1.c | 2 +- drivers/clk/imx/clk-pllv2.c | 2 +- drivers/clk/imx/clk-pllv3.c | 2 +- drivers/clk/imx/clk-pllv4.c | 2 +- drivers/clk/imx/clk-scu.c | 4 ++-- drivers/clk/imx/clk-sscg-pll.c | 2 +- 20 files changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/clk/imx/clk-busy.c b/drivers/clk/imx/clk-busy.c index b8b6e7c7e1fe35c5..75a2bf29e42fc6d8 100644 --- a/drivers/clk/imx/clk-busy.c +++ b/drivers/clk/imx/clk-busy.c @@ -78,8 +78,8 @@ struct clk_hw *imx_clk_hw_busy_divider(const char *name, const char *parent_name void __iomem *busy_reg, u8 busy_shift) { struct clk_busy_divider *busy; + struct clk_init_data init = {}; struct clk_hw *hw; - struct clk_init_data init; int ret; busy = kzalloc_obj(*busy); @@ -157,9 +157,9 @@ struct clk_hw *imx_clk_hw_busy_mux(const char *name, void __iomem *reg, u8 shift u8 width, void __iomem *busy_reg, u8 busy_shift, const char * const *parent_names, int num_parents) { + struct clk_init_data init = {}; struct clk_busy_mux *busy; struct clk_hw *hw; - struct clk_init_data init; int ret; busy = kzalloc_obj(*busy); diff --git a/drivers/clk/imx/clk-cpu.c b/drivers/clk/imx/clk-cpu.c index f53dbaacddcc9f85..b4d9722eb17e63ec 100644 --- a/drivers/clk/imx/clk-cpu.c +++ b/drivers/clk/imx/clk-cpu.c @@ -76,9 +76,9 @@ struct clk_hw *imx_clk_hw_cpu(const char *name, const char *parent_name, struct clk *div, struct clk *mux, struct clk *pll, struct clk *step) { + struct clk_init_data init = {}; struct clk_cpu *cpu; struct clk_hw *hw; - struct clk_init_data init; int ret; cpu = kzalloc_obj(*cpu); diff --git a/drivers/clk/imx/clk-divider-gate.c b/drivers/clk/imx/clk-divider-gate.c index 957d132c4607dc5f..a1b7c109069c3bb3 100644 --- a/drivers/clk/imx/clk-divider-gate.c +++ b/drivers/clk/imx/clk-divider-gate.c @@ -179,8 +179,8 @@ struct clk_hw *imx_clk_hw_divider_gate(const char *name, const char *parent_name const struct clk_div_table *table, spinlock_t *lock) { - struct clk_init_data init; struct clk_divider_gate *div_gate; + struct clk_init_data init = {}; struct clk_hw *hw; u32 val; int ret; diff --git a/drivers/clk/imx/clk-fixup-div.c b/drivers/clk/imx/clk-fixup-div.c index 3866319af54ef8b6..a6f68317cd2e523c 100644 --- a/drivers/clk/imx/clk-fixup-div.c +++ b/drivers/clk/imx/clk-fixup-div.c @@ -90,8 +90,8 @@ struct clk_hw *imx_clk_hw_fixup_divider(const char *name, const char *parent, void (*fixup)(u32 *val)) { struct clk_fixup_div *fixup_div; + struct clk_init_data init = {}; struct clk_hw *hw; - struct clk_init_data init; int ret; if (!fixup) diff --git a/drivers/clk/imx/clk-fixup-mux.c b/drivers/clk/imx/clk-fixup-mux.c index 7188cdad79d3c82d..f43648f7fb45a92e 100644 --- a/drivers/clk/imx/clk-fixup-mux.c +++ b/drivers/clk/imx/clk-fixup-mux.c @@ -70,8 +70,8 @@ struct clk_hw *imx_clk_hw_fixup_mux(const char *name, void __iomem *reg, int num_parents, void (*fixup)(u32 *val)) { struct clk_fixup_mux *fixup_mux; + struct clk_init_data init = {}; struct clk_hw *hw; - struct clk_init_data init; int ret; if (!fixup) diff --git a/drivers/clk/imx/clk-frac-pll.c b/drivers/clk/imx/clk-frac-pll.c index cd4e26bac19c48bc..d6c59634c0c02813 100644 --- a/drivers/clk/imx/clk-frac-pll.c +++ b/drivers/clk/imx/clk-frac-pll.c @@ -208,7 +208,7 @@ struct clk_hw *imx_clk_hw_frac_pll(const char *name, const char *parent_name, void __iomem *base) { - struct clk_init_data init; + struct clk_init_data init = {}; struct clk_frac_pll *pll; struct clk_hw *hw; int ret; diff --git a/drivers/clk/imx/clk-fracn-gppll.c b/drivers/clk/imx/clk-fracn-gppll.c index 4048c16c0578b8f5..32bb3e9a8d6ec2b0 100644 --- a/drivers/clk/imx/clk-fracn-gppll.c +++ b/drivers/clk/imx/clk-fracn-gppll.c @@ -363,9 +363,9 @@ static struct clk_hw *_imx_clk_fracn_gppll(const char *name, const char *parent_ const struct imx_fracn_gppll_clk *pll_clk, u32 pll_flags) { + struct clk_init_data init = {}; struct clk_fracn_gppll *pll; struct clk_hw *hw; - struct clk_init_data init; int ret; pll = kzalloc_obj(*pll); diff --git a/drivers/clk/imx/clk-gate-93.c b/drivers/clk/imx/clk-gate-93.c index 7acbcfec9610b359..7208138d615dfbd8 100644 --- a/drivers/clk/imx/clk-gate-93.c +++ b/drivers/clk/imx/clk-gate-93.c @@ -158,9 +158,9 @@ struct clk_hw *imx93_clk_gate(struct device *dev, const char *name, const char * unsigned long flags, void __iomem *reg, u32 bit_idx, u32 val, u32 mask, u32 domain_id, unsigned int *share_count) { + struct clk_init_data init = {}; struct imx93_clk_gate *gate; struct clk_hw *hw; - struct clk_init_data init; int ret; u32 authen; diff --git a/drivers/clk/imx/clk-gate-exclusive.c b/drivers/clk/imx/clk-gate-exclusive.c index 504cfeef28a08b78..cf873e490362a239 100644 --- a/drivers/clk/imx/clk-gate-exclusive.c +++ b/drivers/clk/imx/clk-gate-exclusive.c @@ -59,9 +59,9 @@ struct clk_hw *imx_clk_hw_gate_exclusive(const char *name, const char *parent, void __iomem *reg, u8 shift, u32 exclusive_mask) { struct clk_gate_exclusive *exgate; + struct clk_init_data init = {}; struct clk_gate *gate; struct clk_hw *hw; - struct clk_init_data init; int ret; if (exclusive_mask == 0) diff --git a/drivers/clk/imx/clk-gate2.c b/drivers/clk/imx/clk-gate2.c index f07cf82dd9c9a27d..c8b6323571eec93d 100644 --- a/drivers/clk/imx/clk-gate2.c +++ b/drivers/clk/imx/clk-gate2.c @@ -139,9 +139,9 @@ struct clk_hw *clk_hw_register_gate2(struct device *dev, const char *name, u8 clk_gate2_flags, spinlock_t *lock, unsigned int *share_count) { + struct clk_init_data init = {}; struct clk_gate2 *gate; struct clk_hw *hw; - struct clk_init_data init; int ret; gate = kzalloc_obj(struct clk_gate2); diff --git a/drivers/clk/imx/clk-lpcg-scu.c b/drivers/clk/imx/clk-lpcg-scu.c index 03bbfbe9bff3d38d..da110a823fd5bafa 100644 --- a/drivers/clk/imx/clk-lpcg-scu.c +++ b/drivers/clk/imx/clk-lpcg-scu.c @@ -114,8 +114,8 @@ struct clk_hw *__imx_clk_lpcg_scu(struct device *dev, const char *name, const char *parent_name, unsigned long flags, void __iomem *reg, u8 bit_idx, bool hw_gate) { + struct clk_init_data init = {}; struct clk_lpcg_scu *clk; - struct clk_init_data init; struct clk_hw *hw; int ret; diff --git a/drivers/clk/imx/clk-pfd.c b/drivers/clk/imx/clk-pfd.c index e7a5d80c50083b39..e56bb27e57cc9242 100644 --- a/drivers/clk/imx/clk-pfd.c +++ b/drivers/clk/imx/clk-pfd.c @@ -127,9 +127,9 @@ static const struct clk_ops clk_pfd_ops = { struct clk_hw *imx_clk_hw_pfd(const char *name, const char *parent_name, void __iomem *reg, u8 idx) { + struct clk_init_data init = {}; struct clk_pfd *pfd; struct clk_hw *hw; - struct clk_init_data init; int ret; pfd = kzalloc_obj(*pfd); diff --git a/drivers/clk/imx/clk-pfdv2.c b/drivers/clk/imx/clk-pfdv2.c index 0f92b92e2229fd97..43ba79e47eac564a 100644 --- a/drivers/clk/imx/clk-pfdv2.c +++ b/drivers/clk/imx/clk-pfdv2.c @@ -203,7 +203,7 @@ static const struct clk_ops clk_pfdv2_ops = { struct clk_hw *imx_clk_hw_pfdv2(enum imx_pfdv2_type type, const char *name, const char *parent_name, void __iomem *reg, u8 idx) { - struct clk_init_data init; + struct clk_init_data init = {}; struct clk_pfdv2 *pfd; struct clk_hw *hw; int ret; diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c index b6f1cc9f570059b7..2f9e36f9e2409ac3 100644 --- a/drivers/clk/imx/clk-pll14xx.c +++ b/drivers/clk/imx/clk-pll14xx.c @@ -515,9 +515,9 @@ struct clk_hw *imx_dev_clk_hw_pll14xx(struct device *dev, const char *name, const char *parent_name, void __iomem *base, const struct imx_pll14xx_clk *pll_clk) { + struct clk_init_data init = {}; struct clk_pll14xx *pll; struct clk_hw *hw; - struct clk_init_data init; int ret; u32 val; diff --git a/drivers/clk/imx/clk-pllv1.c b/drivers/clk/imx/clk-pllv1.c index da5531e57da2a782..ee60c7660ef49041 100644 --- a/drivers/clk/imx/clk-pllv1.c +++ b/drivers/clk/imx/clk-pllv1.c @@ -114,9 +114,9 @@ static const struct clk_ops clk_pllv1_ops = { struct clk_hw *imx_clk_hw_pllv1(enum imx_pllv1_type type, const char *name, const char *parent, void __iomem *base) { + struct clk_init_data init = {}; struct clk_pllv1 *pll; struct clk_hw *hw; - struct clk_init_data init; int ret; pll = kmalloc_obj(*pll); diff --git a/drivers/clk/imx/clk-pllv2.c b/drivers/clk/imx/clk-pllv2.c index 43396388030e30e5..aacc3d84e797c2e8 100644 --- a/drivers/clk/imx/clk-pllv2.c +++ b/drivers/clk/imx/clk-pllv2.c @@ -249,9 +249,9 @@ static const struct clk_ops clk_pllv2_ops = { struct clk_hw *imx_clk_hw_pllv2(const char *name, const char *parent, void __iomem *base) { + struct clk_init_data init = {}; struct clk_pllv2 *pll; struct clk_hw *hw; - struct clk_init_data init; int ret; pll = kzalloc_obj(*pll); diff --git a/drivers/clk/imx/clk-pllv3.c b/drivers/clk/imx/clk-pllv3.c index a0ad6f4aae8fa5cc..714d9c723e167d3b 100644 --- a/drivers/clk/imx/clk-pllv3.c +++ b/drivers/clk/imx/clk-pllv3.c @@ -422,8 +422,8 @@ struct clk_hw *imx_clk_hw_pllv3(enum imx_pllv3_type type, const char *name, { struct clk_pllv3 *pll; const struct clk_ops *ops; + struct clk_init_data init = {}; struct clk_hw *hw; - struct clk_init_data init; int ret; pll = kzalloc_obj(*pll); diff --git a/drivers/clk/imx/clk-pllv4.c b/drivers/clk/imx/clk-pllv4.c index 8fa2f7111ce9b220..6dc9640d2f19b893 100644 --- a/drivers/clk/imx/clk-pllv4.c +++ b/drivers/clk/imx/clk-pllv4.c @@ -246,9 +246,9 @@ static const struct clk_ops clk_pllv4_ops = { struct clk_hw *imx_clk_hw_pllv4(enum imx_pllv4_type type, const char *name, const char *parent_name, void __iomem *base) { + struct clk_init_data init = {}; struct clk_pllv4 *pll; struct clk_hw *hw; - struct clk_init_data init; int ret; pll = kzalloc_obj(*pll); diff --git a/drivers/clk/imx/clk-scu.c b/drivers/clk/imx/clk-scu.c index 44220e9c5c2a2331..0d034e206c6bc806 100644 --- a/drivers/clk/imx/clk-scu.c +++ b/drivers/clk/imx/clk-scu.c @@ -445,7 +445,7 @@ struct clk_hw *__imx_clk_scu(struct device *dev, const char *name, const char * const *parents, int num_parents, u32 rsrc_id, u8 clk_type) { - struct clk_init_data init; + struct clk_init_data init = {}; struct clk_scu *clk; struct clk_hw *hw; int ret; @@ -839,9 +839,9 @@ struct clk_hw *__imx_clk_gpr_scu(const char *name, const char * const *parent_na bool invert) { struct imx_scu_clk_node *clk_node; + struct clk_init_data init = {}; struct clk_gpr_scu *clk; struct clk_hw *hw; - struct clk_init_data init; int ret; if (rsrc_id >= IMX_SC_R_LAST || gpr_id >= IMX_SC_C_LAST) diff --git a/drivers/clk/imx/clk-sscg-pll.c b/drivers/clk/imx/clk-sscg-pll.c index 7f104ecfa80fee49..f6286ec11e0c07d9 100644 --- a/drivers/clk/imx/clk-sscg-pll.c +++ b/drivers/clk/imx/clk-sscg-pll.c @@ -504,8 +504,8 @@ struct clk_hw *imx_clk_hw_sscg_pll(const char *name, void __iomem *base, unsigned long flags) { + struct clk_init_data init = {}; struct clk_sscg_pll *pll; - struct clk_init_data init; struct clk_hw *hw; int ret; From patchwork Fri Aug 21 08:53:24 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3014 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 7FA401C0130 for ; Fri, 21 Aug 2026 11:05:19 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25258-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25258-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id D683E31EE0B3 for ; Fri, 21 Aug 2026 08:57:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0AAFC443AAB; Fri, 21 Aug 2026 08:57:58 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4CC723546F9; Fri, 21 Aug 2026 08:57:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302677; cv=none; b=QLCsQPv+mgXqxuyb4VnH24hxUdJkfMFiOUu3appNBDLIXCK2JDxBnZs8YVz57vTysm/MC8mrN2yGzsTcnD/5eoy1C0o4xAgVI+DxyNetIOc6HJjOEtm0aJrmdtPzdPl1E4m1XOM355Y7stVPc5sJdA035e612Z2yVnZfC68Xa44= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302677; c=relaxed/simple; bh=hz+QonUpA2QFaXbcBpJu1m5xqlS9BFG0jMXkHbxswyY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=atxbsdZEut86fg0LCOfHv2w4FCPrMx2nYgRy4pwQ3w5kYAo39SltAZLwXVBwErPdg/+KXPqlkRLq3NA5paaO9ULQHBQy438mTVfBXfQx2YhQDt4PPaumOcrBwCDcQ8+qQFKZCvSj2ksTLf/3Kf2v33Tk5embCb4yqkNkheGVwXQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E73351F000E9; Fri, 21 Aug 2026 08:57:38 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 14/45] clk: ingenic: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:24 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 Acked-by: Paul Cercueil --- Compile-tested only. --- drivers/clk/ingenic/cgu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/ingenic/cgu.c b/drivers/clk/ingenic/cgu.c index 41e4c69131bd6ec7..ad223aa20e8db5a5 100644 --- a/drivers/clk/ingenic/cgu.c +++ b/drivers/clk/ingenic/cgu.c @@ -644,8 +644,8 @@ static const struct clk_ops ingenic_clk_ops = { static int ingenic_register_clock(struct ingenic_cgu *cgu, unsigned idx) { const struct ingenic_cgu_clk_info *clk_info = &cgu->clock_info[idx]; - struct clk_init_data clk_init; struct ingenic_clk *ingenic_clk = NULL; + struct clk_init_data clk_init = {}; struct clk *clk, *parent; const char *parent_names[4]; unsigned caps, i, num_possible; From patchwork Fri Aug 21 08:53:25 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3015 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 522EE1C0130 for ; Fri, 21 Aug 2026 11:06:30 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25259-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25259-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 38A3931FBBC2 for ; Fri, 21 Aug 2026 08:58:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F36DC449999; Fri, 21 Aug 2026 08:58:19 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C9D8643C7D3; Fri, 21 Aug 2026 08:58:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302699; cv=none; b=mppMlSUqF/5tF2Sgja7qO/AECbOJ854w+VvDuDUJLSNgHeur0G6Rni7e8zvIjWGH5loT5EYQHMIuy9HgAmveuZ9U8F5BkkDffFLiACuzJcXTP9osP2674cK+pU+qX2Rn4+g5Bu6c2CzKCe/608tbae/YOaDhqzjJE5dU6iLI9Mw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302699; c=relaxed/simple; bh=aWEh31SLWrIEuHcVCocObIopxOzYGGqV/D7/zbTnjr4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XcQwf1rEuDtE4JyajbqlDUuYzuo2DoN9iu+1nwebFgzgyjhw79N80HrGXV7zRdvLqHdylTbfGQKPybslu9CUr2nSUWbk4xJT8ovw4e+BV/ixbo6CDk6ywACCVrb8xYvqapka3Xe+VI0EyLG1WMGvHsuYIXnx/JmZy8de4IRuCHE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32CD21F00A3A; Fri, 21 Aug 2026 08:57:54 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 15/45] clk: keystone: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:25 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.66 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; BAD_REP_POLICIES(0.10)[]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; DMARC_NA(0.00)[glider.be]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; PRECEDENCE_BULK(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[glider.be:email,sea.lore.kernel.org:rdns,sea.lore.kernel.org:helo]; TAGGED_RCPT(0.00)[clk,renesas]; RCVD_COUNT_FIVE(0.00)[5]; FROM_NEQ_ENVFROM(0.00)[geert@glider.be,linux-sunxi@lists.linux.dev]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; RCPT_COUNT_GT_50(0.00)[78]; FREEMAIL_TO(0.00)[aspeedtech.com,jms.id.au,kernel.org,redhat.com,baylibre.com,codeconstruct.com.au,microchip.com,bootlin.com,tuxon.dev,broadcom.com,socionext.com,gmail.com,google.com,arm.com,lechnology.com,nxp.com,pengutronix.de,crapouillou.net,lunn.ch,mleia.com,sntech.de,samsung.com,linaro.org,foss.st.com,elopez.com.ar,sholland.org,nvidia.com,amd.com]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; TO_DN_SOME(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; R_DKIM_NA(0.00)[]; TAGGED_FROM(0.00)[bounces-25259-noreply=patchwork.local,renesas]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 522EE1C0130 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/keystone/gate.c | 2 +- drivers/clk/keystone/pll.c | 2 +- drivers/clk/keystone/syscon-clk.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/keystone/gate.c b/drivers/clk/keystone/gate.c index 03e854f10fd98afc..e83e3d4c7d67a1ac 100644 --- a/drivers/clk/keystone/gate.c +++ b/drivers/clk/keystone/gate.c @@ -164,7 +164,7 @@ static struct clk *clk_register_psc(struct device *dev, struct clk_psc_data *psc_data, spinlock_t *lock) { - struct clk_init_data init; + struct clk_init_data init = {}; struct clk_psc *psc; struct clk *clk; diff --git a/drivers/clk/keystone/pll.c b/drivers/clk/keystone/pll.c index ed197ee0cc88f8e5..020d5f4e9ed64119 100644 --- a/drivers/clk/keystone/pll.c +++ b/drivers/clk/keystone/pll.c @@ -122,7 +122,7 @@ static struct clk *clk_register_pll(struct device *dev, const char *parent_name, struct clk_pll_data *pll_data) { - struct clk_init_data init; + struct clk_init_data init = {}; struct clk_pll *pll; struct clk *clk; diff --git a/drivers/clk/keystone/syscon-clk.c b/drivers/clk/keystone/syscon-clk.c index ecf180a7949c9345..338174be41215fe9 100644 --- a/drivers/clk/keystone/syscon-clk.c +++ b/drivers/clk/keystone/syscon-clk.c @@ -67,7 +67,7 @@ static struct clk_hw const struct ti_syscon_gate_clk_data *data) { struct ti_syscon_gate_clk_priv *priv; - struct clk_init_data init; + struct clk_init_data init = {}; char *name = NULL; int ret; From patchwork Fri Aug 21 08:53:26 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3018 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 95FBE1C2D2B for ; Fri, 21 Aug 2026 11:07:31 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25260-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25260-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id E96A8321045D for ; Fri, 21 Aug 2026 08:58:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5C269448BBB; Fri, 21 Aug 2026 08:58:36 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2321B448D00; Fri, 21 Aug 2026 08:58:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302715; cv=none; b=irl4T7d8ENdkES3cLdkowlntd15rPJuNcw8VfrH2ou9V12h7fUcMunccU9ELQ/0Y39qSQ3n1XUVH/eA7ATplPepPtCumuKLxuZd2Rbmr2KUX3nOMNU5jAKrHZ3+FKDfftkWy7Z6V8QxcdWNVgMOTvaNhDQs/Xo/O6t9oxC38lFg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302715; c=relaxed/simple; bh=Wg/CHREA1GoDTeodC0exBIwpcwkiLMmiNiCb3pG+G/M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rH6biz9uxi9xmTWqFnbtmp3VJMdzJq/SFN05wTTr3462Uut99aqwQYPQOy21UY141u6KQkChapbkOMiU+G/rxnc6JdKbDcyedvREoJGcxYpSnQ+IsZLN3DW6jQALa3Sn7GtTUrLzWvAJiLOVFt0KXFDvpucXA5GshspehYr3tow= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67D001F000E9; Fri, 21 Aug 2026 08:58:09 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 16/45] clk: lmk04832: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:26 +0200 Message-ID: <357cf49d53cc8abc27f3ec3372b8de587e2278c9.1787239813.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.66 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; BAD_REP_POLICIES(0.10)[]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; DMARC_NA(0.00)[glider.be]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; PRECEDENCE_BULK(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[glider.be:email,sea.lore.kernel.org:rdns,sea.lore.kernel.org:helo]; TAGGED_RCPT(0.00)[clk,renesas]; RCVD_COUNT_FIVE(0.00)[5]; FROM_NEQ_ENVFROM(0.00)[geert@glider.be,linux-sunxi@lists.linux.dev]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; RCPT_COUNT_GT_50(0.00)[78]; FREEMAIL_TO(0.00)[aspeedtech.com,jms.id.au,kernel.org,redhat.com,baylibre.com,codeconstruct.com.au,microchip.com,bootlin.com,tuxon.dev,broadcom.com,socionext.com,gmail.com,google.com,arm.com,lechnology.com,nxp.com,pengutronix.de,crapouillou.net,lunn.ch,mleia.com,sntech.de,samsung.com,linaro.org,foss.st.com,elopez.com.ar,sholland.org,nvidia.com,amd.com]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; TO_DN_SOME(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; R_DKIM_NA(0.00)[]; TAGGED_FROM(0.00)[bounces-25260-noreply=patchwork.local,renesas]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 95FBE1C2D2B X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/clk-lmk04832.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/clk-lmk04832.c b/drivers/clk/clk-lmk04832.c index f9a0684d2628eb7a..10e5cfa96e6be195 100644 --- a/drivers/clk/clk-lmk04832.c +++ b/drivers/clk/clk-lmk04832.c @@ -587,8 +587,8 @@ static const struct clk_ops lmk04832_vco_ops = { */ static int lmk04832_register_vco(struct lmk04832 *lmk) { + struct clk_init_data init = {}; const char *parent_names[1]; - struct clk_init_data init; int ret; init.name = "lmk-vco"; @@ -947,8 +947,8 @@ static const struct clk_ops lmk04832_sclk_ops = { static int lmk04832_register_sclk(struct lmk04832 *lmk) { + struct clk_init_data init = {}; const char *parent_names[1]; - struct clk_init_data init; int ret; init.name = "lmk-sclk"; @@ -1292,8 +1292,8 @@ static int lmk04832_register_clkout(struct lmk04832 *lmk, const int num) { char name[] = "lmk-clkoutXX"; char dclk_name[] = "lmk-dclkXX_YY"; + struct clk_init_data init = {}; const char *parent_names[2]; - struct clk_init_data init; int dclk_num = num / 2; int ret; From patchwork Fri Aug 21 08:53:27 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3034 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 97F2F1C056F for ; Fri, 21 Aug 2026 11:26:40 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25261-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25261-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 5A1FA3170E5A for ; Fri, 21 Aug 2026 08:59:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C29044AB81; Fri, 21 Aug 2026 08:58:48 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7378444683D; Fri, 21 Aug 2026 08:58:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302727; cv=none; b=GlJSathMusnSiIf52KscrMQSAlBNKASyE0Awf6FlQid4cH6ClJ1Bf5XH+DR0ZpOKbmPMA9S46wHF0eqj0u7eUCGkRiPBK0F5sTGWmm6qqK+iayc4XNYYbCgXw4Bws681dAglJ7xvyNJ/1O9OjgpSZaByG70jqWVM9EfYDgOHNMY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302727; c=relaxed/simple; bh=QwjIFoCTxQrjLNTFhV2s5k7QirFp5Y5O3T+Pr6uKlzM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sKwX+HWkPFY/gOF0owYsjoHqLv7ADLFF3HF1PXjvMBdPPRcvrD8PbovSscsbzcLiDvYslM6T0j1DXZEwV7/4TFqFERB/y95xVGOq4OVzgcouMsDp3U5+Y7UDBQjnYBWF+QSO8FF2kdHhyYjSV1T+ABcLvEgV/Rwi2Tc3uYCJBdE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB7A01F00A3A; Fri, 21 Aug 2026 08:58:24 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 17/45] clk: mediatek: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:27 +0200 Message-ID: <6cf9d1621379b34175743e764aaea3ed514db01b.1787239813.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/mediatek/clk-cpumux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/mediatek/clk-cpumux.c b/drivers/clk/mediatek/clk-cpumux.c index 412558b9512772cd..9799bc156dccd650 100644 --- a/drivers/clk/mediatek/clk-cpumux.c +++ b/drivers/clk/mediatek/clk-cpumux.c @@ -62,9 +62,9 @@ static struct clk_hw * mtk_clk_register_cpumux(struct device *dev, const struct mtk_composite *mux, struct regmap *regmap) { + struct clk_init_data init = {}; struct mtk_clk_cpumux *cpumux; int ret; - struct clk_init_data init; cpumux = kzalloc_obj(*cpumux); if (!cpumux) From patchwork Fri Aug 21 08:53:28 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3021 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 2F74F1C0130 for ; Fri, 21 Aug 2026 11:09:11 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25262-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25262-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 048683232983 for ; Fri, 21 Aug 2026 08:59:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AE2D144D685; Fri, 21 Aug 2026 08:58:59 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E7472448BB3; Fri, 21 Aug 2026 08:58:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302739; cv=none; b=X2/Wo4dH8uEN8L51yopQjxLyOUyGWd0IY6KRSnTJp7lIcPXekIB2NDIf13PLhKXnGMKjOLn35j0JTN32z4Kc9ylKqibaO553FFTmTVPj0oA17NVhuHME17Qa9nIt/GdTpGfTjyG+aUNmQONSu1v+caTi4Cmcbors4kodxFVFOA4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302739; c=relaxed/simple; bh=RvSdU/Eehlz/87OaTGX/UDHW73T1fnjVt82N2C2JYZM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eS1RVP/gIgHPQJhXkbwz8yx1HnZHkwt424GczCjIeqclCvxoFh16yUdxtW37Q621EUKfGjawzGaAlVKYcHGzKVAuuKnilVnJ3r6Zn+jtsdH830QPA+YBT7qfdD1PoppD3hT9Y+YfKcTqrgfI0i5Tu5BzEo43l3jAJjpzq8evuLo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25B3D1F00A3D; Fri, 21 Aug 2026 08:58:40 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 18/45] clk: milbeaut: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:28 +0200 Message-ID: <79693c173c0b74a8d176e51409b89cd14156179b.1787239813.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/clk-milbeaut.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/clk-milbeaut.c b/drivers/clk/clk-milbeaut.c index 4265bc442dfd2988..485540b9552820b1 100644 --- a/drivers/clk/clk-milbeaut.c +++ b/drivers/clk/clk-milbeaut.c @@ -328,9 +328,9 @@ static struct clk_hw *m10v_clk_hw_register_mux(struct device *dev, u8 shift, u32 mask, u8 clk_mux_flags, u32 *table, spinlock_t *lock) { + struct clk_init_data init = {}; struct clk_mux *mux; struct clk_hw *hw; - struct clk_init_data init; int ret; mux = kzalloc_obj(*mux); @@ -459,9 +459,9 @@ static struct clk_hw *m10v_clk_hw_register_divider(struct device *dev, u8 clk_divider_flags, const struct clk_div_table *table, spinlock_t *lock, void __iomem *write_valid_reg) { + struct clk_init_data init = {}; struct m10v_clk_divider *div; struct clk_hw *hw; - struct clk_init_data init; int ret; div = kzalloc_obj(*div); From patchwork Fri Aug 21 08:53:29 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3035 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id A0B2C1C056F for ; Fri, 21 Aug 2026 11:27:35 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25263-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25263-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 6120031C116C for ; Fri, 21 Aug 2026 08:59:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8FC1344AB6A; Fri, 21 Aug 2026 08:59:17 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 06533448CE6; Fri, 21 Aug 2026 08:59:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302756; cv=none; b=eTjwBOd1DtPKufMLlDRGdA1z5NqgnCVUb+Sh9JXorU2xG+OpKb1rp3qmlAohDsSrtgoSatHR+G0c6oGW3fYEUwsYFamwjz86dDsuCN437lL1DFhcc/p+44cjGOSpvylji6kjOPCbq3dErJlrVH0oJKm3kMA5PUiK2/eyhHU53Us= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302756; c=relaxed/simple; bh=5VEghHVcDMM/o2V6qoh39j5dMcKHwVygyEeZ4iC5sr4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=foVw7WNAl4ZNGiKzhaMjSdfUtgHEEDRdv7hoCb7bbbcW8BAirO5aeSsl54auAQKrbOjiofbg5ROje2GPB9G6jyDPlHGLv7y8ePXH/9+KOsRnzoOMT5zrbl6O9sEu+eU9K6ztusL5186/mZyxullhbfRRltgt9vznGaIKKHOzDU4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4C821F00A3E; Fri, 21 Aug 2026 08:58:56 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 19/45] clk: mmp: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:29 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/mmp/clk-apbc.c | 2 +- drivers/clk/mmp/clk-apmu.c | 2 +- drivers/clk/mmp/clk-frac.c | 2 +- drivers/clk/mmp/clk-gate.c | 2 +- drivers/clk/mmp/clk-mix.c | 2 +- drivers/clk/mmp/clk-pll.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/clk/mmp/clk-apbc.c b/drivers/clk/mmp/clk-apbc.c index 84532ce8fd09431c..338ccd8fe99ca644 100644 --- a/drivers/clk/mmp/clk-apbc.c +++ b/drivers/clk/mmp/clk-apbc.c @@ -120,9 +120,9 @@ struct clk *mmp_clk_register_apbc(const char *name, const char *parent_name, void __iomem *base, unsigned int delay, unsigned int apbc_flags, spinlock_t *lock) { + struct clk_init_data init = {}; struct clk_apbc *apbc; struct clk *clk; - struct clk_init_data init; apbc = kzalloc_obj(*apbc); if (!apbc) diff --git a/drivers/clk/mmp/clk-apmu.c b/drivers/clk/mmp/clk-apmu.c index 30bbac1deca14289..887854d8f5b1d645 100644 --- a/drivers/clk/mmp/clk-apmu.c +++ b/drivers/clk/mmp/clk-apmu.c @@ -65,9 +65,9 @@ static const struct clk_ops clk_apmu_ops = { struct clk *mmp_clk_register_apmu(const char *name, const char *parent_name, void __iomem *base, u32 enable_mask, spinlock_t *lock) { + struct clk_init_data init = {}; struct clk_apmu *apmu; struct clk *clk; - struct clk_init_data init; apmu = kzalloc_obj(*apmu); if (!apmu) diff --git a/drivers/clk/mmp/clk-frac.c b/drivers/clk/mmp/clk-frac.c index 13bfc4c99f3ae5b9..5774354563aa672d 100644 --- a/drivers/clk/mmp/clk-frac.c +++ b/drivers/clk/mmp/clk-frac.c @@ -171,8 +171,8 @@ struct clk *mmp_clk_register_factor(const char *name, const char *parent_name, struct mmp_clk_factor_masks *masks, struct u32_fract *ftbl, unsigned int ftbl_cnt, spinlock_t *lock) { + struct clk_init_data init = {}; struct mmp_clk_factor *factor; - struct clk_init_data init; struct clk *clk; if (!masks) { diff --git a/drivers/clk/mmp/clk-gate.c b/drivers/clk/mmp/clk-gate.c index cc2f841ae9d96316..e8dad4ed0125ef7a 100644 --- a/drivers/clk/mmp/clk-gate.c +++ b/drivers/clk/mmp/clk-gate.c @@ -94,9 +94,9 @@ struct clk *mmp_clk_register_gate(struct device *dev, const char *name, void __iomem *reg, u32 mask, u32 val_enable, u32 val_disable, unsigned int gate_flags, spinlock_t *lock) { + struct clk_init_data init = {}; struct mmp_clk_gate *gate; struct clk *clk; - struct clk_init_data init; /* allocate the gate */ gate = kzalloc_obj(*gate); diff --git a/drivers/clk/mmp/clk-mix.c b/drivers/clk/mmp/clk-mix.c index b1c9899c71afba0c..2f3d1cb6f836c6c6 100644 --- a/drivers/clk/mmp/clk-mix.c +++ b/drivers/clk/mmp/clk-mix.c @@ -444,9 +444,9 @@ struct clk *mmp_clk_register_mix(struct device *dev, struct mmp_clk_mix_config *config, spinlock_t *lock) { + struct clk_init_data init = {}; struct mmp_clk_mix *mix; struct clk *clk; - struct clk_init_data init; mix = kzalloc_obj(*mix); if (!mix) diff --git a/drivers/clk/mmp/clk-pll.c b/drivers/clk/mmp/clk-pll.c index 430f5e3c8540e863..e0ea29b5bb66cf98 100644 --- a/drivers/clk/mmp/clk-pll.c +++ b/drivers/clk/mmp/clk-pll.c @@ -104,9 +104,9 @@ static struct clk *mmp_clk_register_pll(char *name, unsigned long input_rate, void __iomem *postdiv_reg, u8 postdiv_shift) { + struct clk_init_data init = {}; struct mmp_clk_pll *pll; struct clk *clk; - struct clk_init_data init; pll = kzalloc_obj(*pll); if (!pll) From patchwork Fri Aug 21 08:53:30 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3036 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 646BA1C0585 for ; Fri, 21 Aug 2026 11:27:53 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25264-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25264-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id C347D324B5C7 for ; Fri, 21 Aug 2026 09:00:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DDFE54508E0; Fri, 21 Aug 2026 08:59:31 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 00F5A449B3B; Fri, 21 Aug 2026 08:59:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302770; cv=none; b=KJXX7gyDOzgHyMK5b3ncOme7R3vbwcKsPM8TnYX6gyDBvBEEUyTNdkHWAGqNdtSjRHto/BS7mL8ZdWehBGUhJtCzBJKZ8P2eARTogEcJEuWF5GJqNko/NBy0mo3MvKT7I4VOHLYJjIUUG27JLd6WfIlOXtqbk0148lZLLkf+UTM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302770; c=relaxed/simple; bh=GLGnZZkko+ZPga2LWBWTy1u06dwf4tTrrnjNQ/z4E50=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gOWpoajoTekuEGyvwyMmu11Hgzzx4f7DKvNF/duBfvzg3YPVdFTf39uGRyXxpnz5c5ufbYtLY+pYcZOOc9piFGCibK6W0Qz1ukQ5S5kyKXSUzHdA/R2tyBcp1nExtmBsrzsQACGgHO+D5jah7U5RYo0aL88qBNTXOziZQD/uAqI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8CD521F000E9; Fri, 21 Aug 2026 08:59:12 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 20/45] clk: mvebu: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:30 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/mvebu/ap-cpu-clk.c | 2 +- drivers/clk/mvebu/clk-corediv.c | 2 +- drivers/clk/mvebu/clk-cpu.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/mvebu/ap-cpu-clk.c b/drivers/clk/mvebu/ap-cpu-clk.c index 1e44ace7d95197b2..721cad4218677163 100644 --- a/drivers/clk/mvebu/ap-cpu-clk.c +++ b/drivers/clk/mvebu/ap-cpu-clk.c @@ -286,7 +286,7 @@ static int ap_cpu_clock_probe(struct platform_device *pdev) for_each_of_cpu_node(dn) { char *clk_name = "cpu-cluster-0"; - struct clk_init_data init; + struct clk_init_data init = {}; const char *parent_name; struct clk *parent; u64 cpu; diff --git a/drivers/clk/mvebu/clk-corediv.c b/drivers/clk/mvebu/clk-corediv.c index ae48293b0c413fc0..e26ada3c29aeb0c1 100644 --- a/drivers/clk/mvebu/clk-corediv.c +++ b/drivers/clk/mvebu/clk-corediv.c @@ -253,7 +253,7 @@ static void __init mvebu_corediv_clk_init(struct device_node *node, const struct clk_corediv_soc_desc *soc_desc) { - struct clk_init_data init; + struct clk_init_data init = {}; struct clk_corediv *corediv; struct clk **clks; void __iomem *base; diff --git a/drivers/clk/mvebu/clk-cpu.c b/drivers/clk/mvebu/clk-cpu.c index 24196e288fe29cae..a7646a25726b64a5 100644 --- a/drivers/clk/mvebu/clk-cpu.c +++ b/drivers/clk/mvebu/clk-cpu.c @@ -192,7 +192,7 @@ static void __init of_cpu_clk_setup(struct device_node *node) goto clks_out; for_each_possible_cpu(cpu) { - struct clk_init_data init; + struct clk_init_data init = {}; struct clk *clk; char *clk_name = kzalloc(5, GFP_KERNEL); From patchwork Fri Aug 21 08:53:31 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3037 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id BA37B1C056F for ; Fri, 21 Aug 2026 11:28:12 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25265-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25265-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 226A23251514 for ; Fri, 21 Aug 2026 09:00:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 182C5456E07; Fri, 21 Aug 2026 08:59:57 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E0164499B6; Fri, 21 Aug 2026 08:59:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302795; cv=none; b=B8FD3a5SmeM/miG0k98hlbw5z6FUF6pzpUI3aQvjjguaMPPnIOCyMPeRa7h1DeZyGU4w2sFWOD3n1lL6hh150l8XtSuyBzW3EP36rZvK53qZTX9njDwip6g1WJP1K7IUflXn1QORTWuP7iWZR8+R5Yk3MbsB6gpAxmNxW40F8+g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302795; c=relaxed/simple; bh=A7m7H1x/Xe6taMVB1SI8InH3sCQzArNKhp5r/8NFhuE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Bzkm+DrPJeVynjDCthxeH5YiFom1k4xCZxF/I6kiIx19mKL7b5+tG6/tzcW9m0umL+/AFK6pWX+F8wE6s4tpmG7EEyHMeYZmJvtQiehYpAb3rx9QCY2O2WA0WRSD+YFbGj5RWTnBIW22xpexK+JRew1IZ+ze4xNoPiuNd+REBug= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 679A61F00A3A; Fri, 21 Aug 2026 08:59:28 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 21/45] clk: mxs: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:31 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [3.84 / 15.00]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; PRECEDENCE_BULK(0.00)[]; DMARC_NA(0.00)[glider.be]; RCVD_COUNT_FIVE(0.00)[5]; TAGGED_RCPT(0.00)[clk,renesas]; DBL_BLOCKED_OPENRESOLVER(0.00)[glider.be:email,sea.lore.kernel.org:rdns,sea.lore.kernel.org:helo]; FROM_NEQ_ENVFROM(0.00)[geert@glider.be,linux-sunxi@lists.linux.dev]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; TAGGED_FROM(0.00)[bounces-25265-noreply=patchwork.local,renesas]; RCPT_COUNT_GT_50(0.00)[78]; FREEMAIL_TO(0.00)[aspeedtech.com,jms.id.au,kernel.org,redhat.com,baylibre.com,codeconstruct.com.au,microchip.com,bootlin.com,tuxon.dev,broadcom.com,socionext.com,gmail.com,google.com,arm.com,lechnology.com,nxp.com,pengutronix.de,crapouillou.net,lunn.ch,mleia.com,sntech.de,samsung.com,linaro.org,foss.st.com,elopez.com.ar,sholland.org,nvidia.com,amd.com]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; TO_DN_SOME(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: BA37B1C056F X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/mxs/clk-div.c | 2 +- drivers/clk/mxs/clk-frac.c | 2 +- drivers/clk/mxs/clk-pll.c | 2 +- drivers/clk/mxs/clk-ref.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/mxs/clk-div.c b/drivers/clk/mxs/clk-div.c index fe7224162b3cc0fa..d4ee785c651190f0 100644 --- a/drivers/clk/mxs/clk-div.c +++ b/drivers/clk/mxs/clk-div.c @@ -70,9 +70,9 @@ static const struct clk_ops clk_div_ops = { struct clk *mxs_clk_div(const char *name, const char *parent_name, void __iomem *reg, u8 shift, u8 width, u8 busy) { + struct clk_init_data init = {}; struct clk_div *div; struct clk *clk; - struct clk_init_data init; div = kzalloc_obj(*div); if (!div) diff --git a/drivers/clk/mxs/clk-frac.c b/drivers/clk/mxs/clk-frac.c index 52eb82fde322dcc4..e317710ab503a84a 100644 --- a/drivers/clk/mxs/clk-frac.c +++ b/drivers/clk/mxs/clk-frac.c @@ -112,9 +112,9 @@ static const struct clk_ops clk_frac_ops = { struct clk *mxs_clk_frac(const char *name, const char *parent_name, void __iomem *reg, u8 shift, u8 width, u8 busy) { + struct clk_init_data init = {}; struct clk_frac *frac; struct clk *clk; - struct clk_init_data init; frac = kzalloc_obj(*frac); if (!frac) diff --git a/drivers/clk/mxs/clk-pll.c b/drivers/clk/mxs/clk-pll.c index 581868e0693c6e5e..5acf48cddbb2859f 100644 --- a/drivers/clk/mxs/clk-pll.c +++ b/drivers/clk/mxs/clk-pll.c @@ -82,9 +82,9 @@ static const struct clk_ops clk_pll_ops = { struct clk *mxs_clk_pll(const char *name, const char *parent_name, void __iomem *base, u8 power, unsigned long rate) { + struct clk_init_data init = {}; struct clk_pll *pll; struct clk *clk; - struct clk_init_data init; pll = kzalloc_obj(*pll); if (!pll) diff --git a/drivers/clk/mxs/clk-ref.c b/drivers/clk/mxs/clk-ref.c index 9667d4d3c2a885eb..66ea1c229014ed60 100644 --- a/drivers/clk/mxs/clk-ref.c +++ b/drivers/clk/mxs/clk-ref.c @@ -113,9 +113,9 @@ static const struct clk_ops clk_ref_ops = { struct clk *mxs_clk_ref(const char *name, const char *parent_name, void __iomem *reg, u8 idx) { + struct clk_init_data init = {}; struct clk_ref *ref; struct clk *clk; - struct clk_init_data init; ref = kzalloc_obj(*ref); if (!ref) From patchwork Fri Aug 21 08:53:32 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3038 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 010091C0585 for ; Fri, 21 Aug 2026 11:28:22 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25266-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25266-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 753B332564CE for ; Fri, 21 Aug 2026 09:00:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D0004519AF; Fri, 21 Aug 2026 09:00:10 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E9D845198B; Fri, 21 Aug 2026 09:00:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302808; cv=none; b=cksT5vmQXeu26H50tQBduMjcIOYzSGJmjVg3inUAaTgKcUgDWbXOdm8MfveIHJF5D6dlklbQsoNNtN15T5Yjx/sPA4/gvmZSnfW6QbhEIRVuQrtGOEvIpCUlCnPKwPinq6vdzqQgRr80NQGNzy3dkoemXmHOjTDFct3nwfxlokA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302808; c=relaxed/simple; bh=pRVXb1B4mkcDAlVvE3F6/Q0p+cXchJkAbPiUwoVqaOA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bODl50BsDd9fNrvZD1c/ZV0dp0l/vF/Pi22SkN2CMiHmrPjXOiCPBVdNbJV2+YWFVz4ZsDZKAdBQ24zlktQiMoukImgOiBwKOrBMUEkdX1ps+OlwQheoVBljDJvSNs1O1F3I+nEr+mPRm5FpdTtoQUcrrtkyIYFGm66lWrJ2vAA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8491B1F000E9; Fri, 21 Aug 2026 08:59:43 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 22/45] clk: nomadik: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:32 +0200 Message-ID: <631df13629bf77d55bda770f94c7b1863690f2e2.1787239813.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [3.84 / 15.00]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; FROM_HAS_DN(0.00)[]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; PRECEDENCE_BULK(0.00)[]; DMARC_NA(0.00)[glider.be]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_RCPT(0.00)[clk,renesas]; DBL_BLOCKED_OPENRESOLVER(0.00)[glider.be:email,sea.lore.kernel.org:rdns,sea.lore.kernel.org:helo]; RCVD_COUNT_FIVE(0.00)[5]; FROM_NEQ_ENVFROM(0.00)[geert@glider.be,linux-sunxi@lists.linux.dev]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; RCPT_COUNT_GT_50(0.00)[78]; FREEMAIL_TO(0.00)[aspeedtech.com,jms.id.au,kernel.org,redhat.com,baylibre.com,codeconstruct.com.au,microchip.com,bootlin.com,tuxon.dev,broadcom.com,socionext.com,gmail.com,google.com,arm.com,lechnology.com,nxp.com,pengutronix.de,crapouillou.net,lunn.ch,mleia.com,sntech.de,samsung.com,linaro.org,foss.st.com,elopez.com.ar,sholland.org,nvidia.com,amd.com]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10:c]; TO_DN_SOME(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; TAGGED_FROM(0.00)[bounces-25266-noreply=patchwork.local,renesas]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 010091C0585 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/clk-nomadik.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/clk-nomadik.c b/drivers/clk/clk-nomadik.c index da6b89759a14ecb0..890084b3912b4cb5 100644 --- a/drivers/clk/clk-nomadik.c +++ b/drivers/clk/clk-nomadik.c @@ -263,7 +263,7 @@ pll_clk_register(struct device *dev, const char *name, { int ret; struct clk_pll *pll; - struct clk_init_data init; + struct clk_init_data init = {}; if (id != 1 && id != 2) { pr_err("%s: the Nomadik has only PLL 1 & 2\n", __func__); @@ -355,7 +355,7 @@ src_clk_register(struct device *dev, const char *name, { int ret; struct clk_src *sclk; - struct clk_init_data init; + struct clk_init_data init = {}; sclk = kzalloc_obj(*sclk); if (!sclk) From patchwork Fri Aug 21 08:53:33 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3022 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 5E7FD1C0130 for ; Fri, 21 Aug 2026 11:11:51 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25267-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25267-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 926F9325E1A2 for ; Fri, 21 Aug 2026 09:00:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B5D3C4582CC; Fri, 21 Aug 2026 09:00:26 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 657C343F0AC; Fri, 21 Aug 2026 09:00:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302826; cv=none; b=GcLJvCz3Y7NwTglHC7OWyqCwqSTAaHI0525aa0Is+HNXU2e3KhwYemT6wx20F6xlF531qMaexhb2+XfIJwYP28ih92tlyGqh8kGgsb47n3u8WmEudvHX5kN3pvacpEvVLKiwyrl2vxFu+hSGrBENCd8JRyi9jhA6ucSplxI/KCg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302826; c=relaxed/simple; bh=7DWWSfFs6h+JWjalEPcaBQW2w7pfSgf6gDhMlNL2VzE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qj8xd66YoHiPgOSIFBrsY0od+4Qm9lZh+6vUTwQwLSlhuUjKVuKizefryugLgCLG8EUHnVA3HwXpk8fEvFxNiyogAcWb1o/j8/WA9Rw4MYlNsJnvFHUtHZbY6J38JsEL99qIp48jGdtgnfiHLTVfK05ocGkBzOWSB9iNVkqTbdA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B1641F00A3D; Fri, 21 Aug 2026 08:59:58 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 23/45] clk: npcm7xx: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:33 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.66 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; PRECEDENCE_BULK(0.00)[]; TAGGED_RCPT(0.00)[clk,renesas]; RCVD_VIA_SMTP_AUTH(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[glider.be:email,sea.lore.kernel.org:rdns,sea.lore.kernel.org:helo]; DMARC_NA(0.00)[glider.be]; FORGED_SENDER_MAILLIST(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; FROM_NEQ_ENVFROM(0.00)[geert@glider.be,linux-sunxi@lists.linux.dev]; TAGGED_FROM(0.00)[bounces-25267-noreply=patchwork.local,renesas]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; RCPT_COUNT_GT_50(0.00)[78]; TO_DN_SOME(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[100.90.174.1:received,100.103.45.18:received]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; FREEMAIL_TO(0.00)[aspeedtech.com,jms.id.au,kernel.org,redhat.com,baylibre.com,codeconstruct.com.au,microchip.com,bootlin.com,tuxon.dev,broadcom.com,socionext.com,gmail.com,google.com,arm.com,lechnology.com,nxp.com,pengutronix.de,crapouillou.net,lunn.ch,mleia.com,sntech.de,samsung.com,linaro.org,foss.st.com,elopez.com.ar,sholland.org,nvidia.com,amd.com]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; R_DKIM_NA(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.234.253.10:from] X-Rspamd-Queue-Id: 5E7FD1C0130 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/clk-npcm7xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-npcm7xx.c b/drivers/clk/clk-npcm7xx.c index 79eca6ee3120c646..562d2d406d7a00fc 100644 --- a/drivers/clk/clk-npcm7xx.c +++ b/drivers/clk/clk-npcm7xx.c @@ -69,8 +69,8 @@ static struct clk_hw * npcm7xx_clk_register_pll(void __iomem *pllcon, const char *name, const char *parent_name, unsigned long flags) { + struct clk_init_data init = {}; struct npcm7xx_clk_pll *pll; - struct clk_init_data init; struct clk_hw *hw; int ret; From patchwork Fri Aug 21 08:53:34 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3016 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mxe881.netcup.net (Postfix) with ESMTPS id B565F1C05A3 for ; Fri, 21 Aug 2026 11:06:31 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.105.105.114) smtp.mailfrom=linux-sunxi+bounces-25268-noreply=patchwork.local@lists.linux.dev smtp.helo=tor.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.105.105.114 as permitted sender) client-ip=172.105.105.114; envelope-from=linux-sunxi+bounces-25268-noreply=patchwork.local@lists.linux.dev; helo=tor.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by tor.lore.kernel.org (Postfix) with ESMTP id DBEF63175C6C for ; Fri, 21 Aug 2026 09:01:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B3D4845DF47; Fri, 21 Aug 2026 09:00:42 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C242844C518; Fri, 21 Aug 2026 09:00:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302841; cv=none; b=bxdzd3GoWDwkhHsRVKI9zt9fGjFc2dAyo7M32MtUnYMfbhFsbJ42FCldNcfr+/7sKkOFWi6iQZSW4mzLdMIEnwtwLMfZIP5C8HDip1mvHuz46cvwwNRsurzkeXmpIPi9hfdl/dVqxA4r9/XdVYKqnA4eOjD5cZBfxnCipLr1W58= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302841; c=relaxed/simple; bh=IPMFzvlww6IKnUKktwc5I/39vR5xJBACILZn1USABMY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Tl/08/V5BCXMqL8rXX1XSeiCOfRYT13mrJkn/a0JBv9doSLg0ZTkKPKa6BLDRdnAAHx5f3++xxd6f4jU6m/Jzr5M8P85WWZ8sq7rR7Y0T8quJYLIQVJqVyNNiM9AXuq8CSwMvZOSrKB71HUXwSGRbNUBnCyY4kzljt5eANuEqZE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B1F691F000E9; Fri, 21 Aug 2026 09:00:13 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 24/45] clk: nxp: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:34 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.66 / 15.00]; BAYES_HAM(-5.50)[99.99%]; RBL_SENDERSCORE(2.00)[172.105.105.114:from]; SUSPICIOUS_RECIPS(1.50)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; BAD_REP_POLICIES(0.10)[]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; DMARC_NA(0.00)[glider.be]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; PRECEDENCE_BULK(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[glider.be:email,tor.lore.kernel.org:rdns,tor.lore.kernel.org:helo]; TAGGED_RCPT(0.00)[clk,renesas]; RCVD_COUNT_FIVE(0.00)[5]; FROM_NEQ_ENVFROM(0.00)[geert@glider.be,linux-sunxi@lists.linux.dev]; ASN(0.00)[asn:63949, ipnet:172.105.96.0/20, country:SG]; RCPT_COUNT_GT_50(0.00)[78]; FREEMAIL_TO(0.00)[aspeedtech.com,jms.id.au,kernel.org,redhat.com,baylibre.com,codeconstruct.com.au,microchip.com,bootlin.com,tuxon.dev,broadcom.com,socionext.com,gmail.com,google.com,arm.com,lechnology.com,nxp.com,pengutronix.de,crapouillou.net,lunn.ch,mleia.com,sntech.de,samsung.com,linaro.org,foss.st.com,elopez.com.ar,sholland.org,nvidia.com,amd.com]; R_SPF_ALLOW(0.00)[+ip4:172.105.105.114]; TO_DN_SOME(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; R_DKIM_NA(0.00)[]; TAGGED_FROM(0.00)[bounces-25268-noreply=patchwork.local,renesas]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: B565F1C05A3 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 Reviewed-by: Vladimir Zapolskiy --- Compile-tested only. --- drivers/clk/nxp/clk-lpc18xx-creg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/nxp/clk-lpc18xx-creg.c b/drivers/clk/nxp/clk-lpc18xx-creg.c index 3d3982e9c661a5c2..de3c214a80fcf903 100644 --- a/drivers/clk/nxp/clk-lpc18xx-creg.c +++ b/drivers/clk/nxp/clk-lpc18xx-creg.c @@ -138,7 +138,7 @@ static struct clk *clk_register_creg_clk(struct device *dev, const char **parent_name, struct regmap *syscon) { - struct clk_init_data init; + struct clk_init_data init = {}; init.ops = creg_clk->ops; init.name = creg_clk->name; From patchwork Fri Aug 21 08:53:35 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3017 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mxe881.netcup.net (Postfix) with ESMTPS id F24B41C05B2 for ; Fri, 21 Aug 2026 11:07:04 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.105.105.114) smtp.mailfrom=linux-sunxi+bounces-25269-noreply=patchwork.local@lists.linux.dev smtp.helo=tor.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.105.105.114 as permitted sender) client-ip=172.105.105.114; envelope-from=linux-sunxi+bounces-25269-noreply=patchwork.local@lists.linux.dev; helo=tor.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by tor.lore.kernel.org (Postfix) with ESMTP id A75E4317AC9E for ; Fri, 21 Aug 2026 09:01:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E7A10463B7C; Fri, 21 Aug 2026 09:00:55 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 438344519A5; Fri, 21 Aug 2026 09:00:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302854; cv=none; b=TWXvcIGFJ9fEbL/zAMT4rqMOCJw2M4YcUcZQ221nTS4zSHZrVYJk3SMo9IlY5blPcrJwIxU/ydCOhioAovGnNqtDXVs8WygygcURyuTL5qJkQ1PIZ02zOUtL4y4Y1wOyB5dy1uKK0d3fTffNfk8uvawqX62lcfDPkhelfNfSLec= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302854; c=relaxed/simple; bh=zhRpGfP8MAXXN9DL+cpA5ZgcfIJKCeMEKWZ1ftAS8+8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YcZ0R3uPFaJZmSnNTL9pET+IwCV5xAi38M8m4BUg4PNVr/pP0dKloYwiicRv3nzGAA3NP/alWyobj4AyM6SC8fCT4nM0IGIPjIlgHVcSqis8MMyk1HyCWvfhBjNzC3rp8N05Y3fTwrhfpphx2BxR09dF1WGnMl5bmpX3l7dS8c8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id BBDED1F00A3E; Fri, 21 Aug 2026 09:00:28 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 25/45] clk: pistachio: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:35 +0200 Message-ID: <34b65a00a6a40ddcb7a9f4d3d724e80a00ac9bd2.1787239813.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/pistachio/clk-pll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/pistachio/clk-pll.c b/drivers/clk/pistachio/clk-pll.c index 5b268a985a9c7d0e..ad997a777632a842 100644 --- a/drivers/clk/pistachio/clk-pll.c +++ b/drivers/clk/pistachio/clk-pll.c @@ -453,8 +453,8 @@ static struct clk *pll_register(const char *name, const char *parent_name, struct pistachio_pll_rate_table *rates, unsigned int nr_rates) { + struct clk_init_data init = {}; struct pistachio_clk_pll *pll; - struct clk_init_data init; struct clk *clk; pll = kzalloc_obj(*pll); From patchwork Fri Aug 21 08:53:36 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3019 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mxe881.netcup.net (Postfix) with ESMTPS id 637711C0130 for ; Fri, 21 Aug 2026 11:07:44 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.105.105.114) smtp.mailfrom=linux-sunxi+bounces-25270-noreply=patchwork.local@lists.linux.dev smtp.helo=tor.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.105.105.114 as permitted sender) client-ip=172.105.105.114; envelope-from=linux-sunxi+bounces-25270-noreply=patchwork.local@lists.linux.dev; helo=tor.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by tor.lore.kernel.org (Postfix) with ESMTP id E7C6231822F2 for ; Fri, 21 Aug 2026 09:01:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 07A5845DF61; Fri, 21 Aug 2026 09:01:15 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C353745A294; Fri, 21 Aug 2026 09:01:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302872; cv=none; b=dZMGl1GU7JMitQcRatmfndW53GZQ2LoblOuKv0cjzfsznMDzf0RflfaR66KKmzko10A83DLwpjczznugQxTz96+9IfxIVsAuM6nciSjRx1utNTwzZfQrpPlV+atkuDEXlYPNrtv73yZRwoqtJzXKoFGTpWNcDlnLCofbwfNca2o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302872; c=relaxed/simple; bh=+dG2KqfuOBsTH7pEbJy7MC5JsnO1rvlo9mGMb+Z33MU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eK3AX5N2iZy1pe/DD4XnRySEXd6vu0KZZ7AZmtxaS73eNGjXmAFottq335p4DNkdqgFGcZEEa6dY/KQaf2iCpQi/vPnat74+3Gu0X11pGsVXDO1Zm3iw3tUXxSUGsrTmn3o+KevQxuSxU0Q6m9Z2DBOa9W17Lhya1IJos1Pn8Y0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C99D41F000E9; Fri, 21 Aug 2026 09:00:43 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 26/45] clk: pwm: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:36 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.66 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.105.105.114:from]; SUSPICIOUS_RECIPS(1.50)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; DMARC_NA(0.00)[glider.be]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; FROM_HAS_DN(0.00)[]; PRECEDENCE_BULK(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[tor.lore.kernel.org:rdns,tor.lore.kernel.org:helo,glider.be:email]; TAGGED_RCPT(0.00)[clk,renesas]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; FROM_NEQ_ENVFROM(0.00)[geert@glider.be,linux-sunxi@lists.linux.dev]; RCPT_COUNT_GT_50(0.00)[78]; FREEMAIL_TO(0.00)[aspeedtech.com,jms.id.au,kernel.org,redhat.com,baylibre.com,codeconstruct.com.au,microchip.com,bootlin.com,tuxon.dev,broadcom.com,socionext.com,gmail.com,google.com,arm.com,lechnology.com,nxp.com,pengutronix.de,crapouillou.net,lunn.ch,mleia.com,sntech.de,samsung.com,linaro.org,foss.st.com,elopez.com.ar,sholland.org,nvidia.com,amd.com]; R_SPF_ALLOW(0.00)[+ip4:172.105.105.114:c]; TO_DN_SOME(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:63949, ipnet:172.105.96.0/20, country:SG]; RCVD_TLS_LAST(0.00)[]; TAGGED_FROM(0.00)[bounces-25270-noreply=patchwork.local,renesas]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 637711C0130 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/clk-pwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-pwm.c b/drivers/clk/clk-pwm.c index 4709f0338e373b57..2001c7c9367c00ec 100644 --- a/drivers/clk/clk-pwm.c +++ b/drivers/clk/clk-pwm.c @@ -95,7 +95,7 @@ static const struct clk_ops clk_pwm_ops = { static int clk_pwm_probe(struct platform_device *pdev) { struct device_node *node = pdev->dev.of_node; - struct clk_init_data init; + struct clk_init_data init = {}; struct clk_pwm *clk_pwm; struct pwm_device *pwm; struct pwm_args pargs; From patchwork Fri Aug 21 08:53:37 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3025 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 029091C0130 for ; Fri, 21 Aug 2026 11:14:34 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25271-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25271-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id B6AA5329040E for ; Fri, 21 Aug 2026 09:02:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3EC36466B1A; Fri, 21 Aug 2026 09:01:25 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0C4BB4582D9; Fri, 21 Aug 2026 09:01:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302885; cv=none; b=BA8tKq/b4t3M+6KJx1ywR4rqXYaV1OoSmWTMRuBNNQao8HJbcQNGTYVRylFYYq3uJrXfkeBa3ycGE/sXRwRFZB/n35fQjaf0g4C66lOURbBwYIJrK9WOV3ThTZBKnNkm91SyLd6RP/7i0QYAq9f/R94ar957i2Xa+fzavMJmHLI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302885; c=relaxed/simple; bh=B6p+OcFdP515S8LjF8ohzfroFcUB/LLJnrQ8WbhYQ7s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=o+XrWFlgCVMcUvMzRTMPNtfnpx7V+CATQSlTAeYxPcEw8BrQhfTfpDcMiuCw+oLyX0m2YBakAmcYfdLtdpIIgwvFzDvbS06qPyNQ53NzOkEf5jvmSF3LgNN+pKwURrQkVLQd/htRvfAu0VLTWM0ImfYMkUd8lxLnZT2kPWLGWTo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D868B1F00A3A; Fri, 21 Aug 2026 09:00:58 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 27/45] clk: renesas: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:37 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Boot-tested on RZ/Five. --- drivers/clk/renesas/rzg2l-cpg.c | 18 +++++++++--------- drivers/clk/renesas/rzv2h-cpg.c | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/clk/renesas/rzg2l-cpg.c b/drivers/clk/renesas/rzg2l-cpg.c index 88d74858687d4866..50b64eb3eafebe71 100644 --- a/drivers/clk/renesas/rzg2l-cpg.c +++ b/drivers/clk/renesas/rzg2l-cpg.c @@ -580,7 +580,7 @@ rzg2l_cpg_sd_mux_clk_register(const struct cpg_core_clk *core, struct rzg2l_cpg_priv *priv) { struct sd_mux_hw_data *sd_mux_hw_data; - struct clk_init_data init; + struct clk_init_data init = {}; struct clk_hw *clk_hw; int ret; @@ -831,9 +831,9 @@ rzg2l_cpg_dsi_div_clk_register(const struct cpg_core_clk *core, struct rzg2l_cpg_priv *priv) { struct dsi_div_hw_data *clk_hw_data; + struct clk_init_data init = {}; const struct clk *parent; const char *parent_name; - struct clk_init_data init; struct clk_hw *clk_hw; int ret; @@ -916,8 +916,8 @@ static struct clk * __init rzg3l_cpg_lvds_div_clk_register(const struct cpg_core_clk *core, struct rzg2l_cpg_priv *priv) { + struct clk_init_data init = {}; struct clk_fixed_factor *ff; - struct clk_init_data init; const struct clk *parent; const char *parent_name; int ret; @@ -1031,9 +1031,9 @@ rzg3l_cpg_dsi_div_clk_register(const struct cpg_core_clk *core, struct rzg2l_cpg_priv *priv) { struct g3l_dsi_div_hw_data *clk_hw_data; + struct clk_init_data init = {}; const struct clk *parent; const char *parent_name; - struct clk_init_data init; struct clk_hw *clk_hw; int ret; @@ -1128,7 +1128,7 @@ rzg2l_cpg_pll5_4_mux_clk_register(const struct cpg_core_clk *core, struct rzg2l_cpg_priv *priv) { struct pll5_mux_hw_data *clk_hw_data; - struct clk_init_data init; + struct clk_init_data init = {}; struct clk_hw *clk_hw; int ret; @@ -1255,8 +1255,8 @@ static struct clk * __init rzg2l_cpg_sipll5_register(const struct cpg_core_clk *core, struct rzg2l_cpg_priv *priv) { + struct clk_init_data init = {}; const struct clk *parent; - struct clk_init_data init; const char *parent_name; struct sipll5 *sipll5; struct clk_hw *clk_hw; @@ -1381,9 +1381,9 @@ rzg2l_cpg_pll_clk_register(const struct cpg_core_clk *core, struct rzg2l_cpg_priv *priv, const struct clk_ops *ops) { + struct clk_init_data init = {}; struct device *dev = priv->dev; const struct clk *parent; - struct clk_init_data init; const char *parent_name; struct pll_clk *pll_clk; int ret; @@ -1525,8 +1525,8 @@ static struct clk * __init rzg3l_cpg_dsi_mux_clk_register(const struct cpg_core_clk *core, struct rzg2l_cpg_priv *priv) { + struct clk_init_data init = {}; struct clk_mux *mux_data; - struct clk_init_data init; int ret; mux_data = devm_kzalloc(priv->dev, sizeof(*mux_data), GFP_KERNEL); @@ -2265,10 +2265,10 @@ rzg2l_cpg_register_mod_clk(const struct rzg2l_mod_clk *mod, const struct rzg2l_cpg_info *info, struct rzg2l_cpg_priv *priv) { + struct clk_init_data init = {}; struct mod_clock *clock = NULL; struct device *dev = priv->dev; unsigned int id = mod->id; - struct clk_init_data init; struct clk *parent, *clk; const char *parent_name; unsigned int i; diff --git a/drivers/clk/renesas/rzv2h-cpg.c b/drivers/clk/renesas/rzv2h-cpg.c index 917fc737f254b916..7003d59ac34b1179 100644 --- a/drivers/clk/renesas/rzv2h-cpg.c +++ b/drivers/clk/renesas/rzv2h-cpg.c @@ -338,7 +338,7 @@ rzv2h_cpg_plldsi_div_clk_register(const struct cpg_core_clk *core, { struct rzv2h_plldsi_div_clk *clk_hw_data; struct clk **clks = priv->clks; - struct clk_init_data init; + struct clk_init_data init = {}; const struct clk *parent; const char *parent_name; struct clk_hw *clk_hw; @@ -582,7 +582,7 @@ rzv2h_cpg_plldsi_smux_clk_register(const struct cpg_core_clk *core, struct rzv2h_cpg_priv *priv) { struct rzv2h_plldsi_mux_clk *clk_hw_data; - struct clk_init_data init; + struct clk_init_data init = {}; struct clk_hw *clk_hw; struct smuxed smux; int ret; @@ -711,7 +711,7 @@ rzv2h_cpg_pll_clk_register(const struct cpg_core_clk *core, const struct clk_ops *ops) { struct device *dev = priv->dev; - struct clk_init_data init; + struct clk_init_data init = {}; const struct clk *parent; const char *parent_name; struct pll_clk *pll_clk; @@ -1229,7 +1229,7 @@ rzv2h_cpg_register_mod_clk(const struct rzv2h_mod_clk *mod, { struct mod_clock *clock = NULL; struct device *dev = priv->dev; - struct clk_init_data init; + struct clk_init_data init = {}; struct clk *parent, *clk; const char *parent_name; unsigned int id; From patchwork Fri Aug 21 08:53:38 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3039 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id C4C091C056C for ; Fri, 21 Aug 2026 11:30:56 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25272-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25272-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id AFCFA329EF4D for ; Fri, 21 Aug 2026 09:02:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 75E6845629C; Fri, 21 Aug 2026 09:01:41 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADA1A45517C; Fri, 21 Aug 2026 09:01:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302901; cv=none; b=U11kh8Yo5R3BrR6PyJHKCdhVCJ9uUr/J0nfhFA2i8g+VkvnaoKlhiC63TLLUbxRK6T5oJeAUwNtxlke24aTmCVsrjF9qYILTkko8YQz7DRLKTjFb+SKC/XN+wGVJL0qF9IGxnP8Lc8RxgDIQmmuCnr935WgTTEEI6Aez8rwTx6Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302901; c=relaxed/simple; bh=iBxIQ5Ab2HK9dLketFbHuOSSTcyofNo7wxNQDxqpijk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=etO4A4+1mQMQIzLM+RLwuhD2dLukDtYV3IlL7/UQwDshD4KhAndOBMAPs8UTzJ4c2slVaTHJhEt5j+XS3L4yfBV7FMs0pw4XsJsex/e3rrTVfWPOHpE7hV48aPDlxdyaNSh5uNeQrCQF63/rW31RxU+jZzhhJodbzhGxMtzGT5Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0EB911F000E9; Fri, 21 Aug 2026 09:01:13 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 28/45] clk: rockchip: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:38 +0200 Message-ID: <49127c1f7529acccb17e1408db9f21f6d15aee2b.1787239813.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 Reviewed-by: Sebastian Reichel --- Compile-tested only. --- drivers/clk/rockchip/clk-cpu.c | 2 +- drivers/clk/rockchip/clk-ddr.c | 2 +- drivers/clk/rockchip/clk-gate-grf.c | 2 +- drivers/clk/rockchip/clk-inverter.c | 2 +- drivers/clk/rockchip/clk-mmc-phase.c | 2 +- drivers/clk/rockchip/clk-muxgrf.c | 2 +- drivers/clk/rockchip/clk-pll.c | 2 +- drivers/clk/rockchip/clk.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/clk/rockchip/clk-cpu.c b/drivers/clk/rockchip/clk-cpu.c index 6205af9ba88a8def..eb6b8b878e4dbeea 100644 --- a/drivers/clk/rockchip/clk-cpu.c +++ b/drivers/clk/rockchip/clk-cpu.c @@ -304,7 +304,7 @@ struct clk *rockchip_clk_register_cpuclk(const char *name, int nrates, void __iomem *reg_base, spinlock_t *lock) { struct rockchip_cpuclk *cpuclk; - struct clk_init_data init; + struct clk_init_data init = {}; struct clk *clk, *cclk; int ret; diff --git a/drivers/clk/rockchip/clk-ddr.c b/drivers/clk/rockchip/clk-ddr.c index 81ae8a4ee30ed95c..fbb702d0b9d996d5 100644 --- a/drivers/clk/rockchip/clk-ddr.c +++ b/drivers/clk/rockchip/clk-ddr.c @@ -97,7 +97,7 @@ struct clk *rockchip_clk_register_ddrclk(const char *name, int flags, spinlock_t *lock) { struct rockchip_ddrclk *ddrclk; - struct clk_init_data init; + struct clk_init_data init = {}; struct clk *clk; ddrclk = kzalloc_obj(*ddrclk); diff --git a/drivers/clk/rockchip/clk-gate-grf.c b/drivers/clk/rockchip/clk-gate-grf.c index 88e409e91a636aa1..458314a2569181d1 100644 --- a/drivers/clk/rockchip/clk-gate-grf.c +++ b/drivers/clk/rockchip/clk-gate-grf.c @@ -73,7 +73,7 @@ struct clk *rockchip_clk_register_gate_grf(const char *name, u8 gate_flags) { struct rockchip_gate_grf *gate; - struct clk_init_data init; + struct clk_init_data init = {}; struct clk *clk; if (IS_ERR(regmap)) { diff --git a/drivers/clk/rockchip/clk-inverter.c b/drivers/clk/rockchip/clk-inverter.c index bf9072ed9fd4daed..e6c7dad60e966288 100644 --- a/drivers/clk/rockchip/clk-inverter.c +++ b/drivers/clk/rockchip/clk-inverter.c @@ -75,8 +75,8 @@ struct clk *rockchip_clk_register_inverter(const char *name, void __iomem *reg, int shift, int flags, spinlock_t *lock) { - struct clk_init_data init; struct rockchip_inv_clock *inv_clock; + struct clk_init_data init = {}; struct clk *clk; inv_clock = kmalloc_obj(*inv_clock); diff --git a/drivers/clk/rockchip/clk-mmc-phase.c b/drivers/clk/rockchip/clk-mmc-phase.c index 4efd22953f3e0533..d92bea75faf73767 100644 --- a/drivers/clk/rockchip/clk-mmc-phase.c +++ b/drivers/clk/rockchip/clk-mmc-phase.c @@ -205,8 +205,8 @@ struct clk *rockchip_clk_register_mmc(const char *name, struct regmap *grf, int grf_reg, int shift) { - struct clk_init_data init; struct rockchip_mmc_clock *mmc_clock; + struct clk_init_data init = {}; struct clk *clk; int ret; diff --git a/drivers/clk/rockchip/clk-muxgrf.c b/drivers/clk/rockchip/clk-muxgrf.c index ccbb1379501ab474..ecdc77654813a3c3 100644 --- a/drivers/clk/rockchip/clk-muxgrf.c +++ b/drivers/clk/rockchip/clk-muxgrf.c @@ -59,7 +59,7 @@ struct clk *rockchip_clk_register_muxgrf(const char *name, int shift, int width, int mux_flags) { struct rockchip_muxgrf_clock *muxgrf_clock; - struct clk_init_data init; + struct clk_init_data init = {}; struct clk *clk; if (IS_ERR(regmap)) { diff --git a/drivers/clk/rockchip/clk-pll.c b/drivers/clk/rockchip/clk-pll.c index 706ca4b344d399a3..7204b09243d483ae 100644 --- a/drivers/clk/rockchip/clk-pll.c +++ b/drivers/clk/rockchip/clk-pll.c @@ -1069,7 +1069,7 @@ struct clk *rockchip_clk_register_pll(struct rockchip_clk_provider *ctx, unsigned long flags, u8 clk_pll_flags) { const char *pll_parents[3]; - struct clk_init_data init; + struct clk_init_data init = {}; struct rockchip_clk_pll *pll; struct clk_mux *pll_mux; struct clk *pll_clk, *mux_clk; diff --git a/drivers/clk/rockchip/clk.c b/drivers/clk/rockchip/clk.c index ee8c79b938d3c15b..10df21178ba483e2 100644 --- a/drivers/clk/rockchip/clk.c +++ b/drivers/clk/rockchip/clk.c @@ -257,7 +257,7 @@ static struct clk *rockchip_clk_register_frac_branch( if (child) { struct clk_mux *frac_mux = &frac->mux; - struct clk_init_data init; + struct clk_init_data init = {}; struct clk *mux_clk; int ret; From patchwork Fri Aug 21 08:53:39 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3026 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 6DFD21C2A02 for ; Fri, 21 Aug 2026 11:15:46 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25273-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25273-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 9455C32A9479 for ; Fri, 21 Aug 2026 09:02:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 66B2C468C1F; Fri, 21 Aug 2026 09:01:56 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A90945D19D; Fri, 21 Aug 2026 09:01:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302914; cv=none; b=aMr9kspVC8ebURKSKAjn4AguslwLi5o75FwWH1Xlhq9/rTtBw3dKNXxSXsAE7ugDVSS00TkxhnLsmfi5xTIuI2I1C60eMiigbCGre8M5yL9Nit6gEeIP5DQ+/CvuW3eZg03QP7CYeTGpZE43ro2KXdevb87W41S4XCG/2dT1EWk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302914; c=relaxed/simple; bh=wOO8va7UDd8Sja72zgmF27IXkaqc3L5HH9oNCibnsA4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YgAZIl9FBuIxQkLFwCiugpbOGT/b30IPKqd7hJ1QRk4OaPMte4t0rzweLY+aWrvvDWvutiL8KnIDvPdkQoTIS7sUUQgXx6dNpsGUUGOkoscYzrcHOGzDSS0s1cIt3bnaD2NmQyDs7Zbk5fJK1rHllBWrKKwWSlBXgwk8BgSyDGc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 244E31F00A3D; Fri, 21 Aug 2026 09:01:28 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 29/45] clk: samsung: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:39 +0200 Message-ID: <87b3e83137e1a987f3c69d214706e93ef3898cab.1787239813.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.66 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; BAD_REP_POLICIES(0.10)[]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; DMARC_NA(0.00)[glider.be]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; PRECEDENCE_BULK(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[sea.lore.kernel.org:rdns,sea.lore.kernel.org:helo,glider.be:email]; TAGGED_RCPT(0.00)[clk,renesas]; RCVD_COUNT_FIVE(0.00)[5]; FROM_NEQ_ENVFROM(0.00)[geert@glider.be,linux-sunxi@lists.linux.dev]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; RCPT_COUNT_GT_50(0.00)[78]; FREEMAIL_TO(0.00)[aspeedtech.com,jms.id.au,kernel.org,redhat.com,baylibre.com,codeconstruct.com.au,microchip.com,bootlin.com,tuxon.dev,broadcom.com,socionext.com,gmail.com,google.com,arm.com,lechnology.com,nxp.com,pengutronix.de,crapouillou.net,lunn.ch,mleia.com,sntech.de,samsung.com,linaro.org,foss.st.com,elopez.com.ar,sholland.org,nvidia.com,amd.com]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; TO_DN_SOME(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; R_DKIM_NA(0.00)[]; TAGGED_FROM(0.00)[bounces-25273-noreply=patchwork.local,renesas]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 6DFD21C2A02 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 Reviewed-by: Krzysztof Kozlowski --- Compile-tested only. --- drivers/clk/samsung/clk-cpu.c | 2 +- drivers/clk/samsung/clk-pll.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/samsung/clk-cpu.c b/drivers/clk/samsung/clk-cpu.c index 37cf47533dc610e1..a17ce26494f3ebd5 100644 --- a/drivers/clk/samsung/clk-cpu.c +++ b/drivers/clk/samsung/clk-cpu.c @@ -647,7 +647,7 @@ static int __init exynos_register_cpu_clock(struct samsung_clk_provider *ctx, const struct clk_hw *parent, *alt_parent; struct clk_hw **hws; struct exynos_cpuclk *cpuclk; - struct clk_init_data init; + struct clk_init_data init = {}; const char *parent_name; unsigned int num_cfgs; int ret = 0; diff --git a/drivers/clk/samsung/clk-pll.c b/drivers/clk/samsung/clk-pll.c index e74552846ba34105..813b8834ef16cc9b 100644 --- a/drivers/clk/samsung/clk-pll.c +++ b/drivers/clk/samsung/clk-pll.c @@ -1591,8 +1591,8 @@ static const struct clk_ops samsung_a9fraco_clk_min_ops = { static void __init _samsung_clk_register_pll(struct samsung_clk_provider *ctx, const struct samsung_pll_clock *pll_clk) { + struct clk_init_data init = {}; struct samsung_clk_pll *pll; - struct clk_init_data init; unsigned int len = 0; int ret; From patchwork Fri Aug 21 08:53:40 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3040 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 175CE1C056C for ; Fri, 21 Aug 2026 11:31:34 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25274-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25274-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 7D852319D255 for ; Fri, 21 Aug 2026 09:03:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 486E446C82A; Fri, 21 Aug 2026 09:02:11 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 95F4F449B01; Fri, 21 Aug 2026 09:01:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302928; cv=none; b=EtfRoU5lzv/5MHBqcAmo9cElAj7XTtHvWIbrC6D5E2D833S0aYwsIa8Np4uHy3NiOHdll8qZWG+X9/8LdErdN1gFTrQR5/XJYP1tQIyk1/IUaDl8+48PrWzhr5QJCJrOMkYGTTiE9TRALX3ZpFQIIPxhIEZ8PnB/9FZKxfsAnIM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302928; c=relaxed/simple; bh=dxuFDqo8LWyovjMBahrAMwJROhX7NiMDa77VQUxr3+E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Tii/8Hz+yAUkmL3sY4RbP+KGDviXJBCssBlPMaV8rvFBIdYuNApVtXfIjB7R2WvzLM3/1P5Si76b+kPELg/qWkjFtVWgQEmHZtJZMb4SEDQ3RMGdVyqvPXtWuxqZSLJODCeWUE1raYTte94bqF+5kCLhE1pEhYknfCwfgeJM0R8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55F1C1F000E9; Fri, 21 Aug 2026 09:01:44 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 30/45] clk: scpi: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:40 +0200 Message-ID: <939f1be93abebc7967a889e9c24c34942df8229a.1787239813.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.66 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; BAD_REP_POLICIES(0.10)[]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; DMARC_NA(0.00)[glider.be]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; PRECEDENCE_BULK(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[sea.lore.kernel.org:rdns,sea.lore.kernel.org:helo,glider.be:email]; TAGGED_RCPT(0.00)[clk,renesas]; RCVD_COUNT_FIVE(0.00)[5]; FROM_NEQ_ENVFROM(0.00)[geert@glider.be,linux-sunxi@lists.linux.dev]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; RCPT_COUNT_GT_50(0.00)[78]; FREEMAIL_TO(0.00)[aspeedtech.com,jms.id.au,kernel.org,redhat.com,baylibre.com,codeconstruct.com.au,microchip.com,bootlin.com,tuxon.dev,broadcom.com,socionext.com,gmail.com,google.com,arm.com,lechnology.com,nxp.com,pengutronix.de,crapouillou.net,lunn.ch,mleia.com,sntech.de,samsung.com,linaro.org,foss.st.com,elopez.com.ar,sholland.org,nvidia.com,amd.com]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; TO_DN_SOME(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; R_DKIM_NA(0.00)[]; TAGGED_FROM(0.00)[bounces-25274-noreply=patchwork.local,renesas]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 175CE1C056C X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/clk-scpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-scpi.c b/drivers/clk/clk-scpi.c index 2328d2abf6d88012..16796cf3c89271a9 100644 --- a/drivers/clk/clk-scpi.c +++ b/drivers/clk/clk-scpi.c @@ -128,7 +128,7 @@ static int scpi_clk_ops_init(struct device *dev, const struct of_device_id *match, struct scpi_clk *sclk, const char *name) { - struct clk_init_data init; + struct clk_init_data init = {}; unsigned long min = 0, max = 0; int ret; From patchwork Fri Aug 21 08:53:41 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3013 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mxe881.netcup.net (Postfix) with ESMTPS id 492161C0130 for ; Fri, 21 Aug 2026 11:04:16 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 104.64.211.4) smtp.mailfrom=linux-sunxi+bounces-25275-noreply=patchwork.local@lists.linux.dev smtp.helo=sin.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 104.64.211.4 as permitted sender) client-ip=104.64.211.4; envelope-from=linux-sunxi+bounces-25275-noreply=patchwork.local@lists.linux.dev; helo=sin.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sin.lore.kernel.org (Postfix) with ESMTP id D12C6300B9DD for ; Fri, 21 Aug 2026 09:03:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A9D0046D55D; Fri, 21 Aug 2026 09:02:22 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 43B9746C842; Fri, 21 Aug 2026 09:02:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302940; cv=none; b=YUwjy9oiFaIMGP15+Wo9jwBzxrs6n4evP6YIkz6YOPlfWLGcTvtdbElCwvQCbcQRGdEZjRW1fSQtcllMI5MPtpk2mAnmcmqbmSCxCrkEDq2vNIzJweJD3Mt8k41RpNCMozR3BcvfRADR57hpb22wUz6PDV4dF5bHr2pFC4okvGQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302940; c=relaxed/simple; bh=g4kEyAwyOc+ejoGnKieXyeSPKVMOiVbjT2Thb8eG9ms=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FTjUYGu5YTcH+Ui/aeBbmToTZTc1vT0gjqSFrF0x/mxOT/aQ/JchY2qNE0vIwvVN/MC0uj0NUa3AMM9/Szfrv+DhcYzqiJiJWpd1LIkJh74UoUjkEulCNIBtOs57VKMqs4Dwr12A4Neuqj/t5ubgudfAiW/O5mOLH+xRbzfxCeY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5FD9D1F00A3D; Fri, 21 Aug 2026 09:01:59 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 31/45] clk: silabs: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:41 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/clk-si514.c | 2 +- drivers/clk/clk-si5341.c | 2 +- drivers/clk/clk-si544.c | 2 +- drivers/clk/clk-si570.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/clk-si514.c b/drivers/clk/clk-si514.c index c0b433ad93728343..07091b91420d16f8 100644 --- a/drivers/clk/clk-si514.c +++ b/drivers/clk/clk-si514.c @@ -337,8 +337,8 @@ static const struct regmap_config si514_regmap_config = { static int si514_probe(struct i2c_client *client) { + struct clk_init_data init = {}; struct clk_si514 *data; - struct clk_init_data init; int err; data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL); diff --git a/drivers/clk/clk-si5341.c b/drivers/clk/clk-si5341.c index 5311c23532b44b52..88522333525b6828 100644 --- a/drivers/clk/clk-si5341.c +++ b/drivers/clk/clk-si5341.c @@ -1556,8 +1556,8 @@ static const struct attribute *si5341_attributes[] = { static int si5341_probe(struct i2c_client *client) { + struct clk_init_data init = {}; struct clk_si5341 *data; - struct clk_init_data init; struct clk *input; const char *root_clock_name; const char *synth_clock_names[SI5341_NUM_SYNTH] = { NULL }; diff --git a/drivers/clk/clk-si544.c b/drivers/clk/clk-si544.c index 9c520128e0a2c403..3924ec3e216369ce 100644 --- a/drivers/clk/clk-si544.c +++ b/drivers/clk/clk-si544.c @@ -445,8 +445,8 @@ static const struct regmap_config si544_regmap_config = { static int si544_probe(struct i2c_client *client) { + struct clk_init_data init = {}; struct clk_si544 *data; - struct clk_init_data init; int err; data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL); diff --git a/drivers/clk/clk-si570.c b/drivers/clk/clk-si570.c index 3063e38c66da0e77..ac9013e7379c80ab 100644 --- a/drivers/clk/clk-si570.c +++ b/drivers/clk/clk-si570.c @@ -412,7 +412,7 @@ static const struct regmap_config si570_regmap_config = { static int si570_probe(struct i2c_client *client) { struct clk_si570 *data; - struct clk_init_data init; + struct clk_init_data init = {}; u32 initial_fout, factory_fout, stability; bool skip_recall; int err; From patchwork Fri Aug 21 08:53:42 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3041 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 3B1421C056C for ; Fri, 21 Aug 2026 11:32:21 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25276-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25276-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 432C332E14AA for ; Fri, 21 Aug 2026 09:03:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 574AB46D2AC; Fri, 21 Aug 2026 09:02:45 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 35A6E3CF680; Fri, 21 Aug 2026 09:02:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302963; cv=none; b=ik5XYX0jnDe0QQZ9VWjiUToxJWTw+O3e7O3hfZiCNVkqJ+AMfESmeeqiN4MoD3qU0B4AL7r+fguJTGAuYhbQ++sY2e8wBgp56KG0GZmLkaOpXsURJuJxshS+gosh4EFqlRjb4jVfVe15ZquTopujp9rZnlLnchppPU8sonqi1ag= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302963; c=relaxed/simple; bh=hkuwbAfuTx68NodqaDMZbswYScgLXtNCq4mND9danAs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mwVxF/omxCiumIOSxk8ZjxsOgNC+GIXSUi3mdoPrkr+HdeWUAKua4UYvNL3HWlLuSrC1qoT9YsxLC+9pYcTg7z/cmlRWUHDsZQCjn3QFFXTFLOwsoQY+Jt8yjOgyy+xMMb62xxVaP2EW+kYepsTDhvLReu+RyX3mWw3bfSamDxs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7315D1F000E9; Fri, 21 Aug 2026 09:02:14 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 32/45] clk: socfpga: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:42 +0200 Message-ID: <2d38d78f8d59583e29778bebc65eaab911d8a120.1787239813.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 Acked-by: Dinh Nguyen --- Compile-tested only. --- drivers/clk/socfpga/clk-gate-a10.c | 2 +- drivers/clk/socfpga/clk-gate-s10.c | 6 +++--- drivers/clk/socfpga/clk-gate.c | 2 +- drivers/clk/socfpga/clk-periph-a10.c | 2 +- drivers/clk/socfpga/clk-periph-s10.c | 8 ++++---- drivers/clk/socfpga/clk-periph.c | 2 +- drivers/clk/socfpga/clk-pll-a10.c | 2 +- drivers/clk/socfpga/clk-pll-s10.c | 8 ++++---- drivers/clk/socfpga/clk-pll.c | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/clk/socfpga/clk-gate-a10.c b/drivers/clk/socfpga/clk-gate-a10.c index dd8d1713aaff7639..ba12179061b3fe9d 100644 --- a/drivers/clk/socfpga/clk-gate-a10.c +++ b/drivers/clk/socfpga/clk-gate-a10.c @@ -49,7 +49,7 @@ static void __init __socfpga_gate_init(struct device_node *node, struct socfpga_gate_clk *socfpga_clk; const char *clk_name = node->name; const char *parent_name[SOCFPGA_MAX_PARENTS]; - struct clk_init_data init; + struct clk_init_data init = {}; int rc; socfpga_clk = kzalloc_obj(*socfpga_clk); diff --git a/drivers/clk/socfpga/clk-gate-s10.c b/drivers/clk/socfpga/clk-gate-s10.c index 24f56a9edc44e528..4b23909c58106599 100644 --- a/drivers/clk/socfpga/clk-gate-s10.c +++ b/drivers/clk/socfpga/clk-gate-s10.c @@ -128,7 +128,7 @@ struct clk_hw *s10_register_gate(const struct stratix10_gate_clock *clks, void _ { struct clk_hw *hw_clk; struct socfpga_gate_clk *socfpga_clk; - struct clk_init_data init; + struct clk_init_data init = {}; const char *parent_name = clks->parent_name; int ret; @@ -186,7 +186,7 @@ struct clk_hw *agilex_register_gate(const struct stratix10_gate_clock *clks, voi { struct clk_hw *hw_clk; struct socfpga_gate_clk *socfpga_clk; - struct clk_init_data init; + struct clk_init_data init = {}; const char *parent_name = clks->parent_name; int ret; @@ -244,7 +244,7 @@ struct clk_hw *agilex5_register_gate(const struct agilex5_gate_clock *clks, void { struct clk_hw *hw_clk; struct socfpga_gate_clk *socfpga_clk; - struct clk_init_data init; + struct clk_init_data init = {}; int ret; socfpga_clk = kzalloc_obj(*socfpga_clk); diff --git a/drivers/clk/socfpga/clk-gate.c b/drivers/clk/socfpga/clk-gate.c index ced8e09884068a26..d0f9fa44ad182520 100644 --- a/drivers/clk/socfpga/clk-gate.c +++ b/drivers/clk/socfpga/clk-gate.c @@ -143,7 +143,7 @@ void __init socfpga_gate_init(struct device_node *node) struct socfpga_gate_clk *socfpga_clk; const char *clk_name = node->name; const char *parent_name[SOCFPGA_MAX_PARENTS]; - struct clk_init_data init; + struct clk_init_data init = {}; struct clk_ops *ops; int rc; diff --git a/drivers/clk/socfpga/clk-periph-a10.c b/drivers/clk/socfpga/clk-periph-a10.c index 4eb5787f0dea3f8e..8aefc58ba4ec3944 100644 --- a/drivers/clk/socfpga/clk-periph-a10.c +++ b/drivers/clk/socfpga/clk-periph-a10.c @@ -65,7 +65,7 @@ static void __init __socfpga_periph_init(struct device_node *node, struct socfpga_periph_clk *periph_clk; const char *clk_name = node->name; const char *parent_name[SOCFPGA_MAX_PARENTS]; - struct clk_init_data init; + struct clk_init_data init = {}; int rc; u32 fixed_div; u32 div_reg[3]; diff --git a/drivers/clk/socfpga/clk-periph-s10.c b/drivers/clk/socfpga/clk-periph-s10.c index 5195b9476da16977..dc923d0d87869743 100644 --- a/drivers/clk/socfpga/clk-periph-s10.c +++ b/drivers/clk/socfpga/clk-periph-s10.c @@ -103,7 +103,7 @@ struct clk_hw *s10_register_periph(const struct stratix10_perip_c_clock *clks, { struct clk_hw *hw_clk; struct socfpga_periph_clk *periph_clk; - struct clk_init_data init; + struct clk_init_data init = {}; const char *name = clks->name; const char *parent_name = clks->parent_name; int ret; @@ -139,7 +139,7 @@ struct clk_hw *n5x_register_periph(const struct n5x_perip_c_clock *clks, { struct clk_hw *hw_clk; struct socfpga_periph_clk *periph_clk; - struct clk_init_data init; + struct clk_init_data init = {}; const char *name = clks->name; const char *parent_name = clks->parent_name; int ret; @@ -174,7 +174,7 @@ struct clk_hw *s10_register_cnt_periph(const struct stratix10_perip_cnt_clock *c { struct clk_hw *hw_clk; struct socfpga_periph_clk *periph_clk; - struct clk_init_data init; + struct clk_init_data init = {}; const char *name = clks->name; const char *parent_name = clks->parent_name; int ret; @@ -220,7 +220,7 @@ struct clk_hw *agilex5_register_cnt_periph(const struct agilex5_perip_cnt_clock { struct clk_hw *hw_clk; struct socfpga_periph_clk *periph_clk; - struct clk_init_data init; + struct clk_init_data init = {}; const char *name = clks->name; int ret; diff --git a/drivers/clk/socfpga/clk-periph.c b/drivers/clk/socfpga/clk-periph.c index 3821db6777e75413..8fa3d8e20042d731 100644 --- a/drivers/clk/socfpga/clk-periph.c +++ b/drivers/clk/socfpga/clk-periph.c @@ -55,7 +55,7 @@ static void __init __socfpga_periph_init(struct device_node *node, struct socfpga_periph_clk *periph_clk; const char *clk_name = node->name; const char *parent_name[SOCFPGA_MAX_PARENTS]; - struct clk_init_data init; + struct clk_init_data init = {}; int rc; u32 fixed_div; u32 div_reg[3]; diff --git a/drivers/clk/socfpga/clk-pll-a10.c b/drivers/clk/socfpga/clk-pll-a10.c index c56f276e8d51e00f..63b8b75045aead8d 100644 --- a/drivers/clk/socfpga/clk-pll-a10.c +++ b/drivers/clk/socfpga/clk-pll-a10.c @@ -71,7 +71,7 @@ static void __init __socfpga_pll_init(struct device_node *node, struct socfpga_pll *pll_clk; const char *clk_name = node->name; const char *parent_name[SOCFGPA_MAX_PARENTS]; - struct clk_init_data init; + struct clk_init_data init = {}; struct device_node *clkmgr_np; int rc; int i = 0; diff --git a/drivers/clk/socfpga/clk-pll-s10.c b/drivers/clk/socfpga/clk-pll-s10.c index ee236e87da33c020..1dca54b48375b168 100644 --- a/drivers/clk/socfpga/clk-pll-s10.c +++ b/drivers/clk/socfpga/clk-pll-s10.c @@ -192,7 +192,7 @@ struct clk_hw *s10_register_pll(const struct stratix10_pll_clock *clks, { struct clk_hw *hw_clk; struct socfpga_pll *pll_clk; - struct clk_init_data init; + struct clk_init_data init = {}; const char *name = clks->name; int ret; @@ -232,7 +232,7 @@ struct clk_hw *agilex_register_pll(const struct stratix10_pll_clock *clks, { struct clk_hw *hw_clk; struct socfpga_pll *pll_clk; - struct clk_init_data init; + struct clk_init_data init = {}; const char *name = clks->name; int ret; @@ -271,7 +271,7 @@ struct clk_hw *n5x_register_pll(const struct stratix10_pll_clock *clks, { struct clk_hw *hw_clk; struct socfpga_pll *pll_clk; - struct clk_init_data init; + struct clk_init_data init = {}; const char *name = clks->name; int ret; @@ -310,7 +310,7 @@ struct clk_hw *agilex5_register_pll(const struct agilex5_pll_clock *clks, { struct clk_hw *hw_clk; struct socfpga_pll *pll_clk; - struct clk_init_data init; + struct clk_init_data init = {}; const char *name = clks->name; int ret; diff --git a/drivers/clk/socfpga/clk-pll.c b/drivers/clk/socfpga/clk-pll.c index f85adb16d414040f..aa13cc9d6db115fe 100644 --- a/drivers/clk/socfpga/clk-pll.c +++ b/drivers/clk/socfpga/clk-pll.c @@ -78,7 +78,7 @@ static void __init __socfpga_pll_init(struct device_node *node, struct socfpga_pll *pll_clk; const char *clk_name = node->name; const char *parent_name[SOCFPGA_MAX_PARENTS]; - struct clk_init_data init; + struct clk_init_data init = {}; struct device_node *clkmgr_np; int rc; From patchwork Fri Aug 21 08:53:43 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3023 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mxe881.netcup.net (Postfix) with ESMTPS id 1687D1C0130 for ; Fri, 21 Aug 2026 11:12:44 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.105.105.114) smtp.mailfrom=linux-sunxi+bounces-25277-noreply=patchwork.local@lists.linux.dev smtp.helo=tor.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.105.105.114 as permitted sender) client-ip=172.105.105.114; envelope-from=linux-sunxi+bounces-25277-noreply=patchwork.local@lists.linux.dev; helo=tor.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by tor.lore.kernel.org (Postfix) with ESMTP id 89F7A31CDC87 for ; Fri, 21 Aug 2026 09:04:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B6EB746EC7F; Fri, 21 Aug 2026 09:02:59 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C19D345DF63; Fri, 21 Aug 2026 09:02:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302976; cv=none; b=EERUYRsROK2Te0l+jeFhSMTFUJAMJayJaaq+BJl4RhjWUItBxTy3+hyBS/RO580bzYChFV60QHWn5m+U9o1aj5I0iTVNOSzrN6ZVqSMSu7szNXKmz4j9bmT8YFkgWPBbvT6k7TD5LYl0XLHiRS5DI5NWw6XqRIyGOejRUqnzA+Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302976; c=relaxed/simple; bh=e8nmsrssTmgcynkXGCECoG7QDiVQtQXefCNp17PUXqk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mnyRM0/abUwy7mF80dhQj/HxjR6HknSjbEl3ub3NN+PI/NDoQY/UQh/cAaiyGNU7IST4cPV0WXv14FSeH8LrFK5LeahhoWlo/kvaDB+K60FzJdS5B0cOxhqNlLKdtzGpntbN+O4sj1W/G34af5jBBRvZYpNZEpd4jA1R/G+xMHc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7BCB11F00A3D; Fri, 21 Aug 2026 09:02:29 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 33/45] clk: spear: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:43 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 Acked-by: Viresh Kumar --- Compile-tested only. --- drivers/clk/spear/clk-aux-synth.c | 2 +- drivers/clk/spear/clk-frac-synth.c | 2 +- drivers/clk/spear/clk-gpt-synth.c | 2 +- drivers/clk/spear/clk-vco-pll.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/spear/clk-aux-synth.c b/drivers/clk/spear/clk-aux-synth.c index 61a8c3d4c1e40d0c..85cfb9b5ec35346c 100644 --- a/drivers/clk/spear/clk-aux-synth.c +++ b/drivers/clk/spear/clk-aux-synth.c @@ -138,8 +138,8 @@ struct clk *clk_register_aux(const char *aux_name, const char *gate_name, const struct aux_clk_masks *masks, struct aux_rate_tbl *rtbl, u8 rtbl_cnt, spinlock_t *lock, struct clk **gate_clk) { + struct clk_init_data init = {}; struct clk_aux *aux; - struct clk_init_data init; struct clk *clk; if (!aux_name || !parent_name || !reg || !rtbl || !rtbl_cnt) { diff --git a/drivers/clk/spear/clk-frac-synth.c b/drivers/clk/spear/clk-frac-synth.c index 3549f1cfdae1160f..1b5e184d9668fd51 100644 --- a/drivers/clk/spear/clk-frac-synth.c +++ b/drivers/clk/spear/clk-frac-synth.c @@ -125,7 +125,7 @@ struct clk *clk_register_frac(const char *name, const char *parent_name, unsigned long flags, void __iomem *reg, struct frac_rate_tbl *rtbl, u8 rtbl_cnt, spinlock_t *lock) { - struct clk_init_data init; + struct clk_init_data init = {}; struct clk_frac *frac; struct clk *clk; diff --git a/drivers/clk/spear/clk-gpt-synth.c b/drivers/clk/spear/clk-gpt-synth.c index 1a431d7ec20c0ff3..411cacdfc11f51b1 100644 --- a/drivers/clk/spear/clk-gpt-synth.c +++ b/drivers/clk/spear/clk-gpt-synth.c @@ -114,7 +114,7 @@ struct clk *clk_register_gpt(const char *name, const char *parent_name, unsigned long flags, void __iomem *reg, struct gpt_rate_tbl *rtbl, u8 rtbl_cnt, spinlock_t *lock) { - struct clk_init_data init; + struct clk_init_data init = {}; struct clk_gpt *gpt; struct clk *clk; diff --git a/drivers/clk/spear/clk-vco-pll.c b/drivers/clk/spear/clk-vco-pll.c index faba727e2f84365e..21fcc522c738e6b2 100644 --- a/drivers/clk/spear/clk-vco-pll.c +++ b/drivers/clk/spear/clk-vco-pll.c @@ -284,7 +284,7 @@ struct clk *clk_register_vco_pll(const char *vco_name, const char *pll_name, struct clk_vco *vco; struct clk_pll *pll; struct clk *vco_clk, *tpll_clk, *tvco_gate_clk; - struct clk_init_data vco_init, pll_init; + struct clk_init_data vco_init = {}, pll_init = {}; const char **vco_parent_name; if (!vco_name || !pll_name || !parent_name || !mode_reg || !cfg_reg || From patchwork Fri Aug 21 08:53:44 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3029 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id B715A1C2A02 for ; Fri, 21 Aug 2026 11:19:06 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25278-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25278-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 8F39A31ACA18 for ; Fri, 21 Aug 2026 09:04:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6BCFC46F4B3; Fri, 21 Aug 2026 09:03:13 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C0CA4463B9B; Fri, 21 Aug 2026 09:03:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302993; cv=none; b=tyAP5zC+eHvxg5PtzU097dGGJVu+1HV8uZlfQHRsj5/VCa1Yk4M3XRIat/6mUR9Q92Bvu1C+qJ9Rz5XaiFC7d0u+Yjnzfu69XMgNPI+dv47KlzUoeRgk+ylWTucxvimlV2xcJ8moMbi/0ap8hKuRUmmBXNX2y+Or75ASEbjXFwA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787302993; c=relaxed/simple; bh=mLbk04OOUSdhbn3cldyFZMOjrCYpSUaMt+74F7OTuxE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lanKQzT+IkLjIeXE4tGxQ/WaWDE38TS7RgCHw0hSTyDdAobOkR7UHQrbyyAeJP+NHn+lQUw12nIbEzLHRrnDoVuxNG0MV/mSomJl+A+xdzwgcTTme3z+VHhtgrSJaQ2eWOPhVRZBeAvZaAoikic8ERJmP3rTR9nxhbOr3S/8jWk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 856551F000E9; Fri, 21 Aug 2026 09:02:44 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 34/45] clk: stm32: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:44 +0200 Message-ID: <0b80535e9cfdc96d43169e5023e3a92a8f2252d6.1787239813.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.66 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; BAD_REP_POLICIES(0.10)[]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; DMARC_NA(0.00)[glider.be]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; FROM_HAS_DN(0.00)[]; PRECEDENCE_BULK(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[glider.be:email,sea.lore.kernel.org:rdns,sea.lore.kernel.org:helo]; TAGGED_RCPT(0.00)[clk,renesas]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; FROM_NEQ_ENVFROM(0.00)[geert@glider.be,linux-sunxi@lists.linux.dev]; RCPT_COUNT_GT_50(0.00)[78]; FREEMAIL_TO(0.00)[aspeedtech.com,jms.id.au,kernel.org,redhat.com,baylibre.com,codeconstruct.com.au,microchip.com,bootlin.com,tuxon.dev,broadcom.com,socionext.com,gmail.com,google.com,arm.com,lechnology.com,nxp.com,pengutronix.de,crapouillou.net,lunn.ch,mleia.com,sntech.de,samsung.com,linaro.org,foss.st.com,elopez.com.ar,sholland.org,nvidia.com,amd.com]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; TO_DN_SOME(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; RCVD_TLS_LAST(0.00)[]; TAGGED_FROM(0.00)[bounces-25278-noreply=patchwork.local,renesas]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: B715A1C2A02 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/clk-stm32f4.c | 4 ++-- drivers/clk/clk-stm32h7.c | 2 +- drivers/clk/stm32/clk-stm32mp1.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/clk/clk-stm32f4.c b/drivers/clk/clk-stm32f4.c index 565b4d99bebb06e8..6603d4815514151a 100644 --- a/drivers/clk/clk-stm32f4.c +++ b/drivers/clk/clk-stm32f4.c @@ -485,8 +485,8 @@ static struct clk *clk_register_apb_mul(struct device *dev, const char *name, const char *parent_name, unsigned long flags, u8 bit_idx) { + struct clk_init_data init = {}; struct clk_apb_mul *am; - struct clk_init_data init; struct clk *clk; am = kzalloc_obj(*am); @@ -810,8 +810,8 @@ static struct clk_hw *clk_register_pll_div(const char *name, struct clk_hw *pll_hw, spinlock_t *lock) { struct stm32f4_pll_div *pll_div; + struct clk_init_data init = {}; struct clk_hw *hw; - struct clk_init_data init; int ret; /* allocate the divider */ diff --git a/drivers/clk/clk-stm32h7.c b/drivers/clk/clk-stm32h7.c index 82e0789cf189c7cb..c6afa9b202351c04 100644 --- a/drivers/clk/clk-stm32h7.c +++ b/drivers/clk/clk-stm32h7.c @@ -462,8 +462,8 @@ static struct clk_hw *clk_register_stm32_timer_ker(struct device *dev, u8 dppre_shift, spinlock_t *lock) { + struct clk_init_data init = {}; struct timer_ker *element; - struct clk_init_data init; struct clk_hw *hw; int err; diff --git a/drivers/clk/stm32/clk-stm32mp1.c b/drivers/clk/stm32/clk-stm32mp1.c index 2d9ccd96ec98c05e..b265e3f3e94c2805 100644 --- a/drivers/clk/stm32/clk-stm32mp1.c +++ b/drivers/clk/stm32/clk-stm32mp1.c @@ -902,8 +902,8 @@ static struct clk_hw *clk_register_pll(struct device *dev, const char *name, unsigned long flags, spinlock_t *lock) { + struct clk_init_data init = {}; struct stm32_pll_obj *element; - struct clk_init_data init; struct clk_hw *hw; int err; @@ -1041,8 +1041,8 @@ static struct clk_hw *clk_register_cktim(struct device *dev, const char *name, void __iomem *timpre, spinlock_t *lock) { + struct clk_init_data init = {}; struct timer_cker *tim_ker; - struct clk_init_data init; struct clk_hw *hw; int err; From patchwork Fri Aug 21 08:53:45 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3024 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mxe881.netcup.net (Postfix) with ESMTPS id D53F81C0130 for ; Fri, 21 Aug 2026 11:13:15 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.105.105.114) smtp.mailfrom=linux-sunxi+bounces-25279-noreply=patchwork.local@lists.linux.dev smtp.helo=tor.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.105.105.114 as permitted sender) client-ip=172.105.105.114; envelope-from=linux-sunxi+bounces-25279-noreply=patchwork.local@lists.linux.dev; helo=tor.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by tor.lore.kernel.org (Postfix) with ESMTP id BB6B931DFA73 for ; Fri, 21 Aug 2026 09:04:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2B2C646D2DD; Fri, 21 Aug 2026 09:03:40 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA9B44519AF; Fri, 21 Aug 2026 09:03:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787303015; cv=none; b=ULL/iQZ3yMqh+55G8/pHeTPzkaCIph4Es+iEsXn9cOVmhKGVlANvw2+WnFfD7bv/MWDRWsYK0uUAIbcnCIvSbatC9zAT+b2RxZuqnins2/y6kQeuEJ+g3rWmPHvOFGGEGd5SAggBDmhZAy+M7NtlvWLZgssA1b3Ej1+yIP+53fI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787303015; c=relaxed/simple; bh=PlSMAk+BjRQZsip8iFo42YV8KeBooQ7pJukz7NWn+QM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Gl8jJFvSmfVfB317+z6CUPfFyK0DR4fpI/QpCmxhnUam/KVvEAQsReMbvWNJWWyvfZOrdtNHN9CnDworo2L6y5ORyVyh1ONs6dk05iS6lp6aB4Dm9uspq/IfGxid4fzrM6Ur3fACfzVMU0vRgZMtdV1BiwQ2Z8K4W1kGian4Ztk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93F071F00A3A; Fri, 21 Aug 2026 09:02:59 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 35/45] clk: st: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:45 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.66 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.105.105.114:from]; SUSPICIOUS_RECIPS(1.50)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; FROM_HAS_DN(0.00)[]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; PRECEDENCE_BULK(0.00)[]; TAGGED_RCPT(0.00)[clk,renesas]; RCVD_VIA_SMTP_AUTH(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[glider.be:email,tor.lore.kernel.org:rdns,tor.lore.kernel.org:helo]; DMARC_NA(0.00)[glider.be]; FORGED_SENDER_MAILLIST(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; ASN(0.00)[asn:63949, ipnet:172.105.96.0/20, country:SG]; R_SPF_ALLOW(0.00)[+ip4:172.105.105.114:c]; RCPT_COUNT_GT_50(0.00)[78]; TO_DN_SOME(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[100.103.45.18:received,100.90.174.1:received]; FROM_NEQ_ENVFROM(0.00)[geert@glider.be,linux-sunxi@lists.linux.dev]; FREEMAIL_TO(0.00)[aspeedtech.com,jms.id.au,kernel.org,redhat.com,baylibre.com,codeconstruct.com.au,microchip.com,bootlin.com,tuxon.dev,broadcom.com,socionext.com,gmail.com,google.com,arm.com,lechnology.com,nxp.com,pengutronix.de,crapouillou.net,lunn.ch,mleia.com,sntech.de,samsung.com,linaro.org,foss.st.com,elopez.com.ar,sholland.org,nvidia.com,amd.com]; RCVD_TLS_LAST(0.00)[]; TAGGED_FROM(0.00)[bounces-25279-noreply=patchwork.local,renesas]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.105.105.114:from] X-Rspamd-Queue-Id: D53F81C0130 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/st/clk-flexgen.c | 2 +- drivers/clk/st/clkgen-fsyn.c | 4 ++-- drivers/clk/st/clkgen-pll.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/st/clk-flexgen.c b/drivers/clk/st/clk-flexgen.c index 211535fd8ac9bf3c..46e5c7be43e8277e 100644 --- a/drivers/clk/st/clk-flexgen.c +++ b/drivers/clk/st/clk-flexgen.c @@ -209,7 +209,7 @@ static struct clk *clk_register_flexgen(const char *name, unsigned long flexgen_flags, bool mode) { struct flexgen *fgxbar; struct clk *clk; - struct clk_init_data init; + struct clk_init_data init = {}; u32 xbar_shift; void __iomem *xbar_reg, *fdiv_reg; diff --git a/drivers/clk/st/clkgen-fsyn.c b/drivers/clk/st/clkgen-fsyn.c index 3fcc1da20c04ed8b..705133b959d74ed3 100644 --- a/drivers/clk/st/clkgen-fsyn.c +++ b/drivers/clk/st/clkgen-fsyn.c @@ -444,9 +444,9 @@ static struct clk * __init st_clk_register_quadfs_pll( struct clkgen_quadfs_data *quadfs, void __iomem *reg, spinlock_t *lock) { + struct clk_init_data init = {}; struct st_clk_quadfs_pll *pll; struct clk *clk; - struct clk_init_data init; /* * Sanity check required pointers. @@ -885,8 +885,8 @@ static struct clk * __init st_clk_register_quadfs_fsynth( unsigned long flags, spinlock_t *lock) { struct st_clk_quadfs_fsynth *fs; + struct clk_init_data init = {}; struct clk *clk; - struct clk_init_data init; /* * Sanity check required pointers, note that nsdiv3 is optional. diff --git a/drivers/clk/st/clkgen-pll.c b/drivers/clk/st/clkgen-pll.c index 17551c6a879ac480..aaa28aaff6272592 100644 --- a/drivers/clk/st/clkgen-pll.c +++ b/drivers/clk/st/clkgen-pll.c @@ -652,9 +652,9 @@ static struct clk * __init clkgen_pll_register(const char *parent_name, void __iomem *reg, unsigned long pll_flags, const char *clk_name, spinlock_t *lock) { + struct clk_init_data init = {}; struct clkgen_pll *pll; struct clk *clk; - struct clk_init_data init; pll = kzalloc_obj(*pll); if (!pll) From patchwork Fri Aug 21 08:53:46 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3030 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 809CA1C2D2B for ; Fri, 21 Aug 2026 11:19:55 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25280-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25280-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 49FE3330FF12 for ; Fri, 21 Aug 2026 09:04:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F180E46EF6B; Fri, 21 Aug 2026 09:03:47 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B96146C836; Fri, 21 Aug 2026 09:03:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787303026; cv=none; b=Nb3vDfls3cuRlu+K5ENVwq52GZgQFw+VkwNrpKk4I5wJclaYcIHUwlUuQvTk586elg0KUbbfWMY3Rnut+cLYZ+VqrbbHisognqllFzqXRJBnWK4uzftMLyXX93WfIohtswR6AVmgdk78SU3QU5kYHpRCyUb7KFP1iRev9DDhIno= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787303026; c=relaxed/simple; bh=bhGfILorJ5iLXAbE90U6fsvjobRYRwkUsVaLVEF1T3E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jZz1ec0nbGZw65F+rsJy0xRkqzH/bPQTH4EQQFUzfwBpvjkmsqlrDvJoeEQLA20wUP9YpxkodSQ8zEBGi5jSmITo64lAxLlaKsWyDEbGBQHWMY5/FG3QJhHnqVWwO5Sm7uAosKXrfltvw14LyJPiM1T8B1yiBDh+M2/YK1EX0Fs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD8351F00A3D; Fri, 21 Aug 2026 09:03:14 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 36/45] clk: sunxi: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:46 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.66 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; BAD_REP_POLICIES(0.10)[]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; DMARC_NA(0.00)[glider.be]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; PRECEDENCE_BULK(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[sea.lore.kernel.org:rdns,sea.lore.kernel.org:helo,glider.be:email]; TAGGED_RCPT(0.00)[clk,renesas]; RCVD_COUNT_FIVE(0.00)[5]; FROM_NEQ_ENVFROM(0.00)[geert@glider.be,linux-sunxi@lists.linux.dev]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; RCPT_COUNT_GT_50(0.00)[78]; FREEMAIL_TO(0.00)[aspeedtech.com,jms.id.au,kernel.org,redhat.com,baylibre.com,codeconstruct.com.au,microchip.com,bootlin.com,tuxon.dev,broadcom.com,socionext.com,gmail.com,google.com,arm.com,lechnology.com,nxp.com,pengutronix.de,crapouillou.net,lunn.ch,mleia.com,sntech.de,samsung.com,linaro.org,foss.st.com,elopez.com.ar,sholland.org,nvidia.com,amd.com]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; TO_DN_SOME(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; R_DKIM_NA(0.00)[]; TAGGED_FROM(0.00)[bounces-25280-noreply=patchwork.local,renesas]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 809CA1C2D2B X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/sunxi/clk-sun4i-tcon-ch1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/sunxi/clk-sun4i-tcon-ch1.c b/drivers/clk/sunxi/clk-sun4i-tcon-ch1.c index b61eba112a7fecf5..b7f55864ea2a519c 100644 --- a/drivers/clk/sunxi/clk-sun4i-tcon-ch1.c +++ b/drivers/clk/sunxi/clk-sun4i-tcon-ch1.c @@ -225,7 +225,7 @@ static void __init tcon_ch1_setup(struct device_node *node) { const char *parents[TCON_CH1_SCLK2_PARENTS]; const char *clk_name = node->name; - struct clk_init_data init; + struct clk_init_data init = {}; struct tcon_ch1_clk *tclk; struct resource res; struct clk *clk; From patchwork Fri Aug 21 08:53:47 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3031 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 5D7D71C0130 for ; Fri, 21 Aug 2026 11:20:31 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25281-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25281-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id A9B8B331D5A8 for ; Fri, 21 Aug 2026 09:05:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B1DC544CADF; Fri, 21 Aug 2026 09:04:04 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AE2EF44BC92; Fri, 21 Aug 2026 09:03:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787303040; cv=none; b=sa37WO8oye0kPNSUX7WeZqnqCBUdWreRQm6T9Bgeo0HV2Ui60zapUq/iCLXl7s01jpdTcd6EPmVxH2wD1dHFUGEYmZvaTDC5gohGwDs2xrLCxuPhFHtnu7sMbFmHJl7TdX1H/OmscmfxtIroSA/tfEtz+ci9Zfo8qdPxnGPUww8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787303040; c=relaxed/simple; bh=h8Ri8mkKo9dGAcjlbUz8O/8rc1h0uDP5AzQLHb0xSgw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FMHTL7hq3MUxINTJekhNDdVhEihQKTLWPASTwtimLYPCmnEo8EdzUcsVlwWhXIH2yU/qPBA/TdR7RvPgtQG1eGB7Z43wKM8GWYJR+9o+Ve+qLbgWa0lxFhvlsjlJvE7TlpH4Ww4YLpnvAYZRNmuKmLJvItRbbVrH1imy0PEvjf8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7E5A1F000E9; Fri, 21 Aug 2026 09:03:29 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 37/45] clk: tegra: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:47 +0200 Message-ID: <1cc7367a121a748dc126f54e1df70a5acebe5914.1787239813.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.66 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; BAD_REP_POLICIES(0.10)[]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; DMARC_NA(0.00)[glider.be]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; PRECEDENCE_BULK(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[glider.be:email,sea.lore.kernel.org:rdns,sea.lore.kernel.org:helo]; TAGGED_RCPT(0.00)[clk,renesas]; RCVD_COUNT_FIVE(0.00)[5]; FROM_NEQ_ENVFROM(0.00)[geert@glider.be,linux-sunxi@lists.linux.dev]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; RCPT_COUNT_GT_50(0.00)[78]; FREEMAIL_TO(0.00)[aspeedtech.com,jms.id.au,kernel.org,redhat.com,baylibre.com,codeconstruct.com.au,microchip.com,bootlin.com,tuxon.dev,broadcom.com,socionext.com,gmail.com,google.com,arm.com,lechnology.com,nxp.com,pengutronix.de,crapouillou.net,lunn.ch,mleia.com,sntech.de,samsung.com,linaro.org,foss.st.com,elopez.com.ar,sholland.org,nvidia.com,amd.com]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; TO_DN_SOME(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; R_DKIM_NA(0.00)[]; TAGGED_FROM(0.00)[bounces-25281-noreply=patchwork.local,renesas]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 5D7D71C0130 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/tegra/clk-audio-sync.c | 2 +- drivers/clk/tegra/clk-divider.c | 2 +- drivers/clk/tegra/clk-periph-fixed.c | 2 +- drivers/clk/tegra/clk-periph-gate.c | 2 +- drivers/clk/tegra/clk-periph.c | 2 +- drivers/clk/tegra/clk-pll-out.c | 2 +- drivers/clk/tegra/clk-pll.c | 2 +- drivers/clk/tegra/clk-sdmmc-mux.c | 2 +- drivers/clk/tegra/clk-super.c | 4 ++-- drivers/clk/tegra/clk-tegra-super-cclk.c | 2 +- drivers/clk/tegra/clk-tegra124-emc.c | 2 +- drivers/clk/tegra/clk-tegra20-emc.c | 2 +- drivers/clk/tegra/clk-tegra210-emc.c | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/clk/tegra/clk-audio-sync.c b/drivers/clk/tegra/clk-audio-sync.c index 0bbfcf46bedd521e..0fb4377c80bf2a04 100644 --- a/drivers/clk/tegra/clk-audio-sync.c +++ b/drivers/clk/tegra/clk-audio-sync.c @@ -47,7 +47,7 @@ struct clk *tegra_clk_register_sync_source(const char *name, unsigned long max_rate) { struct tegra_clk_sync_source *sync; - struct clk_init_data init; + struct clk_init_data init = {}; struct clk *clk; sync = kzalloc_obj(*sync); diff --git a/drivers/clk/tegra/clk-divider.c b/drivers/clk/tegra/clk-divider.c index 27f43c3da1563e92..2dc7713433451754 100644 --- a/drivers/clk/tegra/clk-divider.c +++ b/drivers/clk/tegra/clk-divider.c @@ -145,8 +145,8 @@ struct clk *tegra_clk_register_divider(const char *name, u8 frac_width, spinlock_t *lock) { struct tegra_clk_frac_div *divider; + struct clk_init_data init = {}; struct clk *clk; - struct clk_init_data init; divider = kzalloc_obj(*divider); if (!divider) { diff --git a/drivers/clk/tegra/clk-periph-fixed.c b/drivers/clk/tegra/clk-periph-fixed.c index bb33e32cad4a1732..9ea9d41f47963168 100644 --- a/drivers/clk/tegra/clk-periph-fixed.c +++ b/drivers/clk/tegra/clk-periph-fixed.c @@ -77,7 +77,7 @@ struct clk *tegra_clk_register_periph_fixed(const char *name, { const struct tegra_clk_periph_regs *regs; struct tegra_clk_periph_fixed *fixed; - struct clk_init_data init; + struct clk_init_data init = {}; struct clk *clk; regs = get_reg_bank(num); diff --git a/drivers/clk/tegra/clk-periph-gate.c b/drivers/clk/tegra/clk-periph-gate.c index fa39d64875154efe..d821e1b9f77e6ba3 100644 --- a/drivers/clk/tegra/clk-periph-gate.c +++ b/drivers/clk/tegra/clk-periph-gate.c @@ -139,7 +139,7 @@ struct clk *tegra_clk_register_periph_gate(const char *name, { struct tegra_clk_periph_gate *gate; struct clk *clk; - struct clk_init_data init; + struct clk_init_data init = {}; const struct tegra_clk_periph_regs *pregs; pregs = get_reg_bank(clk_num); diff --git a/drivers/clk/tegra/clk-periph.c b/drivers/clk/tegra/clk-periph.c index 6ebeaa7cb65648e7..7af832d9af9b011f 100644 --- a/drivers/clk/tegra/clk-periph.c +++ b/drivers/clk/tegra/clk-periph.c @@ -166,7 +166,7 @@ static struct clk *_tegra_clk_register_periph(const char *name, unsigned long flags) { struct clk *clk; - struct clk_init_data init; + struct clk_init_data init = {}; const struct tegra_clk_periph_regs *bank; bool div = !(periph->gate.flags & TEGRA_PERIPH_NO_DIV); diff --git a/drivers/clk/tegra/clk-pll-out.c b/drivers/clk/tegra/clk-pll-out.c index 2299545fc386f87b..285b0af811fb1903 100644 --- a/drivers/clk/tegra/clk-pll-out.c +++ b/drivers/clk/tegra/clk-pll-out.c @@ -90,8 +90,8 @@ struct clk *tegra_clk_register_pll_out(const char *name, spinlock_t *lock) { struct tegra_clk_pll_out *pll_out; + struct clk_init_data init = {}; struct clk *clk; - struct clk_init_data init; pll_out = kzalloc_obj(*pll_out); if (!pll_out) diff --git a/drivers/clk/tegra/clk-pll.c b/drivers/clk/tegra/clk-pll.c index adfb74f111ef1afd..fc3abe86414ddd11 100644 --- a/drivers/clk/tegra/clk-pll.c +++ b/drivers/clk/tegra/clk-pll.c @@ -1903,7 +1903,7 @@ static struct clk *_tegra_clk_register_pll(struct tegra_clk_pll *pll, const char *name, const char *parent_name, unsigned long flags, const struct clk_ops *ops) { - struct clk_init_data init; + struct clk_init_data init = {}; init.name = name; init.ops = ops; diff --git a/drivers/clk/tegra/clk-sdmmc-mux.c b/drivers/clk/tegra/clk-sdmmc-mux.c index 14b5439a100a0cef..74fe06fa546abf47 100644 --- a/drivers/clk/tegra/clk-sdmmc-mux.c +++ b/drivers/clk/tegra/clk-sdmmc-mux.c @@ -236,7 +236,7 @@ struct clk *tegra_clk_register_sdmmc_mux_div(const char *name, unsigned long flags, void *lock) { struct clk *clk; - struct clk_init_data init; + struct clk_init_data init = {}; const struct tegra_clk_periph_regs *bank; struct tegra_sdmmc_mux *sdmmc_mux; diff --git a/drivers/clk/tegra/clk-super.c b/drivers/clk/tegra/clk-super.c index 370445e3d5acc34e..7aa3c3774445d32c 100644 --- a/drivers/clk/tegra/clk-super.c +++ b/drivers/clk/tegra/clk-super.c @@ -204,8 +204,8 @@ struct clk *tegra_clk_register_super_mux(const char *name, u8 width, u8 pllx_index, u8 div2_index, spinlock_t *lock) { struct tegra_clk_super_mux *super; + struct clk_init_data init = {}; struct clk *clk; - struct clk_init_data init; super = kzalloc_obj(*super); if (!super) @@ -240,8 +240,8 @@ struct clk *tegra_clk_register_super_clk(const char *name, spinlock_t *lock) { struct tegra_clk_super_mux *super; + struct clk_init_data init = {}; struct clk *clk; - struct clk_init_data init; super = kzalloc_obj(*super); if (!super) diff --git a/drivers/clk/tegra/clk-tegra-super-cclk.c b/drivers/clk/tegra/clk-tegra-super-cclk.c index e7aeb67606b11390..1047a1104ec1f5d7 100644 --- a/drivers/clk/tegra/clk-tegra-super-cclk.c +++ b/drivers/clk/tegra/clk-tegra-super-cclk.c @@ -135,8 +135,8 @@ struct clk *tegra_clk_register_super_cclk(const char *name, spinlock_t *lock) { struct tegra_clk_super_mux *super; + struct clk_init_data init = {}; struct clk *clk; - struct clk_init_data init; u32 val; if (WARN_ON(cclk_super)) diff --git a/drivers/clk/tegra/clk-tegra124-emc.c b/drivers/clk/tegra/clk-tegra124-emc.c index 94ac24ea1e6adc37..0fc74808fe39b2f7 100644 --- a/drivers/clk/tegra/clk-tegra124-emc.c +++ b/drivers/clk/tegra/clk-tegra124-emc.c @@ -485,8 +485,8 @@ static const struct clk_ops tegra_clk_emc_ops = { struct clk *tegra124_clk_register_emc(void __iomem *base, struct device_node *np, spinlock_t *lock) { + struct clk_init_data init = {}; struct tegra_clk_emc *tegra; - struct clk_init_data init; struct device_node *node; u32 node_ram_code; struct clk *clk; diff --git a/drivers/clk/tegra/clk-tegra20-emc.c b/drivers/clk/tegra/clk-tegra20-emc.c index 44465726a8a67005..5cd026e8f305a35a 100644 --- a/drivers/clk/tegra/clk-tegra20-emc.c +++ b/drivers/clk/tegra/clk-tegra20-emc.c @@ -245,8 +245,8 @@ bool tegra20_clk_emc_driver_available(struct clk_hw *emc_hw) struct clk *tegra20_clk_register_emc(void __iomem *ioaddr, bool low_jitter) { + struct clk_init_data init = {}; struct tegra_clk_emc *emc; - struct clk_init_data init; struct clk *clk; emc = kzalloc_obj(*emc); diff --git a/drivers/clk/tegra/clk-tegra210-emc.c b/drivers/clk/tegra/clk-tegra210-emc.c index 9f140d94bef75560..2e559d95d40e7d50 100644 --- a/drivers/clk/tegra/clk-tegra210-emc.c +++ b/drivers/clk/tegra/clk-tegra210-emc.c @@ -274,8 +274,8 @@ static const struct clk_ops tegra210_clk_emc_ops = { struct clk *tegra210_clk_register_emc(struct device_node *np, void __iomem *regs) { + struct clk_init_data init = {}; struct tegra210_clk_emc *emc; - struct clk_init_data init; struct clk *clk; emc = kzalloc_obj(*emc); From patchwork Fri Aug 21 08:53:48 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3046 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 243231C0126 for ; Fri, 21 Aug 2026 14:09:32 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25282-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25282-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 7D65333358D5 for ; Fri, 21 Aug 2026 09:05:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 852B746AF2F; Fri, 21 Aug 2026 09:04:17 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D947443AAB; Fri, 21 Aug 2026 09:04:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787303054; cv=none; b=E1RCKk2BYgKYc2GKh64AOrRoKcvx10zyS1Ihm6eS5GufR8bHHgFj9mEiI7kpH3Eyzn/7cixj4gbck7wpb3HU5m/fm0jJTiLKVK3F3EOPllRco9IkYMNrq7/hstFBqITVeY+EXxm4Cm1VsBl3waZbpWiqN95ZpWE9Ihw2muwJzCw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787303054; c=relaxed/simple; bh=0XNoe8YYLRaiChkh1AeHhGc8IS+4qTNW4ytFG4ucjf8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uJEe7a8qmNBRTVCQ1rpyEjpooz0CwcL+Fqitzls3p5xWTE0fSpBRCwgs9tRP01C1+PlJ6ZHDkTdZXDsX0kTMWwUgWtaCqI9iXI8E5rY6wQcdogRuEvFp6A9SCcNCsVeNAbnWKaQAUm28BKSOKMQ9LqYV1aW22oaBt5kshYbVbhc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C869B1F00A3A; Fri, 21 Aug 2026 09:03:44 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 38/45] clk: uniphier: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:48 +0200 Message-ID: <491e41d759cec667d6bcd742673e1fec70b4bc31.1787239813.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [3.84 / 15.00]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; PRECEDENCE_BULK(0.00)[]; DMARC_NA(0.00)[glider.be]; RCVD_COUNT_FIVE(0.00)[5]; TAGGED_RCPT(0.00)[clk,renesas]; DBL_BLOCKED_OPENRESOLVER(0.00)[glider.be:email,sea.lore.kernel.org:rdns,sea.lore.kernel.org:helo]; FROM_NEQ_ENVFROM(0.00)[geert@glider.be,linux-sunxi@lists.linux.dev]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; TAGGED_FROM(0.00)[bounces-25282-noreply=patchwork.local,renesas]; RCPT_COUNT_GT_50(0.00)[78]; FREEMAIL_TO(0.00)[aspeedtech.com,jms.id.au,kernel.org,redhat.com,baylibre.com,codeconstruct.com.au,microchip.com,bootlin.com,tuxon.dev,broadcom.com,socionext.com,gmail.com,google.com,arm.com,lechnology.com,nxp.com,pengutronix.de,crapouillou.net,lunn.ch,mleia.com,sntech.de,samsung.com,linaro.org,foss.st.com,elopez.com.ar,sholland.org,nvidia.com,amd.com]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; TO_DN_SOME(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 243231C0126 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/uniphier/clk-uniphier-cpugear.c | 2 +- drivers/clk/uniphier/clk-uniphier-fixed-factor.c | 2 +- drivers/clk/uniphier/clk-uniphier-fixed-rate.c | 2 +- drivers/clk/uniphier/clk-uniphier-gate.c | 2 +- drivers/clk/uniphier/clk-uniphier-mux.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/clk/uniphier/clk-uniphier-cpugear.c b/drivers/clk/uniphier/clk-uniphier-cpugear.c index a2f01a4da1276903..165c6832b722faa9 100644 --- a/drivers/clk/uniphier/clk-uniphier-cpugear.c +++ b/drivers/clk/uniphier/clk-uniphier-cpugear.c @@ -79,7 +79,7 @@ struct clk_hw *uniphier_clk_register_cpugear(struct device *dev, const struct uniphier_clk_cpugear_data *data) { struct uniphier_clk_cpugear *gear; - struct clk_init_data init; + struct clk_init_data init = {}; int ret; gear = devm_kzalloc(dev, sizeof(*gear), GFP_KERNEL); diff --git a/drivers/clk/uniphier/clk-uniphier-fixed-factor.c b/drivers/clk/uniphier/clk-uniphier-fixed-factor.c index a6a37a6bca3ab047..c86683fce20549d9 100644 --- a/drivers/clk/uniphier/clk-uniphier-fixed-factor.c +++ b/drivers/clk/uniphier/clk-uniphier-fixed-factor.c @@ -13,8 +13,8 @@ struct clk_hw *uniphier_clk_register_fixed_factor(struct device *dev, const char *name, const struct uniphier_clk_fixed_factor_data *data) { + struct clk_init_data init = {}; struct clk_fixed_factor *fix; - struct clk_init_data init; int ret; fix = devm_kzalloc(dev, sizeof(*fix), GFP_KERNEL); diff --git a/drivers/clk/uniphier/clk-uniphier-fixed-rate.c b/drivers/clk/uniphier/clk-uniphier-fixed-rate.c index 3bc55ab75314bf8d..63f49d3bab80bae8 100644 --- a/drivers/clk/uniphier/clk-uniphier-fixed-rate.c +++ b/drivers/clk/uniphier/clk-uniphier-fixed-rate.c @@ -13,8 +13,8 @@ struct clk_hw *uniphier_clk_register_fixed_rate(struct device *dev, const char *name, const struct uniphier_clk_fixed_rate_data *data) { + struct clk_init_data init = {}; struct clk_fixed_rate *fixed; - struct clk_init_data init; int ret; /* allocate fixed-rate clock */ diff --git a/drivers/clk/uniphier/clk-uniphier-gate.c b/drivers/clk/uniphier/clk-uniphier-gate.c index e58093e79dd7dc23..9f49e6bb6b2042f7 100644 --- a/drivers/clk/uniphier/clk-uniphier-gate.c +++ b/drivers/clk/uniphier/clk-uniphier-gate.c @@ -61,8 +61,8 @@ struct clk_hw *uniphier_clk_register_gate(struct device *dev, const char *name, const struct uniphier_clk_gate_data *data) { + struct clk_init_data init = {}; struct uniphier_clk_gate *gate; - struct clk_init_data init; int ret; gate = devm_kzalloc(dev, sizeof(*gate), GFP_KERNEL); diff --git a/drivers/clk/uniphier/clk-uniphier-mux.c b/drivers/clk/uniphier/clk-uniphier-mux.c index 1998e9d4cfc0224a..a63ad4df8e65ebcf 100644 --- a/drivers/clk/uniphier/clk-uniphier-mux.c +++ b/drivers/clk/uniphier/clk-uniphier-mux.c @@ -58,8 +58,8 @@ struct clk_hw *uniphier_clk_register_mux(struct device *dev, const char *name, const struct uniphier_clk_mux_data *data) { + struct clk_init_data init = {}; struct uniphier_clk_mux *mux; - struct clk_init_data init; int ret; mux = devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL); From patchwork Fri Aug 21 08:53:49 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3027 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mxe881.netcup.net (Postfix) with ESMTPS id 80CB11C0130 for ; Fri, 21 Aug 2026 11:16:05 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.105.105.114) smtp.mailfrom=linux-sunxi+bounces-25283-noreply=patchwork.local@lists.linux.dev smtp.helo=tor.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.105.105.114 as permitted sender) client-ip=172.105.105.114; envelope-from=linux-sunxi+bounces-25283-noreply=patchwork.local@lists.linux.dev; helo=tor.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by tor.lore.kernel.org (Postfix) with ESMTP id 4E8AB30D67F6 for ; Fri, 21 Aug 2026 09:05:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 33841471CE1; Fri, 21 Aug 2026 09:04:24 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5040D46F484; Fri, 21 Aug 2026 09:04:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787303063; cv=none; b=I9sZJ4wlJ6En6vINkv/hXxU3hB5b9F1f1CP14GpYtoKc2iT33OqKxHuQpniibkai8KtDfPK+r3+zoHCtA+cjCNQIqH8PplwUCxBXTCUiXj4jKD66weYG2y6ZOFtFCFh4miI7VqgoQh+pQdTHjxbL3LXVJsTEiazMOhMxu531KIM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787303063; c=relaxed/simple; bh=gVJVCDzrVmaJcjsPZPsyq62FV4vugRe0L+ADl3J+7yM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=L2FETemIn3jpxc1WvYR6aXnnt2Zqrw3YMolTPgZMfiFm7VnMFCyQUrkzd1BUz/7Kdj0UhmlOsNNO7KzW7T71I2iqTZg6i48cQlEeQ0TSbIJK2pIXHFeUPumA70mZmolqH08Ksj6zCbJu1zarFBKVKFa6ITDxgAiEDRDLs43g7YY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D49841F00A3E; Fri, 21 Aug 2026 09:03:59 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 39/45] clk: ux500: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:49 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 Acked-by: Linus Walleij --- Compile-tested only. --- drivers/clk/ux500/clk-prcc.c | 2 +- drivers/clk/ux500/clk-prcmu.c | 4 ++-- drivers/clk/ux500/clk-sysctrl.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/ux500/clk-prcc.c b/drivers/clk/ux500/clk-prcc.c index dce235df2576dfb2..dde72d2fd0ac67ae 100644 --- a/drivers/clk/ux500/clk-prcc.c +++ b/drivers/clk/ux500/clk-prcc.c @@ -97,8 +97,8 @@ static struct clk *clk_reg_prcc(const char *name, unsigned long flags, const struct clk_ops *clk_prcc_ops) { + struct clk_init_data clk_prcc_init = {}; struct clk_prcc *clk; - struct clk_init_data clk_prcc_init; struct clk *clk_reg; if (!name) { diff --git a/drivers/clk/ux500/clk-prcmu.c b/drivers/clk/ux500/clk-prcmu.c index ac96c46bd1bbf76b..d89f3b634f8bbd26 100644 --- a/drivers/clk/ux500/clk-prcmu.c +++ b/drivers/clk/ux500/clk-prcmu.c @@ -200,8 +200,8 @@ static struct clk_hw *clk_reg_prcmu(const char *name, unsigned long flags, const struct clk_ops *clk_prcmu_ops) { + struct clk_init_data clk_prcmu_init = {}; struct clk_prcmu *clk; - struct clk_init_data clk_prcmu_init; int ret; if (!name) { @@ -357,8 +357,8 @@ struct clk_hw *clk_reg_prcmu_clkout(const char *name, u8 source, u8 divider) { + struct clk_init_data clk_prcmu_clkout_init = {}; struct clk_prcmu_clkout *clk; - struct clk_init_data clk_prcmu_clkout_init; u8 clkout_id; int ret; diff --git a/drivers/clk/ux500/clk-sysctrl.c b/drivers/clk/ux500/clk-sysctrl.c index ba3258c88d28e101..2127a949e56ccf27 100644 --- a/drivers/clk/ux500/clk-sysctrl.c +++ b/drivers/clk/ux500/clk-sysctrl.c @@ -127,8 +127,8 @@ static struct clk *clk_reg_sysctrl(struct device *dev, unsigned long flags, const struct clk_ops *clk_sysctrl_ops) { + struct clk_init_data clk_sysctrl_init = {}; struct clk_sysctrl *clk; - struct clk_init_data clk_sysctrl_init; struct clk *clk_reg; int i; From patchwork Fri Aug 21 08:53:50 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3032 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mxe881.netcup.net (Postfix) with ESMTPS id AF9731C0768 for ; Fri, 21 Aug 2026 11:21:52 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.105.105.114) smtp.mailfrom=linux-sunxi+bounces-25284-noreply=patchwork.local@lists.linux.dev smtp.helo=tor.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.105.105.114 as permitted sender) client-ip=172.105.105.114; envelope-from=linux-sunxi+bounces-25284-noreply=patchwork.local@lists.linux.dev; helo=tor.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by tor.lore.kernel.org (Postfix) with ESMTP id CBC1930FAF5F for ; Fri, 21 Aug 2026 09:06:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BB2E547013C; Fri, 21 Aug 2026 09:04:46 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C150546C82A; Fri, 21 Aug 2026 09:04:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787303085; cv=none; b=ckFHKdywq8VJciSk24U2DxWdXm0nPqP2AJk3+ttbkuwCMR2UfUJd/RDiCXgasZO/Jnes43ck1+5Gq5taCRZ7oyx+eRXZV7aR4GiRSihzaOLglbbbOgmpW3MMQTyX4ANRMJynD2bKpy9/FMYnCu86jJcftsQfZWOg/1Nbgx9751c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787303085; c=relaxed/simple; bh=bz0Q5cxU+XpN4bR/II11/oeb7Q0jJpY2bGDeu5jnV6Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AQEMOVNMoP99OQF4Ft5j77Ml8PBhtHuSI7RefSotAXLnL30LeRt4Wb5kcsvdipuVScPDN+0YhXspZmK1KPcUr9Z1DUBW7xj8sY0OqcnDfO6mhVdwuL9yc9pMzmci5D6F7IlPPv8AOP6BQeNHyUYaRAwIgAKH3LNpS8EodDYF9yQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBE701F000E9; Fri, 21 Aug 2026 09:04:14 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 40/45] clk: versatile: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:50 +0200 Message-ID: <7c480e73222bb51982fb82dc0cc6cd503f2e8b92.1787239813.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 Reviewed-by: Liviu Dudau --- 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; From patchwork Fri Aug 21 08:53:51 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3042 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 184651C3BCC for ; Fri, 21 Aug 2026 11:34:47 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25285-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25285-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id CD9993203B22 for ; Fri, 21 Aug 2026 09:06:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E08ED3D9042; Fri, 21 Aug 2026 09:05:01 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 460BD44213B; Fri, 21 Aug 2026 09:04:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787303099; cv=none; b=EnvW6KLSnU+4528HCPOb+ye77yr9bNw6leAnCmF+8udiyegEOImE0jEG8zl1OfvM0nC/9PHkcwPYPeNAWQK1Zu5mTjNxMLv1C53Cqd+Riv71bWY/5Dfn7fz8j2c8OZhgOtJxJmuLmePt3ekLxcDaPepUXqNGekEQMok6NpjMN2k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787303099; c=relaxed/simple; bh=vbctB0qK/J+nvcjUV8nkKn1D3Pdx7Wv87SuwWXVFo3A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fHwGyue4ucyOqoCCRK7A4v+9E02I1yIGyWv3QbM8geg29YVfhooC2KE4wf1eU20toUdQyqXajenUm3Hh/WC83rX/6OAroWGcnb0n0LniXPZoATWy9uXksmVSC6IPNwg7B2H93hfAiibpkG4fLWrvJmlVWC41TGtlvho+kmLU3QM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 098391F00A3D; Fri, 21 Aug 2026 09:04:29 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 41/45] clk: vt8500: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:51 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/clk-vt8500.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/clk-vt8500.c b/drivers/clk/clk-vt8500.c index 3e62cb853d5e90e7..581ac00c31bc0448 100644 --- a/drivers/clk/clk-vt8500.c +++ b/drivers/clk/clk-vt8500.c @@ -227,8 +227,8 @@ static __init void vtwm_device_clk_init(struct device_node *node) struct clk_hw *hw; struct clk_device *dev_clk; const char *clk_name = node->name; + struct clk_init_data init = {}; const char *parent_name; - struct clk_init_data init; int rc; int clk_init_flags = 0; @@ -687,8 +687,8 @@ static __init void vtwm_pll_clk_init(struct device_node *node, int pll_type) struct clk_hw *hw; struct clk_pll *pll_clk; const char *clk_name = node->name; + struct clk_init_data init = {}; const char *parent_name; - struct clk_init_data init; int rc; if (!pmc_base) From patchwork Fri Aug 21 08:53:52 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3033 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 9B3081C05B2 for ; Fri, 21 Aug 2026 11:23:43 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25286-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25286-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 3BAF333845E5 for ; Fri, 21 Aug 2026 09:07:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CD44545C6EE; Fri, 21 Aug 2026 09:05:11 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EAE733D9DA8; Fri, 21 Aug 2026 09:05:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787303109; cv=none; b=diR2urgcItQGU8AscaZ1K3AOKBvtAfHE+cBpC0B8OT83pwqoTOTqeZQTeWYEswr0pBqrWWQxn1UCaejlKG3sOhNfak9zdY3yna/52ZrQpa1yuCPP/LxbDzJaU4saUs9vZarR4cB61pcNQque5IM3Qi7vrnPDfN17sBSBKVZyfyw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787303109; c=relaxed/simple; bh=Wc0izlKtUAJ+rw36rxVafdeVDmdPA62+dk92XNLZ9mg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=X7FBz8rOtJhnO2aQ5oU/qZBFpFhqgsTyyNreywmj4Vqg3FbKGxZ+qa58bsG3+0CdXyWMSijRPDv4j/bza2nx6TkoE2Ps47Cq1rH0VQPMxF9z6oLdy/G1Qcld7K82QNCDTgCMLpM6i7KKTIesKTtWrrt7MC2Y791zbRNrhuwQsts= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1CAB41F00A3E; Fri, 21 Aug 2026 09:04:44 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 42/45] clk: x86: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:52 +0200 Message-ID: <2d1690a6966152450bda8e8b1e6f5fe2c1df1610.1787239813.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.66 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; DMARC_NA(0.00)[glider.be]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; FROM_HAS_DN(0.00)[]; PRECEDENCE_BULK(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[sea.lore.kernel.org:rdns,sea.lore.kernel.org:helo,glider.be:email]; TAGGED_RCPT(0.00)[clk,renesas]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; FROM_NEQ_ENVFROM(0.00)[geert@glider.be,linux-sunxi@lists.linux.dev]; RCPT_COUNT_GT_50(0.00)[78]; FREEMAIL_TO(0.00)[aspeedtech.com,jms.id.au,kernel.org,redhat.com,baylibre.com,codeconstruct.com.au,microchip.com,bootlin.com,tuxon.dev,broadcom.com,socionext.com,gmail.com,google.com,arm.com,lechnology.com,nxp.com,pengutronix.de,crapouillou.net,lunn.ch,mleia.com,sntech.de,samsung.com,linaro.org,foss.st.com,elopez.com.ar,sholland.org,nvidia.com,amd.com]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10:c]; TO_DN_SOME(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; RCVD_TLS_LAST(0.00)[]; TAGGED_FROM(0.00)[bounces-25286-noreply=patchwork.local,renesas]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 9B3081C05B2 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/x86/clk-pmc-atom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/x86/clk-pmc-atom.c b/drivers/clk/x86/clk-pmc-atom.c index 08c83e0abc41d942..43dda274e329d19e 100644 --- a/drivers/clk/x86/clk-pmc-atom.c +++ b/drivers/clk/x86/clk-pmc-atom.c @@ -151,8 +151,8 @@ static struct clk_plt *plt_clk_register(struct platform_device *pdev, int id, const char **parent_names, int num_parents) { + struct clk_init_data init = {}; struct clk_plt *pclk; - struct clk_init_data init; int ret; pclk = devm_kzalloc(&pdev->dev, sizeof(*pclk), GFP_KERNEL); From patchwork Fri Aug 21 08:53:53 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3028 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mxe881.netcup.net (Postfix) with ESMTPS id DF45F1C08B0 for ; Fri, 21 Aug 2026 11:17:00 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.105.105.114) smtp.mailfrom=linux-sunxi+bounces-25287-noreply=patchwork.local@lists.linux.dev smtp.helo=tor.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.105.105.114 as permitted sender) client-ip=172.105.105.114; envelope-from=linux-sunxi+bounces-25287-noreply=patchwork.local@lists.linux.dev; helo=tor.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by tor.lore.kernel.org (Postfix) with ESMTP id B164031E9CFB for ; Fri, 21 Aug 2026 09:07:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A52083C8737; Fri, 21 Aug 2026 09:05:36 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19BC84657FD; Fri, 21 Aug 2026 09:05:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787303132; cv=none; b=AA6l7yTcMYJJehiELHcGnKC/kmR8UI5/uF4s3kThPIxgCrrTvyrgP0fMZINDbTzoecPi45o4aSIMm8i0SjVXdGKa5tMKM1HEwPpHc+bIzqIP07iS+L3zIdSrprUY0M+EtzkEM8699on8wbo3k77cqzawfkmmP3dCjQTA9G94pG4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787303132; c=relaxed/simple; bh=ZP4TCSgQ928K3ru+J0R6/VrN2bom1Qw+9UEerC2IGzM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=R6u1j/An5g679AE+NdvL1lpE30idyLLq210GKeFEU0g0omMJ49gVQL3BVrGwK42nT0qQUGTmAC+nQbsUx+jNS+4WpjOIzztN5849GvPmT1XW/PLG+LsSCXcbqZz7QdiaWGiqAB1wumISvdc/iC5V9AWdrmzoCq9MshPrNSl1m40= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 329421F00A3A; Fri, 21 Aug 2026 09:05:00 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 43/45] clk: xgene: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:53 +0200 Message-ID: <21374aa8a23b8a72746030eda9e67f6ca3dc37e3.1787239813.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.66 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.105.105.114:from]; SUSPICIOUS_RECIPS(1.50)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; BAD_REP_POLICIES(0.10)[]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; DMARC_NA(0.00)[glider.be]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; FROM_HAS_DN(0.00)[]; PRECEDENCE_BULK(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[glider.be:email,tor.lore.kernel.org:rdns,tor.lore.kernel.org:helo]; TAGGED_RCPT(0.00)[clk,renesas]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; FROM_NEQ_ENVFROM(0.00)[geert@glider.be,linux-sunxi@lists.linux.dev]; RCPT_COUNT_GT_50(0.00)[78]; FREEMAIL_TO(0.00)[aspeedtech.com,jms.id.au,kernel.org,redhat.com,baylibre.com,codeconstruct.com.au,microchip.com,bootlin.com,tuxon.dev,broadcom.com,socionext.com,gmail.com,google.com,arm.com,lechnology.com,nxp.com,pengutronix.de,crapouillou.net,lunn.ch,mleia.com,sntech.de,samsung.com,linaro.org,foss.st.com,elopez.com.ar,sholland.org,nvidia.com,amd.com]; R_SPF_ALLOW(0.00)[+ip4:172.105.105.114]; TO_DN_SOME(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:63949, ipnet:172.105.96.0/20, country:SG]; RCVD_TLS_LAST(0.00)[]; TAGGED_FROM(0.00)[bounces-25287-noreply=patchwork.local,renesas]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: DF45F1C08B0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/clk-xgene.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/clk-xgene.c b/drivers/clk/clk-xgene.c index c9e371fce0939771..5cf015da49ad336e 100644 --- a/drivers/clk/clk-xgene.c +++ b/drivers/clk/clk-xgene.c @@ -126,9 +126,9 @@ static struct clk *xgene_register_clk_pll(struct device *dev, unsigned long flags, void __iomem *reg, u32 pll_offset, u32 type, spinlock_t *lock, int version) { + struct clk_init_data init = {}; struct xgene_clk_pll *apmclk; struct clk *clk; - struct clk_init_data init; /* allocate the APM clock structure */ apmclk = kzalloc_obj(*apmclk); @@ -351,8 +351,8 @@ xgene_register_clk_pmd(struct device *dev, unsigned long flags, void __iomem *reg, u8 shift, u8 width, u64 denom, u32 clk_flags, spinlock_t *lock) { + struct clk_init_data init = {}; struct xgene_clk_pmd *fd; - struct clk_init_data init; struct clk *clk; fd = kzalloc_obj(*fd); @@ -635,9 +635,9 @@ static struct clk *xgene_register_clk(struct device *dev, const char *name, const char *parent_name, struct xgene_dev_parameters *parameters, spinlock_t *lock) { + struct clk_init_data init = {}; struct xgene_clk *apmclk; struct clk *clk; - struct clk_init_data init; int rc; /* allocate the APM clock structure */ From patchwork Fri Aug 21 08:53:54 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3043 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id B2DE21C3BCC for ; Fri, 21 Aug 2026 11:35:34 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25288-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25288-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 860583210C94 for ; Fri, 21 Aug 2026 09:07:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 955BF471CF3; Fri, 21 Aug 2026 09:05:42 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A42B0459AD2; Fri, 21 Aug 2026 09:05:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787303141; cv=none; b=mfq0Va92wdnKCM3hdNpwRJLGQ6SPi7ZgoS0DOJihv6RPNkA4Up3lPaEGNwBIuKoGTSva5jLjQV87ckBuI6+HSb0+7bbqpZNvytwJ1TtRlcbvP31KRPNbk7r9FHRQkkS2RZ+zqRwvXcigGF3zybb4mcdhBaXnowdq7yRuSKAKLU0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787303141; c=relaxed/simple; bh=+BVlAa7MYb3cmX6bSuuUtFgSVUtNtjAdNHxnMN1FfW8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YqDV7k/H75Blhmg4jG0ma+4DVM+YpuxronVsUOqJ0Gb3UJOEGjGIUpT4uoYmhTvvSTDcDozqZiCMpraTIBVcd+OHBBgQymmPeY66OyvtKgYzcm1fxAeRk5SsTWogSOtpjwvjamPVXtlRAPrtIYx0c3sl+UaXxSu9sDUvrApEynU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 437761F00A3E; Fri, 21 Aug 2026 09:05:15 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 44/45] clk: xilinx: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:54 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.66 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; BAD_REP_POLICIES(0.10)[]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; DMARC_NA(0.00)[glider.be]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; PRECEDENCE_BULK(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[glider.be:email,sea.lore.kernel.org:rdns,sea.lore.kernel.org:helo]; TAGGED_RCPT(0.00)[clk,renesas]; RCVD_COUNT_FIVE(0.00)[5]; FROM_NEQ_ENVFROM(0.00)[geert@glider.be,linux-sunxi@lists.linux.dev]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; RCPT_COUNT_GT_50(0.00)[78]; FREEMAIL_TO(0.00)[aspeedtech.com,jms.id.au,kernel.org,redhat.com,baylibre.com,codeconstruct.com.au,microchip.com,bootlin.com,tuxon.dev,broadcom.com,socionext.com,gmail.com,google.com,arm.com,lechnology.com,nxp.com,pengutronix.de,crapouillou.net,lunn.ch,mleia.com,sntech.de,samsung.com,linaro.org,foss.st.com,elopez.com.ar,sholland.org,nvidia.com,amd.com]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; TO_DN_SOME(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; R_DKIM_NA(0.00)[]; TAGGED_FROM(0.00)[bounces-25288-noreply=patchwork.local,renesas]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: B2DE21C3BCC X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/xilinx/clk-xlnx-clock-wizard.c | 6 +++--- drivers/clk/xilinx/xlnx_vcu.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/xilinx/clk-xlnx-clock-wizard.c b/drivers/clk/xilinx/clk-xlnx-clock-wizard.c index edf8c0eaca27cab4..4e5b9cb3754b9a18 100644 --- a/drivers/clk/xilinx/clk-xlnx-clock-wizard.c +++ b/drivers/clk/xilinx/clk-xlnx-clock-wizard.c @@ -936,9 +936,9 @@ static struct clk_hw *clk_wzrd_register_divf(struct device *dev, u32 div_type, spinlock_t *lock) { + struct clk_init_data init = {}; struct clk_wzrd_divider *div; struct clk_hw *hw; - struct clk_init_data init; int ret; div = devm_kzalloc(dev, sizeof(*div), GFP_KERNEL); @@ -980,9 +980,9 @@ static struct clk_hw *clk_wzrd_ver_register_divider(struct device *dev, u32 div_type, spinlock_t *lock) { + struct clk_init_data init = {}; struct clk_wzrd_divider *div; struct clk_hw *hw; - struct clk_init_data init; int ret; div = devm_kzalloc(dev, sizeof(*div), GFP_KERNEL); @@ -1026,9 +1026,9 @@ static struct clk_hw *clk_wzrd_register_divider(struct device *dev, u32 div_type, spinlock_t *lock) { + struct clk_init_data init = {}; struct clk_wzrd_divider *div; struct clk_hw *hw; - struct clk_init_data init; int ret; div = devm_kzalloc(dev, sizeof(*div), GFP_KERNEL); diff --git a/drivers/clk/xilinx/xlnx_vcu.c b/drivers/clk/xilinx/xlnx_vcu.c index f14bda375e353e6a..ccd9d7c0b18098a5 100644 --- a/drivers/clk/xilinx/xlnx_vcu.c +++ b/drivers/clk/xilinx/xlnx_vcu.c @@ -406,9 +406,9 @@ static struct clk_hw *xvcu_register_pll(struct device *dev, const char *name, const char *parent, unsigned long flags) { + struct clk_init_data init = {}; struct vcu_pll *pll; struct clk_hw *hw; - struct clk_init_data init; int ret; init.name = name; From patchwork Fri Aug 21 08:53:55 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3020 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mxe881.netcup.net (Postfix) with ESMTPS id E1BB91C0130 for ; Fri, 21 Aug 2026 11:08:01 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 104.64.211.4) smtp.mailfrom=linux-sunxi+bounces-25289-noreply=patchwork.local@lists.linux.dev smtp.helo=sin.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 104.64.211.4 as permitted sender) client-ip=104.64.211.4; envelope-from=linux-sunxi+bounces-25289-noreply=patchwork.local@lists.linux.dev; helo=sin.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sin.lore.kernel.org (Postfix) with ESMTP id 24F05301ACBD for ; Fri, 21 Aug 2026 09:07:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 815E147279B; Fri, 21 Aug 2026 09:05:56 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC55845A2AD; Fri, 21 Aug 2026 09:05:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787303154; cv=none; b=oV+v08feGlhzxBevHr108s1OgTEz+iLP3/iWFRb5ZL1+K3K5ZgrKcVUGB/MXIehHAM7hzTatP1fOMMfNve7gKrB6BY4PaqVfjORXBsGZjVbRLgzO0jBPPimA9D0bacJZdNWQcPSopcBACE367D5ROrj93u2GRn/RowYcu5GHkhg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787303154; c=relaxed/simple; bh=BoVDFLjm3qmryxpWKKtPiB9xGLwmcZ8bdHtjqA34dYQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rRL7+mmiS5ceIHiEQj9rH6TOU9bd11/V60QxzEudxf56JRbvrevGpPPTGv04UTpfQp6Ys7FXrP/6cJObGZef9SI/MxYQmhdGoW30/R6cMMuChh0cMyE4nfwROb3do3mtvksGHAC4or+4Zmu8vheT2QqyUiRtWn3Xi+3txLCZwgw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5598F1F000E9; Fri, 21 Aug 2026 09:05:30 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@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, Geert Uytterhoeven Subject: [PATCH 45/45] clk: zynqmp: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:55 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 --- Compile-tested only. --- drivers/clk/zynqmp/clk-gate-zynqmp.c | 2 +- drivers/clk/zynqmp/clk-mux-zynqmp.c | 2 +- drivers/clk/zynqmp/divider.c | 2 +- drivers/clk/zynqmp/pll.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/zynqmp/clk-gate-zynqmp.c b/drivers/clk/zynqmp/clk-gate-zynqmp.c index db10eb69f3fe01a5..1a462af7b8ea3efa 100644 --- a/drivers/clk/zynqmp/clk-gate-zynqmp.c +++ b/drivers/clk/zynqmp/clk-gate-zynqmp.c @@ -109,10 +109,10 @@ struct clk_hw *zynqmp_clk_register_gate(const char *name, u32 clk_id, u8 num_parents, const struct clock_topology *nodes) { + struct clk_init_data init = {}; struct zynqmp_clk_gate *gate; struct clk_hw *hw; int ret; - struct clk_init_data init; /* allocate the gate */ gate = kzalloc_obj(*gate); diff --git a/drivers/clk/zynqmp/clk-mux-zynqmp.c b/drivers/clk/zynqmp/clk-mux-zynqmp.c index e37bd3516974c1ee..79509e387b51fe40 100644 --- a/drivers/clk/zynqmp/clk-mux-zynqmp.c +++ b/drivers/clk/zynqmp/clk-mux-zynqmp.c @@ -133,9 +133,9 @@ struct clk_hw *zynqmp_clk_register_mux(const char *name, u32 clk_id, u8 num_parents, const struct clock_topology *nodes) { + struct clk_init_data init = {}; struct zynqmp_clk_mux *mux; struct clk_hw *hw; - struct clk_init_data init; int ret; mux = kzalloc_obj(*mux); diff --git a/drivers/clk/zynqmp/divider.c b/drivers/clk/zynqmp/divider.c index 4075f6ecf076a8e6..3eabd1cf211ddba3 100644 --- a/drivers/clk/zynqmp/divider.c +++ b/drivers/clk/zynqmp/divider.c @@ -278,9 +278,9 @@ struct clk_hw *zynqmp_clk_register_divider(const char *name, u8 num_parents, const struct clock_topology *nodes) { + struct clk_init_data init = {}; struct zynqmp_clk_divider *div; struct clk_hw *hw; - struct clk_init_data init; int ret; /* allocate the divider */ diff --git a/drivers/clk/zynqmp/pll.c b/drivers/clk/zynqmp/pll.c index 6463787cf57b6018..6158386ca743d1f8 100644 --- a/drivers/clk/zynqmp/pll.c +++ b/drivers/clk/zynqmp/pll.c @@ -313,9 +313,9 @@ struct clk_hw *zynqmp_clk_register_pll(const char *name, u32 clk_id, u8 num_parents, const struct clock_topology *nodes) { + struct clk_init_data init = {}; struct zynqmp_pll *pll; struct clk_hw *hw; - struct clk_init_data init; int ret; init.name = name;