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: 2289436 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4768-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDdZ57jRz1xv6 for ; Fri, 21 Aug 2026 18:54:42 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDdW44D9z2xtt; Fri, 21 Aug 2026 18:54:39 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2600:3c04:e001:324:0:1991:8:25" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302479; cv=none; b=JX8z3B84oCb0i5mvRQGC7sLHujkj/6HiiKptOEo5gqVhAvIAC2mE3RFiHAQ1AQTZiSJGln3tpm6BM2s8h0QtBO6UmXiqfJ0/sFKUP3mLc/gJvRTD/X3HhG6/E7vmLu14ptmUnZLN7X4FcWWJHklI1CsMM4WVjS0ottVULZyRMqfC5UNLue5yZbes+AnDXM6SbmevoQWzIkLwk9s209oVm0pVzDbX1bTEsIiyeX81s9GGAyOJdZryhlFBA+NWxpFAf1ByHJ9mdtx+10YdT5mmFDZorIhPc0wy58uChXKl2vF1vtXhZipFNz0yXRnfW6cUua6EYdKpirWtPofQMbseCQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302479; c=relaxed/relaxed; bh=PrbSSJ1d4krtUolL+zTiLj6OtGD97z0Wbhmsrg2tO7Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Tfa9ZC1FlFQI7n8twSx0PSE+f4lQfSFwcIcvZPXFZAczx5tf8EOlMJ4qwGM8W0OqCH2kRp2LS30YWWo3SseG8yaBg4bfbqWbfUwLm4ImPW4UEQRUXcJcRWwZIr1o1m02jIgeE9UOiuKrmnP4UjVkYtkAhTUup/Olt6Ik+CLNRU4WOKr9jb6gK+5NBNHRCGQoHIqA6fixH1JFI/Y0ZJ2dupbD+HqxxpA8C4+hzzuvqvDTyEF3VktY12DBHwVx7KEu2BKIlKTW8MirNHkfWPfFYLqnSqeOJieUqMZESd78qydLMuGX7aTsKkvQAvGLCDl98WKbmWTzaj2OBXKm4pig8Q== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [IPv6:2600:3c04:e001:324:0:1991:8:25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDdV4wZBz2xWt; Fri, 21 Aug 2026 18:54:38 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 024C561836; Fri, 21 Aug 2026 08:54:36 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289440 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4769-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDds5dGMz1xvQ for ; Fri, 21 Aug 2026 18:54:57 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDdp38XGz2y83; Fri, 21 Aug 2026 18:54:54 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.105.4.254 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302494; cv=none; b=XOI08c7mrjlrzjP+TuPtra6FY6D4p2weW+1mgdXJVY2OB+n2wXdiMwXww9zVNyHwMTQ9bE9r5M/E4TvMUtDY66R/JUjJ2RnOklaUWzqu44qh/50S+uC0mIDvGKg6HrsaTna5TcTwQZCMN8k5yCFC9yyw6YzY55OWF/n0HW8Xs4r7M1iq7c7kd+aE5BiKxCGOYX347zNM4V+EBrDEhBmOLF8qaKKbJkWX7EH4xB7tRzKFTRXt9auc0kk52sFGlG78dqY8UD6Pj2WRn3kpkOKXf18y7e08/Ofz54a/klw7j3+fFwohgP2t3+QzfnXI9AM2jrd1M8Niuj0BKEZ2o9XtmA== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302494; c=relaxed/relaxed; bh=YXBXonxdki/yWapcMtRzH7OUwshKvPwDPA/+AEnX4xI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ib6ny6hz92B15K+pzNl7xYKnbPvzOtMjjwNWaxYCyt96cSHeRNGyeGVU0gbVgAsgl9KKHpsx9YAVm447+ZWEY+LM0vSbgtmUWMWu0l2/6hioh4k6Ko6SLjr+tF9aXHeJ5Kkw3NvhsI45+HC0LocYPjsp8JeXdGdClKKj8roNt/yW0pBEWrXNLe3AK0hfOkhV+VO1TEZREWh64j4wzsNSfwuDc3RnzMP27MmoFcACPGau9Wb0A0Oof2Q1Z0WP2yUu2XgmLm/z4wxdJmKFUe+ALZ6CSgluWMGsj0opT3bU1yFqab8XH+d1c/0iUuxajFHm+nrU75O1WKkqnzEwduCYVw== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDdn46R5z2xWt; Fri, 21 Aug 2026 18:54:53 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 3C3DF60A73; Fri, 21 Aug 2026 08:54:51 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289442 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4770-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDf85mylz1xvQ for ; Fri, 21 Aug 2026 18:55:12 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDf52Xh3z2yDD; Fri, 21 Aug 2026 18:55:09 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2600:3c04:e001:324:0:1991:8:25" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302509; cv=none; b=hCHXxX73g1m645NOIcJJ40Adz/5Sjng/j40j1ZYkT5jVcVnq/atNu4QRHUV27bU4ntCx1wJ2+UnisN42EvTZ6kdkN4t++w7r9FNvswBLZZgmFjYa5AaFHJNLk46+vEruL9TwO8flxl3B+Rcrj36ExnoFHOJKvbNSFUeA0CZVSTEagtwoDJjUwYgxh+O6HPoycDVMXanS/+PSUZgqc6W94uUzvs46TKT8w55UXEV64keMImYll/D3WuEHwGIP3AawqoyO04xIQwJ2e/NZKvxlyh6oSpmrr3NwF0rU3o/wpFVAEL5h1U6i3nDJjYpaloJjTU3JqYr0FBvlLm6W6g2R1A== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302509; c=relaxed/relaxed; bh=QD0U9xK1rC/Vkp4rzBGD7TSrjwEYAxQIFW/CXuEcbag=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cW6RX52r/hb3S92y5hSWldfZMLb7CgTrN1hfwGdaJcCvmKiNmRXh3J+w2eDl5XiP8tVTwYOyGZbbB2M62wqRDzy1YHXQcNXVct6QPWXPAiWcNqMyr4RypRDggAYeMB9W1cvPGKF2p63kdGJD1imPY1orMYpj49BRMtpx6/vUoHzsib0ANoxibnghWD+8OihjgKPVWjwl/rufu2EqRfLgSmO1GwB1nylv4SYRe8RmylS0ZOOuti4CkYxSkjAzos5XMJm36pBlICf1SOInSCsINmZIj2/HzT6LpP+ZOmPjGwssK4SLOK5x+tAeCDb/67Kd21z03hmTVcmzGVZXzo6G/w== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [IPv6:2600:3c04:e001:324:0:1991:8:25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDf42xhNz2xWt; Fri, 21 Aug 2026 18:55:08 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 781F361879; Fri, 21 Aug 2026 08:55:06 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: Florian Fainelli --- 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: 2289445 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4771-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDfR4Jh9z1xvQ for ; Fri, 21 Aug 2026 18:55:27 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDfP0R3Fz2xyh; Fri, 21 Aug 2026 18:55:25 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.105.4.254 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302525; cv=none; b=b1MlIoWRYRz96TyaLfWOl8B1mWiqAzizgDRmWWJZ6pgBmHpWhcOR+savstrwlrYC6XpR+v+CclhMsxiAc+zWGm2klrGbg8fzviu4udLQAbXnKnHTrTUVmW97IUbJK/cZRA1kFvnixkjdg4NgWCspqlzQUw6HJ6itT152onppDQHjk1UDjBJEB5JHwMZTONKc8NUyuZPIhHuK4s1HR4W8deQF8sw98cQvMG5hFlf0esFNrjjjSNmj9xyxBvqSCjMxUrGtJ7t4PkID3SwYjfWOjY44Y5eqyY1vFpZnlEgOw+bdX2h205POwIaNMOr7+7RRvhQt9YvKANNb6tObF7nQXw== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302525; c=relaxed/relaxed; bh=/x6fJX9wdapsSuYOG/DAqgNYAs4vDEXC4k1wR1h3QdM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XLwumY77nRsp4R2YfVwMaSj4jFJewJSMNct59Jn27Sf2bh4+bOkfgOO2kEfG8FRCk6di6CNlATaCsZnPkfDqAWmA9aK0qf8hlLRXPN18ms7MssyYQzDHdUpDjbY2wIK6b4Yhqye/3VSPV7a+8HO2yjruKzWPhR5UhB3nLTBlk/wn06g+yM+RxIJgBVSJr93uqbteTw6mOjVf13yD4MI0Q7BCVLJhBpqbeSXjuDTfSll5XZnjbw/6SsIiMHpaheDqGXuQVCwXGsQyjo9K4S3TBs6ii794wBzUty9aSok7BHeCc9zOM19OFa1mfrZLxKDxDcKPcQVLjawxrJvSUncQgA== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDfN1Mp6z2xWt; Fri, 21 Aug 2026 18:55:24 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id B859261838; Fri, 21 Aug 2026 08:55:21 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289447 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4772-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDfk5mdTz1xpj for ; Fri, 21 Aug 2026 18:55:42 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDfg6T6xz2y83; Fri, 21 Aug 2026 18:55:39 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2600:3c04:e001:324:0:1991:8:25" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302539; cv=none; b=fVi+iwD0nZvr7Q7TSKF1M8aHbXFzm6x22n5GuzFOQ2ZBLdeJnuYB+xwcAkSK5V2yIzcZnJCfkpa9ctBQCc8lks6gOj7+mC6DWXLyWbLvR0Ganrl1biA6eqsrnclGsA/tyXJaosZTDw4Q/8utu11gfrLHGNnWj+4EF33VgFG1fcp7dQiqwiZ+VqXejTP4WUbH+GZbNrOfZ/Paf2D/W1Oac57i4T2+lmY6lyKwJNSMpm8356ps9VvvioJ03+N7jre+D/orrLNPKcV+P+2N5AQyIEfj+bbKgEuTYBf43jOzmhbiCm/XsQ7qo5SNx5258aPUO9xVkEhG27L5FaSzs2CQJA== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302539; c=relaxed/relaxed; bh=ExR3Ha4kXXEp9mVX2zskQEdxDAXbtZhqxb8u+CTSkyI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ng36qbiKZHVL+b1xeFWOVwXHHtgfsQw+y/ElHrv8YPEitHXzGFUsmfSKuXAJh1S63PbQh6YzujS9Nw4wQDdIHoJKxe0TcLDRagUgjacjMYpCh3C415156gEvcuA60v8T27H7iP6zOnEOhPD9Uyr79a0xGe6LtFTc8c0e45xSPMeIWGTFLTGbHFSGQsuCW1rricykVPNHlTXtKROjWp1Mk+NyKL6xFoDIH2vPIRlYXGEzfAbciB99r87pVInEqbdjZVWL4wl6kBs1f1wQKRD1tg6nWucVEI8A2YGgkiDvpwJOSd3WCHicOt+ElCt1/pMy3j+vHJSX+lFvf4gYlknQeQ== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [IPv6:2600:3c04:e001:324:0:1991:8:25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDfg04Hyz2xtt; Fri, 21 Aug 2026 18:55:38 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 1E30A6187A; Fri, 21 Aug 2026 08:55:37 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289449 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4773-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDg13Z9Pz1xpj for ; Fri, 21 Aug 2026 18:55:57 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDg04c1fz2yDm; Fri, 21 Aug 2026 18:55:56 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2600:3c0a:e001:78e:0:1991:8:25" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302556; cv=none; b=VI3ihzuDA0/IimkDi1hH7B5Sp9Ij7fgkbn+dq55HVx217/U87donidUPyBpksnS8g13zVKLrmkMzINfJ9ZxFToFC3/CPTy1NQpVS6n/YSnIKfs+V2PMCQ7/7wwZExf4XLCMN+09oerKZE+X9kmOpf0yKFbZpTTbGE2ddz5ZmIZz0idE7LDhXVq+X7Qye54xWI67oayMsut6n15xUSr2doj00UnDDappQL0NFzWklux8wajSfymc0D/G/7mmutnRK3J2fm+4YsOLjrXswL/2bG8V67G/nvZ0UjiC1yzdvUPj/Jv9uTHCkZClO/4eCjDvb4ZD+hMQUgIy1sxQDRrqEMQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302556; c=relaxed/relaxed; bh=IIoJUyf1XiRrFpsrenI8NwFcWr/Ib5O3xqS2Xj/rNDM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YDY4jU7r7VwWqOP6w4IJ8g/8ctL3gsHWqa8wO2yzgrO1O/pmGM+Vktvm0FMV9F6ZjzidisuShTswwlZDJ8hhG0MzrEs1nn3p/2OP9ec8NSyk16RBflPLm9eWmjAosxJn+OOWt2QAefljPn6l9SexUbpUDej/Hkdtfa8ejfB2Ted6Wmix1JC72gL8VkN5q57H6D7YIsPy9Pv65uzzwXdsuSwYIgWVMEj19JNFYkaKW3fiFbQvlKJItF67GADa80VjFZt8Pzr7MmRLWj9YvHxlYCesxU/6Mz+l6Q+95M6vYmxELj7NJ888mw10QCcK+f/BKZmFilCAAKhyHawpFOk5nw== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=2600:3c0a:e001:78e:0:1991:8:25; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2600:3c0a:e001:78e:0:1991:8:25; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from sea.source.kernel.org (sea.source.kernel.org [IPv6:2600:3c0a:e001:78e:0:1991:8:25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDfz3cMtz2y83; Fri, 21 Aug 2026 18:55:55 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 275FE41725; Fri, 21 Aug 2026 08:55:52 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289452 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4774-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDgJ1d5zz1xxQ for ; Fri, 21 Aug 2026 18:56:12 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDgG0Z7Yz2yH4; Fri, 21 Aug 2026 18:56:10 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.234.252.31 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302570; cv=none; b=VFtnl1uaoqlJxHOy4hMfmf0cw0zLFyxLdPgnuim+oEqUtKcY0BuF0X8k4sAwJgN27Atm8dXk24KQ4KO1UX3q0830kqxAW5fjRwNSAIB7n+B0pp/Cf/rGK392j1XddIiHUq4bvrychgt8tb8hd/uI82ReLcl6r3d/37/5wuJ68EtJIhSq9Eg2YMsnqA4VFP1KPRw7vQfjlQ6t9972PUy4AENxuP6vlOGZzkVqxNt/tvgCQ3129LCzbtv3L1hlcXqA+Yx3ovR7AVDB4PdwmP5fy1xGqmbt2CHbV7YbxiBjiurcRCeMYA2IWelcbG5RbFCkDPEecPAZcxc1rIbszTpSUw== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302570; c=relaxed/relaxed; bh=itpHEbH4k2lsJzsxO46eYTw/+gTeQhNYN3Hz551XSrE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=R61CKzZudyMZ9o3G6QG9yNN5NiFcSMjtfRLS6/YXC9KTP+f//sAPhrglvL6hr8n1yph9CFlpjERLasckf4tCwbqpzQGVaSztlbEFD23oBPNhNZg57dLwTEpdtbchbb5A/mWyyzrTbp4xXyKRpRBVkzsF6WK9G0/xJD9/Z2hAOn6TmsZdHjnuMpRv+GxbMwbwOg4f5/kcv5h00us52447Zi/dmDY7zNM4m576BqDLE4459WIwbTQ+JKRDIiH5KWlQJrfOzDISXflt1YrRR6Z4UpvIrbXDWs6i7BCpITL7foXLticyqOOysUGBt7jZA5lxPW9jPkcljxzoPMiYbhIVXg== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.234.252.31; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.234.252.31; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDgF1mD2z2yDm; Fri, 21 Aug 2026 18:56:09 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 4B0F74034A; Fri, 21 Aug 2026 08:56:07 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289457 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4775-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDgZ1S0vz1xpj for ; Fri, 21 Aug 2026 18:56:26 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDgY0Lblz2yFt; Fri, 21 Aug 2026 18:56:25 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.234.252.31 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302584; cv=none; b=PMlIO7pbookY+B49T7RW6yORI29Q/3Qa16kZWdI34WXNJDvQg1UWnU+KLqJXbNQ9MyrejOE1tHrmx/qugQpsfWVLLfpmDQ+qWKrwZz6i5q1WQyi9v7nxl9DBoeNvIGBuIOq/tCLGfHJKiJ3ShDo0argVlpyYNSNaEsMMxZRaOLrIQQCj8butplPoYD1Txml/K45B2qUYtXF/wjw8di4mxCFv2Aj0wJYoanDVz/Vk397XgK+4/EkBrCcU9eQZXJ35MRTpomyODUwenEjDLuEVwCpKGvjj8RluA/BHLyzSLKOeSiQOVp9P5KbHP3AYTx/Qe53FL44tDKgXn/4/aBnbIQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302584; c=relaxed/relaxed; bh=R9u7lZYYlv+jpnW9eq1qoOhjFLXyVrFARYd3PLbz7IU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZITe/n35cY9Eviz/gfV8w9Bnyb5MdH2MJsiOiP/WroAdQ/ALHBw/5iE2Rcc1uvsD4lu5KqKkqeCyzdZehzFJRY1g1+kfnJ3cPxpT5TfeN35wNIapveb09I1rSQoUGwYYbphMvnQWGUUt1GrK2UmTOg76ymizVN6iMroBgzyaxqZlj1P1GeVSyv+l+CyqYikUW3azZGlE0NAyd7B80AyGaSOl1/faR2otMF/f4ibCJw5eX56o7/xcxci1RzrLm0cWNxwwMLrPHYAFLLgsscJ7vYfH99Cbt2jG5HsJJw/onec8Vne47iOkslLByRu0dP+ngUzCAHxlzd/FNcU3ck9Rlg== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.234.252.31; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.234.252.31; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDgX1sPXz2yDm; Fri, 21 Aug 2026 18:56:24 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 7400E4390C; Fri, 21 Aug 2026 08:56:22 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289460 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4776-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDgr47fXz1xpj for ; Fri, 21 Aug 2026 18:56:40 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDgr2gxBz2yDr; Fri, 21 Aug 2026 18:56:40 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.234.252.31 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302600; cv=none; b=K0iJJjG/aY4LldfdoqNQNHoMyWTC2fcFGRz06+W7u1E8116tjNSPhEo9q1bWDu9NK3x+bYLg46DL9lY+VLqqYdspoxW9PIOoqQoIEdwOQ7u6VzcX2f0y0BAGb4PqJrTQ9Ogv8VcRxJ5XN8GB7CONlr4XeFGu+L/QmprLbA1hcSRfM9UM1t5+zgLbH3Yz1lKdmviRKHPdDoDw547sFNIRIjYQ/RJK+uB3gJolvrKH0fvByyoEUZIt4i0YoXL9IHmpz7/f1LGSTejD3dnr06dPpMJPBkoGjh7YfNUOQTRqv0PQ8qA/lvF/8LzNAL6ghgbVcsrbQKv2nDc9q7ugvw3FEQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302600; c=relaxed/relaxed; bh=UR6atlCP3FphM2N6zIOKlBJxITxm/iB+gJiPh67GSgk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iNSXNNDWc1CPCL21/PkaWYcP2lTUa01h/kV0wvOZY6r+lEIt/ynTcd943p/ioicTprQyMMG9oJgGNlVrhTP8dGrabR1r5nZqu0STXW9B7A2OddzcQFHFgkpBGs1jrZVjysps+DGs/iTelOg6lgvLevdoRvc3kC12wdiRmy5bBEFWvVl/PtHAQgjvoV10K8WttO0U4aZjWmYPYL/v9tinqqOqFLh7bk/zTJxpre52pvOYbLVnJV9fSbckdT4EyO8kxMmUGlFslBo72Uckcc+CYRkYoAbFuomELx8p4IVcF8Yi4E9NOBdxLUsApujIrF0hQK6a+K5tBHEDzlIirSBZcA== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.234.252.31; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.234.252.31; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDgq3Pffz2yDD; Fri, 21 Aug 2026 18:56:39 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id E81BE419A4; Fri, 21 Aug 2026 08:56:37 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289462 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4777-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDh860BDz1xpj for ; Fri, 21 Aug 2026 18:56:56 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDh844Qjz2ySS; Fri, 21 Aug 2026 18:56:56 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2600:3c0a:e001:78e:0:1991:8:25" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302616; cv=none; b=VYnamZeH1l7cWrFmt6JaVIlp6hbxMOdVrYyf4dPPzIs+eJvMZZM8qZNtc1VduqwxtjtX0TE0pQQT1OtfP68moweZ2ys+SullEMIrFTIvMHJoRCJ4E6xdPlazx/AHn+l7IpkoDeDC1Wsdj4jueHm1tWJHZL9raWtJY82dteaOsq1io5WeiFnbQ4g8ieRLVmRPbNrTMZYJWgEO0+Y8DQPI3g6nurZckiVQCAZJ/Bmhg9TE8Kd2yhPXVsUC+pnp8JITolbUwT6VWAuBIDSgfu3tlDTTtbxRlq5MMBQcO7jFj+OCQnGR44q+TRV/jIYncFdjJmcdpujdP5deaz5TgDGjRQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302616; c=relaxed/relaxed; bh=5ikO43IXZJhExvwhty0Udda0kKS83dS0CwsWGz2Azek=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fEcIoHsvquelOelPp8D+FGkuZMctYxSlEpvtutjxW1J2t8UaSdwImHmyeNEQOYLQHwv+wlvuL5yAUCtuxQH6dNTqO8Vi3KpGHTKm6in7li3rbU4HIQ9QMt2rkvz5um7on0NHgl+OjoO9Y8gwtUZlWfbQRGuYwAvrOya9teAR0YJfENLxnUyCc7vBHDC9iIrSawR2UWP4QA+rJs8JjeDfBF6CGAAGv9W2G6Crfh+AL3vYCoHAEFULMwTd/Wdf5h3juccY+vd31O5qnV8AfhnKYeFO+SH8/eip1vuDkTamDntzy9JFL6E28vowKvkW8qPFvPGiqPGFHFeBgxTDiL/ZOw== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=2600:3c0a:e001:78e:0:1991:8:25; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2600:3c0a:e001:78e:0:1991:8:25; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from sea.source.kernel.org (sea.source.kernel.org [IPv6:2600:3c0a:e001:78e:0:1991:8:25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDh73s3rz2ySN; Fri, 21 Aug 2026 18:56:55 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 1D98B41984; Fri, 21 Aug 2026 08:56:53 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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/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: 2289465 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4778-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDhR5hfCz1xpj for ; Fri, 21 Aug 2026 18:57:11 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDhR3whlz2ySJ; Fri, 21 Aug 2026 18:57:11 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.105.4.254 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302631; cv=none; b=KBpMTDdIaY0nHfIXXAd+2EVDt0uUAu+1BUFvhAtNYHInFYRu6Rw0I2qDb0zAl3p9DGr75E8Fzaemcm87vjKLXqRr+LkTxIzSNfS9G1mf9V1oFQAMQj28uHxBotFXMfRq/M5zvTeTnPZ4F9dHuMUkLhGggf4lh4q+lOHoX/z6iFZfshRdqshVwCrriaqCzD0b+z3Ys9O5V9IJZ4U4kesWM+cNA4OKqcrzRfQ7rjBW2o7jyiw8HfH2PMeXbzQsY12/87dcitDXDz1uRnnUMPCiM36cAyiNTW2JwMAnxqQZgJu3lvnMi2R8W8BIY316lu+PrPIycAzvIBvmNXgEhmQ66w== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302631; c=relaxed/relaxed; bh=Bk5GXW1DfINuzC0uMaEplrh3tvMFCiyq0/LQwpMggl0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IidqsqB0LWwl5VeonGKLrolGIq36tS3+giLIQlriwc4EJeJQi2m/7oSBSCTPogZtPcYHVHrfBC/0AdQfd4CJQoLK6JFFIOwQ1MDqMuq78/VupCS7OK/yLj4sUPhnx/h4GTsux0f5ikKoid4XUfc1bzKZqvNfbxwSXyloi0cN4b0+Fj4zniIF+fTOObzlPJV6VkWHcHV3l6it1BneKw6m3Ytw/KO8W4QLwg1paek0p+mcKJqf4WrYodYYcbWpMfHmPs3ff19vwpmNUkGAd0fRKMrm87UrYYoTpd5XQ51+NnUxJXRTDpMusR6mdIDfrWf+SrqUxjKBW6lcWbVdjbS8Lg== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDhQ4nLVz2yVP; Fri, 21 Aug 2026 18:57:10 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 663966187B; Fri, 21 Aug 2026 08:57:08 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289467 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4779-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDhm0121z1xpj for ; Fri, 21 Aug 2026 18:57:27 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDhk34wVz2yf0; Fri, 21 Aug 2026 18:57:26 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.105.4.254 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302646; cv=none; b=Wa43rW9sCN/FHyx5DD/RsQ/oJ9FtzCTIemuesyzOCSZZKnK3BRoxIPqkB5reW+WvkJLHyZL5zOcvq8QPM9Nk2n91klcSMP8IsVPwymA4T7yx050VHmjekC/PQ2DPtYH5ne+tagsi2BHTqe61GXaI3sBv7FQStDJXd/1RACrSmYvM5qxxegbHXtJPA8StFYryNwhSdq6CA/I2C3d2XeMrZ6Fr8IFFBJFjFf6aqcUZdpd48PsLswhghbVV6mx2zlm5GLTF2298N+pD8JUyBiXTKyKmZCv/EbIXK27QXhlFG1l5vlJMNwY+wuOYqCSPL8y23j9psoAyz+7NbnbdyVhi5A== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302646; c=relaxed/relaxed; bh=hIHDTurKhrl/9rra11H+BxL+3S/r2r2zOmNm2py4nZ0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Mi720XWEnGJn/NAjx2FEtup2TcLaV/F6gD7fsyXD9pfppI2Gja9wMGph7zOv/NmlhLric4VEMhAG1xQmDokQTh17Xon5KcIXoQejB/3LVScHmJeRy9vvNTJGhyVQwjbe+ZoUkabslrI8sSAAhKXvsan6nicITBTYiOMdo6P9LhjXuv2CV1k4cZDVU73hfHtVyt9wjfMN9j6e5qTGhkF3NubPh1BYfPs1eqS6MXvcbH6kv1WqH9JMwsXr9lCQ+areV9mtl+4KvrYPI0Zrg2o81ZSVv//73QicXcZDKxt1YCe0GAKwndQBKyEUznspeArzXQJT+bc667L/7MjVoxPc8Q== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDhj433qz2yYs; Fri, 21 Aug 2026 18:57:25 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 9898660A7A; Fri, 21 Aug 2026 08:57:23 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289470 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4780-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDj439Xgz1xpj for ; Fri, 21 Aug 2026 18:57:44 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDj15g26z2ySp; Fri, 21 Aug 2026 18:57:41 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2600:3c04:e001:324:0:1991:8:25" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302661; cv=none; b=Z3eWB174S6OxWm9N/C03aI8+thk+C0vMS6dspsIInBN/B5Cx10/Ln1pcbVuz250yPawqvC830Fw87AbZf0vyAIeoKIGPZMgfu0OvAG+8QhZ+r1VgQ+1mmGEypQbwCxmbQo59NplQ2W76KTsJ1jf2tx90LusMTAQATR8izPBAHmYhZMWYQ3+qvg0FSTxmiJtiKdb1ynzlCiyXjTWixgSCiLBexfpuiASLC5rFeT7k+cwd6PCymHj23qheq1FZjM6AEnPjkpZIUe3YLoRphsVZRSlXUFGPhbcCtdHbCrzWNAm/P3H3q1CUYqzMXc8VX7VKW+dUJrcdWbxenb+E0XPCEg== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302661; c=relaxed/relaxed; bh=y8meQSd/mzPxMJoWlitBJEpeGayj+BVbZ+GnzuBFYnk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mDe2eppuBA4/nZuMZv1Me5sdAi2PjOIQA6FEasgsefSBpW3cGTq6TU/PK/PmISDbloh0qdtF32iZ5dA8S8JbT+R+gCNlIQos89JmKeVcfBZT6YtxeVfFISWXBUuqX5IdQauZpZxxUANPwIWV5xXZy3Mn4/zDiZYQ53azoM9B01jhbMwJslWOz4vb3ihCG7aOMEOV1eBEDYMccIlzXITLGpeNPpA3Q+tJkGE0Iu66bb8MwxuHk20iG+4NRnmqZtwEbuesJe3OdTkVcaSkhaeZHkfVYgLwhrzE2WxUoTDrIh9LtSEwuy42AQBGBpHkJNQOKbGlv1LLditO/Ojqv+6BAA== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [IPv6:2600:3c04:e001:324:0:1991:8:25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDj05Bdfz2ygL; Fri, 21 Aug 2026 18:57:40 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id BDEB660A85; Fri, 21 Aug 2026 08:57:38 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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 Reviewed-by: Peng Fan --- 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: 2289472 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4781-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDjN3nhhz1xpj for ; Fri, 21 Aug 2026 18:58:00 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDjK2591z2yXm; Fri, 21 Aug 2026 18:57:57 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2600:3c0a:e001:78e:0:1991:8:25" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302677; cv=none; b=YePuKnfvRREwdiYAZipoGAFF9fg5ufuNxxA0+HIruDhVJUok6tpESP/GEPIf7V8xMrgKsFHjbJZN1hYf6BiYFb37UAsrbRMwgy4xT1S/Mwi1Vv7ta73Qko/kqJk7nFRKlJRBdanGsU/Y2wIWJyVWwhEkXKwEZO2sRzh0/H4enReX1vTDF8tAW2zvspWNrIGlqEq5PPEDyZRKPKA69KPIriHmAcgIqzCoZW37AZuXlpSCVcGsOIBbch5buAl1XxF0q2fRHx37g1j9kU5diTralKuapqKqrRAyM1Dn41ZG4w2UPOAvrAqE5SdL4DhslL4Du1ckiq0ncuTS7dCSZ1Bmpw== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302677; c=relaxed/relaxed; bh=wS3ioiZuLxiQp6eu7NOe45+zg3ZZWzEZtKMoi4HTz/Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KLDHuKJ/+iIuz+lJ+ln5KJtWhIq7Jq+2cLB/JaEyDPvMWq81WJNTMF1s6z0VTWSQwO23pw6aYUsASlmNZ+hiwWOW1APBMN3z6vBzy1bTG1YNeI/QYcjj7bq8HouU2IYnRjQAT5v+6dfUhAs4QEYagicElOmyhmAlWBgDUKqMeLnRGNrnPbJ/7inRE4CeZQOKJI13YO90az2nStEZoq8a5aZAoqORJoEiivcmb8NVPXXPkitmVGkP+v2jSidQPDT0sYWNZvmdcHdIaQwNhMCXRcnwbzSgY4HBsVBfWWyXMRkVW/+xhLNNN/CkqZEjsyjcbUQzU3sDTlsE5JSzsXRSpw== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=2600:3c0a:e001:78e:0:1991:8:25; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2600:3c0a:e001:78e:0:1991:8:25; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from sea.source.kernel.org (sea.source.kernel.org [IPv6:2600:3c0a:e001:78e:0:1991:8:25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDjJ1zc6z2yYs; Fri, 21 Aug 2026 18:57:56 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id D367743B97; Fri, 21 Aug 2026 08:57:53 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289474 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4782-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDjg4Ksgz1xpj for ; Fri, 21 Aug 2026 18:58:15 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDjc1n7yz2yjq; Fri, 21 Aug 2026 18:58:12 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2600:3c04:e001:324:0:1991:8:25" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302692; cv=none; b=i+w8EPHPAnfBS4m/8nUO8ON7ogjNN0UtXPkmPtY6Zgmdl8/6Ig5w8tuChGibV/UUkWTL/Rc8AQjSA7DX+T8b1PHVhTcD94BuLt2g9crMHd6u1DWYPdur4zncGTjPgTYcN1SgmyyXIa4vGWDhUha8BqXPS8mwVmCNghmZMCA0rG8B/mR8mGyL2JPjVx4Hh+5m/BDDmr92KVwXiHejJPlsXINPKQJylLOY+39FxxFRP6b5dAwb4r2wVdBQ1iMVl0jj+tUyhtOn+OAPRcXIggkFjeSBfTtMNUGNhjO7pvqqsKwtfjR7AKS9Wbr3PFainlQ5Q49xng31JC4go4o6O1x0jg== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302692; c=relaxed/relaxed; bh=4ahANutkKdTMCFb8GNirNf69UC5A1LB0mCSk6qbK/ko=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iS20gL4eP5WizbbYvmx26BjZ+on+h7VIYLlp8VvRQglMNAe9F010GMttaMZ1U6PWSTynBuc91weVzlas++mq6163sIf8YqpGaABgBAmoDLjUNqTQVHD9zvt/Nv175QAxViOYav8ltqPZQxUgjJmyeX8jR6Y63aRq5S6ltCU5DjLAzsKNMvmtD2izLf06282sFtulHCM9Vmj/GMlaZEyAEI0mSMjxFvE2xt4US78QtJi0D8hhfhqLp0h9P0pmogE+y83ZE0vzgXPZpVO2wwlcBB4Uhb/ORxE9PP5BviVtTg/qt3lSiqMtwyIM2Hoyn1jvPV0RgE9pD81EGlHvUdgehg== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [IPv6:2600:3c04:e001:324:0:1991:8:25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDjb2YVZz2yjs; Fri, 21 Aug 2026 18:58:11 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 3EB8360A7E; Fri, 21 Aug 2026 08:58:09 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289476 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4783-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDjx0WjMz1xpj for ; Fri, 21 Aug 2026 18:58:29 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDjv5pb2z2yjs; Fri, 21 Aug 2026 18:58:27 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2600:3c04:e001:324:0:1991:8:25" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302707; cv=none; b=cHaDmaQstW25Aep02yQmhLtLjcypHLFycGRhvf8NecNZHjIdSzTTgAcXgUg1QrnDbrWRmeIsDT1+qVXiwVaEs6Ozm3A4MqdB8wz/Em6GtkU2AHOUswb09vliyoUnXFMhxCxQXqDN2Nn0gUbFHYOFVM+Sso8bYN669Buh/RYvK9+IgM8SwgUTUyIl8/58iReIp8QezBBlabEFsdRcYfEgqwFkU5JnO83+buGkTeZjRo9r9z63MjXNq4aZtbXbT8zTrxsjWytVZJFwXVAyWVLD/3zjyfJ8UhuogkvaFEA8MMf6tpts8eEAv+8KT7oIovr8kdDwPc9+ioVdRHkV2nT4kg== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302707; c=relaxed/relaxed; bh=5wauFAnMunw/Th2U9nrJf3Bl94L6qEwB+3wASBvofFc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BEPbsHzF+6ULUBK+eH1vRgZ9JClXkUQOEBQVHZNlXpt+y923xC+U01L/o9c5/GwqfZT7A7mxCzXmDEfh06Ef0/r9jK8F+FHVEX14iQy/TnaOKXGlv088dgO9cIcsl7r0w8TS1zIq1iNO32YixEtiIUvVT3869uHSCzB+X2HVSfrRr7M1jQyLhBUHpoi5EFRdv6r0SqFXKk3jTd3bsq9klkCDdpVplwioh5jFnkkWhUwGkY64tdxtJcgM+sm3U9Sw/Kc1T1442It7updqLiwXq8HmC96ZmjJd44Du5BsAvOuScumqckzcWMQ8REw9rW2wwwoReAx3EZD2t6fyNAFW/w== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [IPv6:2600:3c04:e001:324:0:1991:8:25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDjt2rb7z2yYs; Fri, 21 Aug 2026 18:58:26 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 7FE0D60A7D; Fri, 21 Aug 2026 08:58:24 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289479 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4784-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDkC75Z3z1xpj for ; Fri, 21 Aug 2026 18:58:43 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDkC5mHLz2yl1; Fri, 21 Aug 2026 18:58:43 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.105.4.254 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302723; cv=none; b=dNqWKDujCvPSvYGoPS9M/Sbb9DQP9KMv47X1e+G70FDE7u3vVU4Vr9CRpEqxS42SM4vHSf2piK1ZGmyQlugTujcLBh4JAJpjzMGyXaJrhebsTiDIQ2sWDbQNXyydSfPsBTZSIXW2F0OTvtxRZVS14LUu1Uk7Y0tPixusV+LgQfUX7I5dnaKIJ/nN9u3QBxOqwJBosCAwWlhou1+gyCeSNygn1fGMFJb9ta2qwVZhMcE4fKAhAD2vv9U6ePsikkB/EAUdwsQ5HObL0L5eNE8y/asjxlr5YBZLaSpuwP9mqbU9/ThQ8dAub6p4kZbMpfTXfAsAgcOBDbrHk4ZTXycUcA== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302723; c=relaxed/relaxed; bh=yo5CTh9F5bmWIQO/4XbNNV83HRjIfPNyqg0WlHQ1MXo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EW5qR7o/FogBKS9jpkKtAmtUEfdH6BVRmVHBAZQ3WoCCR1OLfUU5LG7QVxvmADQQUilW8pHrOdbPOCmW4Z70GRAR49iwrIf840IN7vzzF5hcSafThubbc9SLj2gPEvFJoxr+3s+0d8S5BSw+iSHqteL6PUtDRnpSt4WqIkqH5SYyAAphIiNYq98iNJpLp8lZtr1Q8HstIayrkaDQQR/YjngXQ6q7AaRUHBuhBO7unkQYbkmlojczXQkB5RumkHIeW5ns84wJOvNB3tDuyuefykgauBBL6xzb0EDHYIlTKBzCb4i/LmI2pjmM7B4H0LeQkaf/lQOmBmgkWyghhdR69A== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDkB6Mp6z2yDr; Fri, 21 Aug 2026 18:58:42 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id EEFBD60A77; Fri, 21 Aug 2026 08:58:40 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289481 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4785-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDkW0sMsz1xpj for ; Fri, 21 Aug 2026 18:58:59 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDkV63h4z2ynT; Fri, 21 Aug 2026 18:58:58 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.234.252.31 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302738; cv=none; b=nQ5PR1Q62SBTmj69HT7U/1mqpm/eORkFX4Fjf6qHizb8PdHy4mTjW/TrlvX5fgPPQ1bQKXbh5o3II43IbrpvNFnjlu4ys0T9ZWtiWpL+YpWU7Z9+GGssBucGp3+vLN7G5DBB3iv72sqMVZvBuLQC0g9Mrx0cPKYoaufMyOtR5WThB2hX2a/YXjHTaj0J4WOX6dppYcXKfakoUm4vO8tySGJ7RR58Pxr4bU4UQyv+pCve/HhyrcGl8f3ohgVpgfPrzdywGQonQDLP8scIwzcxYyqr3I9fd5/8at54MTPVmGWcdw3qnBCogI4B/XFyESir0EOZyCVCPunUD3H4otqS6w== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302738; c=relaxed/relaxed; bh=SPYd4l0JpAFCSmcq8utdTYRLWEgp4WYuyshpf7WR7EQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cKqAZsJlYTHw6GWbmWCsXH4rtl6wgeQgjZO68eAH/4pLU0qJxlzTiuxQ02dx1jso08yqQweYtyJZG/S+BnmkENdVqfMNftncarp6848A6uNVZo3t8+sxllJiXB3H1KL1JYk23uw1JK9HvdhHWiXCbD6RqdhCA37nNUMdy47e6Htj9Aq83B6lEabARPux4xTGv+7kVeEm3XDvwU3AzhayRHXHH2IW4AyjIaiK8c/eTvhlo8tBvkZ6bVOBsQc8npUwSM5nNr21dD1eNeciB+tz3NVsdDBSumMKyulgykzNsi4fDR4wHymeGZjeAMo3sG+pJHMfUqi3qXYopyqDCodJcA== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.234.252.31; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.234.252.31; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDkT6zQgz2ynH; Fri, 21 Aug 2026 18:58:57 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 50FDB413DB; Fri, 21 Aug 2026 08:58:56 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289483 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4786-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDkp5pywz1xpj for ; Fri, 21 Aug 2026 18:59:14 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDkp4Dgtz2ymg; Fri, 21 Aug 2026 18:59:14 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.234.252.31 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302754; cv=none; b=n3+7zjWa7sLJU0uFaBXCmKllwRygiwYnwx6ID8TcjudP2R95d5QoP7qjF5XxKD7DSGcIcaCGwP5SuAf+QmkdQYxEdEZYcnT74KJIJqyeFgmdBwa/sClKT9kYHNrK/N3+9De7liXzAGR0nydDo9oKgKtKnslQIg+91OcLxHDILHCrpsIZElv9TEhIKKwSGOqTbRh/sDtw6BJ3qPF2+DPMM076oO2a8/xDF+BEqpm1Gwmw/I5Rx+9bhVPWsaoi71Ezju0AW56vwphYIWGZOX8zswWfc9H/rdhI9JP/8XWlOAmdTSixaDiayIkZj40mei1paY+oZmmxOzB7kmF96f1XjA== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302754; c=relaxed/relaxed; bh=K1ZTHhEVFzuhoeGpGEwdJTaQoVDzROhgV0o3/kNPJm0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dLzSiWBvFVmmeLP5pGiAOcJ04Q+D0k4mtPVkLhFz7h9wnFFcqUi1Uw2sL9hxhgVD169TAmUHiLTjsIR4u1BdzJZmwPL2v6ITc0kzHkQ++RtxQhIuAdUe1xU3zBXvXZy5DM0L9Ipc9wsD6TbEVCOhpc7jEDOTY0nmWyQ09B0wutVyjTQzjTjZ33cSiE0eeED2BKxyTyPov64OtjX75a8Yxm1kAGlrNqh1Os18Vwi99DccbIEufotUfxnkyY2NAw3+JhmfNa233rGWVSl4C55FfleajxIgx52c6BanQdSpqcTkX0P+JLVSgfW4yEndY9G4MD9hK4CzpKY08V0XZ6d22g== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.234.252.31; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.234.252.31; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDkn5Mtnz2ygL; Fri, 21 Aug 2026 18:59:13 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 34DDB40752; Fri, 21 Aug 2026 08:59:12 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289486 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4787-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDl65nsvz1xpj for ; Fri, 21 Aug 2026 18:59:30 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDl64WjTz2yqX; Fri, 21 Aug 2026 18:59:30 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.234.252.31 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302770; cv=none; b=b7WjSB6SAHFxSrzEnyHSaYIB2gK3I4+cxjEdV3xUg83T+GC7AJxp2vE9OCihWWTYyUHftA/HTRDHlxTuDhLJxNqtLYkArFd49fiPFrC8w4iGX2/c67AJyEdNZQdriLwoB3vlsKjZ0PWr2fLaP3qwckgrcUVkzbetkGStxGNXXT6a2+jfDIVmjqzru6voERaWGptQqdvQStoqAMLalU45hD2F++zp5+bqdWTH9eUgK1sfFUsWFyIIRmbc9czFlRn4e20g460qRL9K7klFiOoSOZcr5s5WRCWlFHgjZq8BrXkXQ5RUG3F1OBex3Dyth/s+n+ro6p1zlq3h+9BMOrT3Tw== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302770; c=relaxed/relaxed; bh=ctu31X6f0EComy3lo+7EiHqAYJzV2dZtlb7TtvBVyds=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=N7qto8y2bLDvk4fsVxVQHA1c5qKRAnO/zouJzf3Ld9pCrvpWLxQa/Dti9F5KeGMz4mIZW2jP5IEptOThb945/f4nx8H9M3LU8afylYgSE4nVhJ0Q2/52Z1FFkj0CcN+r+1P1UMCoPqGleIA3h4NWDq0LjXQioOVuRr8mj4w4xQIL73pKW3J9Ij0JjOUgDSzFvAa32wcZM/Kv1b2zSqMBeNX/ZlfWtl73V9GTZa75Rk6sOy4IF+wbN2hScZuTZf90gKToszOqSo1k52tqx4JfnWC549FHj/z9F9BCJAt+bPyTHu/T0h4R6anRU5JRwYzOmfGHm7KQPTV17KT6aAyzBw== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.234.252.31; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.234.252.31; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDl56Jc0z2yYs; Fri, 21 Aug 2026 18:59:29 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 14E1C42E3D; Fri, 21 Aug 2026 08:59:28 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289489 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4788-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDlQ31SBz1xpj for ; Fri, 21 Aug 2026 18:59:46 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDlQ1KP6z2yqx; Fri, 21 Aug 2026 18:59:46 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.105.4.254 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302786; cv=none; b=gJ7hziA8TB8Obfs+1ekZbuQWYeqYHplKoWZXhSD9db3dXssbuA0hHMsMl2vqY3E0qHIZEMcozpltxU/fP/8ZWB0aKfSBTTh/Tc7HV4qDCwZS0FqIsJkfiY/tccsZ9UgtJvE/3ag/anO5tJCJcILm9sOzEFDKOYsq4mx3HnqqTYLGIQGaMwgCFuUCBsgUELbOj9Xf6emW+hjJajKHQQM+IimLSiTpfVJJ6qyYRMjTWdJM6O1pzfltmvBPekIuR9/l+IJbSIP0+AhtrnW1ye8uwhzCxjcGryuT6hGOqsO5w6rlYyFQJUY0R3xSyGHD/EVLSOA6RpXV/ftOoUlwp/0YpQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302786; c=relaxed/relaxed; bh=0WkqiEdozonjkCcLhygEqb5N6B2vWx7grnAT9ReE/8Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MD7yUbOp6X3jsTstqIXktT2714ZXySVRAjVn0kA+d32U5LcP/R5eOrS20UWS20YNApyTiDDinV/xNbaCShDVidGLsg6gqCGCQ8H3HdCAYYN3Zc0/dU64B0wLk+PJdKQv998E7IJKuLKkBYryN/AIVErtgW0NZjip6okQTIOYo30IOU73K06gCHCq2DvqmqdVM1tK8HXZ4wRpkcJVUIrI1bfQvLEt9OcXL068YCZv1WsBTNWZ659KcjVyE5wGX8RTQB+vea9vxEyXrKZDlqRWawVfjv4bUWftCubPgQYWCNz3qLKWmt3jQnWx/MuX/BGfw9rQWaZCfJYDeFcI3OVF1w== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDlP22R1z2yYs; Fri, 21 Aug 2026 18:59:45 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 5A7EB6136E; Fri, 21 Aug 2026 08:59:43 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289491 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4789-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDlj3kq9z1xpj for ; Fri, 21 Aug 2026 19:00:01 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDlj2MCmz2yrH; Fri, 21 Aug 2026 19:00:01 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2600:3c04:e001:324:0:1991:8:25" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302801; cv=none; b=blgyN9c0DLPUMJgPGQPIEGmKtQ+S4jMxIfluCbu2M4xbHSkpdblZvy2jM7gJgLFWHNhkPqgSvNDRJ029h2nAEQf2culvVu2KPm/J/rGvbR9Po3YZse4tHKDPYA5EqJF9yXKnHhBdhFUD2DzIy0gqWhYQtF5Gd9KUiE7CjEezdV76O5pDXXuY0QhJyU2fHoc+OgwWPudL0s6MrG3xn0vB2GqqQN/Cq5gVgwdync9UvWgUvXz0myEmUpDsksnC1FKy09+OmpLlZ0rPepZy3IWRjNvBo6viOlbraTbWfciX6z1FPQWIX3HcPtiBtVnW/NF4DqYA2F692kViJ1AI5xzIOQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302801; c=relaxed/relaxed; bh=FGPEhrlWiHMmUVrc+nustzQYPzVsEgzV8P9Ed2pRqQc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BnY02hAem221cgsi7/1+1csk+E2y+cydngnnNVbzMIjjsK5N6Q6QBSFxdDP1pSld+s/69KdN/SMBvgTh9X4mIsKL4XXcDHBJqo5822Vs7UcWPH/uplsadeuxzkVKMti+iJO2Mvw6EJR4r/1vT3b3o4dMkc7MZZV64FvfCXUiHqOj+Nfm+vq68LD+fZMEFgBt6lETzYaeLFUPtNpsXoOLPSRHayLbW9MiNQAgzak3wDjtIKRdxbTrQsX6BR+lYg8OKcj19ViUgdhVb1VHRexMNVxqHeusszFBNLaWqioRwfTUK1mxK0Tq8T2kuXnc5PUvcPUj/ovupFA8yMK6cDIZlg== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [IPv6:2600:3c04:e001:324:0:1991:8:25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDlh3KZYz2yqP; Fri, 21 Aug 2026 19:00:00 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 6263B61883; Fri, 21 Aug 2026 08:59:58 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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/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: 2289493 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4790-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDm13HMWz1xvQ for ; Fri, 21 Aug 2026 19:00:17 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDm02Xqjz2yrd; Fri, 21 Aug 2026 19:00:16 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2600:3c04:e001:324:0:1991:8:25" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302816; cv=none; b=aKp9li10G6s6+PTRN7D/3fCT30IkEY99Iv0KC90m2paL4s1xXWthtbVzVjUiXqnXq/UUSwkk4s+0RQFtnOKQI8chhMCd2LorhVcUhWnJqyM46tehcWj0bvj51MoNqEn+9QcqYiYYnzd4kMyu2wXvJqJQYTC17dNJyEkYgDGldHhbDRK3yGzSFBAri0fBVgKfkiXWbfyo1B+MU9ZL4Vt+GL8Pr9vTjf9Rrz7DqOmalQYSkkVI688zDY71G0C7oPRy2uT+vUOOUxiQTxYmcRbTp0fD4DD7Yhc65wDDIbWEuFtIHAOujWzoDbIp7SaaAdTa3zJ0Bjg8G/h2x2PEitfUkw== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302816; c=relaxed/relaxed; bh=Ei2Z/4Z//MoglD7UD2ddbMyMQ8G3BvNtRg6Lye20yd4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NGSvfvXIA+1/FB81KPW+C1f6iaUB0p0ggGKCVqjS7S+Gtoa2D/fuHfYj1ZIu7kw5S0AuQHpuYPmyJIE0Tw+9u/cVxIc1hsm2RJDvELgsew8nIDW9dtU1trMfa5gx9OtavuzoiwwBZS5xcpq7GsRjkV10rB65Z1Gh1w+qddh9FpWaqPWv/1FWe/2CjFUlkqkniaT6GvqD12/RRoavYXvh4RV0tnw0SF5c4pUnwjAcPENoCreGHG4c37mybTtE7Zm+l4PNQZ5p8rkUwd94nkmUwZVi1RmJQQnZT420tJHTohPC6etcLly914A4xdUgxqka66+5sihuDQDhE1b3ylHlLw== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [IPv6:2600:3c04:e001:324:0:1991:8:25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDlz3Dgmz2yqP; Fri, 21 Aug 2026 19:00:15 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 8943B61882; Fri, 21 Aug 2026 09:00:13 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289495 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4791-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDmJ3tLxz1xvQ for ; Fri, 21 Aug 2026 19:00:32 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDmH3sNqz2yrw; Fri, 21 Aug 2026 19:00:31 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2600:3c04:e001:324:0:1991:8:25" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302831; cv=none; b=g/mzUkUWRwf9fjdPOI8weYtY2p8n8dcNeW+Kk6lhqS+GJnLWo8tE+2uxRO7AY414WWI/Xg2utLJsSj35PrcoZbnCoZlocmINJ+8vghtIOyOQze5qoYXD6OJZVgGf3Dwi4yZ0HVTT2w1N0KENFZZFr+phU8r9Uwv8Ng44wagHzAz4UiLyMeWu6V6fHVguVrXwTxHSo8IJwx634fI0OKr7he9JXfuetVxMe2XOdmEe3keCOOfAbW6Sau1GRJ3DlWzIxntTa2kxJYMfCsEGknhbSJpURi2vjxRQgRPfZa1VRFXWIymqUtb5CATKxF4RxaS28gfz67O4eaWAKSFb7KQZNA== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302831; c=relaxed/relaxed; bh=pC818MO+3nQhwDWRb0SOC1ssBv767E8DgvGs35yUsuU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hnfUDNIEPBFQy5SR/BoYqU25Mju6nusrjgdxtCIUlf7EAS6NK4wLY62tLggkUkeIEgeD+Cn77sf3q08XoMNgt5nzdXdDtEb/pDRxRRvVCPSP8ftacQLO/Q6aIcCEG5t4D+aLIEcj37HYRPzrqw3Os+yNGq2HnTvMpWJ87jl/ZmItvgSVihQo+BKBrFUktJX0a5cnn9R5lW4nX8ZY1hc3MI8AQDpUdhzFvYgsm2MjPJv4FOfjHQARK9AamP+ABGOmznambJ5lxan52t+r7wjyQXzhFAnpJJxSA0L2rcro9EVABhtK7OJiLfakP9wuWHlYTdQIvgHsTo/6YxD/u3rTcg== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [IPv6:2600:3c04:e001:324:0:1991:8:25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDmG3TKSz2yqP; Fri, 21 Aug 2026 19:00:30 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 93807618A2; Fri, 21 Aug 2026 09:00:28 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289497 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4792-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDmc0hkMz1xvQ for ; Fri, 21 Aug 2026 19:00:48 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDmZ3Ntdz2yv0; Fri, 21 Aug 2026 19:00:46 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2600:3c04:e001:324:0:1991:8:25" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302846; cv=none; b=f4zzw4YL6rn4XayEzucS7zL3VsUd2Qn4r+cFOkSwOUSOL23cvohuUiJRyslmlxhNVRU4ozyH7gNzFb9ajxjNiwB6/Xys0y6oIgVSYcyeECWxZDtPiRajnmg5DvMoHrYNFHdUq5GqFT1tB6AF+++IQQ96y54GYLVT+1W5GdKnDEVzIkz2tCx5jRHGQ04A7BLNUKQUSrGZ1C8kl8BUzu9aBF4nRseBPgtuHEEKNdOCYO6VHWZ4sa6PSaxQis+Jq9qomWF42H1oEYMMclWlHgzDtoUlti3unfaCn+K82wCPBTgIA58fMm8Mp8+wW/5KeyyyAHs8Xk8878eN1eHnJi4mIw== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302846; c=relaxed/relaxed; bh=8xXwaN+RgdnPDyQu310UUODgjiWRNGclUCAE7JEqwyI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=X0wh3PM6us2I+25eu7LwJH9h11u6J5mUmS+KHa+zDE7/dvj+QQTMrydXqXt9HABBdRKPHA7dDNvI+x5EF0EnOsH31Jffm8iwSH/f+SiIBcF3LeNLbD+5epmE6CbIFWKbZ3JLXJ9sf0SSmokS0stsx3VRg8+hXjfmdORzF8ZQTTt3EkIxA7RKx5/y8y4t34OwzEE2O8kwi3oAp+C9RIB65v4r9Mhtwe+Yc0UCOCo3pwaxBFSts8z0E/YPrIgOqjdDCT6aFUa7rgEYE0Pd8qrdBgpQe0JnSVmviMWCE2WwUqORJ8Cy0aDPGbVbdDctjHIpzxNVrlcUv0M5RuQphELyJg== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [IPv6:2600:3c04:e001:324:0:1991:8:25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDmY3ymFz2ytx; Fri, 21 Aug 2026 19:00:45 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id A112161896; Fri, 21 Aug 2026 09:00:43 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289500 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4793-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDmv6G4dz1xvQ for ; Fri, 21 Aug 2026 19:01:03 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDms50qhz2yvC; Fri, 21 Aug 2026 19:01:01 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.105.4.254 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302861; cv=none; b=nrnM0L7iHoPe28SBwo/uou0v1d+V7OV/JruiSeZPFXbm5/DV2HRWR4oC9N5U60+pJfZoqNnmNU4DVHpXKrXRUmft2079FitQWmZ6b3XiVaLbUMNZxlIEezJAOAfmVy3fVNBu6yGFziFfdBmHCV+V+brh3Pbt0UwHXTon5LcKUXq3bFcYcfy12duvSZae36zF9P1W9vl4pdh1kLe7v4NLgF5X8q6WSa0u6AMWxzkAFjXH/E7Jla9a0oUMFs3mM2U7Dxs8CZucdIKp96QvA30K6D20tIjpE/Ma+yRyOOJwdqH1lPWI2ZOLtANQaIb1OtfC9HC7gC/6z12RxXWv6wFlgQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302861; c=relaxed/relaxed; bh=ZyHzAV45MXqHHZ15rBrnzLmdCc+GHBWPFxshRZ6Yqps=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TcxgU6dzpJjUdEWYNBBal+LpYVKGppAv25haYk5QjFMTPnPFvDlOqf0+xWIoXAXL7skikFDzIEJ0RJbDP1TouX78ryOjzxG8L33Ge8SBuo5ZeDRFXFF/ffqJkF+yXBpEmkIUNtAyledAksSl6Sg+GPg8RtFOgkwWjKzuxSzkSBBS69zkneuddV6Gz4bHq6/k8Ixwp2Tp+KMRVXlFLfLPBeOqNdOUN0/G+LE1d6R95moRi9Lp9On2kLeZ+StAMNVc2fKxGvknqbnnSCkh7dAWge0PuF2XYyt3LLDf8ddQsxOBehAIJuPB/1YFl+FzY/nyI89fk1pl3NNayIuX65IRYg== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDmr5V0tz2yqP; Fri, 21 Aug 2026 19:01:00 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id AFC3061897; Fri, 21 Aug 2026 09:00:58 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289503 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4794-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDnD26B2z1xvQ for ; Fri, 21 Aug 2026 19:01:20 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDn84b9Yz2yvP; Fri, 21 Aug 2026 19:01:16 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.105.4.254 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302876; cv=none; b=N8im9oyI3jt6iUJaZ9qDxZtjRzJOupuniT242BnvmaXQud1EudGjfQtyVPAovaT4Zcik5G9f7TepFOhK3zCuh5JXJU4RBRLfuDzgdx/KwBuOHLb6AAIczntfNhFne2DVRZn7J77szpT2zOmot86tzRms6m75VnsfMt42PblZ2VFpuoinn9eSRq1o+lK/Tz70YT3U4i47HOofhorovJ3Um13Pezd/OlfdygEeUS/P7mlvPzIz3oBvdx9YvGS06giu1H4qDgsRaA6hCbpHDEl9FB4h7Zs4Xsdzl/TKrLDOm7MZFdtam18s1Yh9H0GBi+KTCKzrzyk+vDXl2w3CHwwOkQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302876; c=relaxed/relaxed; bh=05gTl57+h9xghNBWG0C/kPdhcBSMafMBqYK4LsWo/hI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QEzuVT0aHmET/UJwX/aoOLFhtCCmdbm1gowVhesQvBAMZkwjWAIF5TSvfyyK3aj3RBwtf2JgoSN1cZzT6B8Ean8HWRtkrr3mJIN5n13lkaafctPPhFhivIswBs+U2CHqUt23gLdPWFU16yEZd4tJrfFeRH44OrqkI9QKc2xsBltwIw71KQCIyTZzLBZEdIOpUL4qqrpBbfwwpcY0aU+mLVYsDBh5xSs9wT/Pv6Q3VrP2HPIYJSDgQFu+KWLbj7+KcL3eB4KEfV24bMlQRHnePM8g9ChLGOV/t2+4DPGhi6UhVc0Pcmn8vmHjHMKtj6Vu5J7iwlNd728IV2U58xTJYA== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDn75Wknz2yty; Fri, 21 Aug 2026 19:01:15 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id DA286618A0; Fri, 21 Aug 2026 09:01:13 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289505 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4795-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDnW6blKz1xvQ for ; Fri, 21 Aug 2026 19:01:35 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDnR1Wt6z2yvb; Fri, 21 Aug 2026 19:01:31 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.234.252.31 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302891; cv=none; b=QfTSHkrGQ1oxkMW+2kX95L+wIoxw4GVfZj97k2IMM7SJilObGDzTVT620F8w7TXxNjz9kd59ph3YXWbIsBG3SvtCiFM9g32Y+HFw08ot18SvJ4NKQyCyUn5CL2VCGsmAX99pE7DPGUZTAU0wy5hsQrq4eANJbqp2I4Ph1vtVxRfnqcGw+N+/Cpy/bw+dy1Vw/4P8WoXiyEQiJsxGIrW317Vk13mA9Bx8a3I0pf9PWBhQLOlgJq8NVKm7JxWzFJTkN719AkT666fUO8kEcRvvwROQQ6guJW/Bs4/QsiknqN5wfaTtQCQ4xL2CzuRhXkWbzz6gdBEUI0MxvEbVfS8NIQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302891; c=relaxed/relaxed; bh=FtnjRRrO53tBGjyA0IvZ/MJnJC8JbX3FazwHIo/vkoU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fuQvOMcGoa+Yl9V5LkqwejGiDWRTPz1kZWFcbP8kFEHunkE716PAhD4J2yv/XIIes1j/r725NFS9YAHKpQ9PLCp6PPKnFshgrEKhvSGSFG2I8Q2yscY+Ya9KkB2dqBX8ypICHYp1miqXHnUE0TwVTJzMi3w0h7X+YC43sEM65rbY4zQjYlsem114xMN49hQ1qVjvWuU2ZIhnyspbL3Cq+t/T2TMqH4hUBDE3ob4MU5bZXrLS/4ZjyhvoAPfQvFB1c9ujaKJ9euLxbVGnaj/zvcMc7nC2jGDhdiIJOgU0TZgCFHomkwPyqiPMpmSlZGDDeFsVDxHKyk33Ks9XAvyaow== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.234.252.31; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.234.252.31; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDnQ2lFBz2yvY; Fri, 21 Aug 2026 19:01:30 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id C006745062; Fri, 21 Aug 2026 09:01:28 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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 Reviewed-by: Heiko Stuebner --- 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: 2289507 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4796-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDnp4CXWz1xvQ for ; Fri, 21 Aug 2026 19:01:50 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDnl1vyRz2yFK; Fri, 21 Aug 2026 19:01:47 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2600:3c0a:e001:78e:0:1991:8:25" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302907; cv=none; b=mCAOqMlWClVLFgOv5cnym/tya1xzs0zhCxTzAzmshyL8QG33arprGrqsG34bmkBkRQqMrUND6+wNVtD+rS86iC5onP55RenWJvOC6uJuRJO3fs6Yq+rfcbSO5W2wVftepa9eoshAL8jDkvEHNWPC1YOM1VnwEdYwd7WwtKwMlkH/Zs3Pk44IcOZ4eswV/VFa4SsCoenyOSp9frgqQefef0YnmEpmzPphtAobEPGWsHnWmQ5NVD0LFHpCspxzytaNof1OTBKEgt1I/P5xEK71cWgOudsrNdOMcyu5PwTjfVmy1Iem3RkCehQFRZ7QVgmreVpUWcHzqIRto/35tmdjzA== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302907; c=relaxed/relaxed; bh=rh6PFwmCJ1xglf/mQve+dGIZod24rHn0R7f9Dl9SJ9k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OmlUfH6b9r3L2ff4wpSzUdVEf5CO7+G8/QndpD+dVPAU2fK8xkvfb0U/ZU1ctN+Jfu3zBawZbGDhxBZqtzAbh92HCrjPbs1o0EWm3+HGNx2uW6l91DyIO1oWvTSx+iUR+78DJto4lzxjLBTqwp1UuGBH5/UtTOC9qKBzveeQfZh2jIxJF7JtQN+gys08SBvDPeRLTazlF/16MWRXMg4C0CmBYXg4qOwrknlRBGZrLQa1Z3b7UNQYSyCB5nTr3GEVAJSdGMGo/SwUX39I8PZmH3/pezN30WelxLfc1pw5ZeRfMOScKhOO5Ye9O+y7Uwz0UFUQYqQFYVJaDqAS7a2pRA== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=2600:3c0a:e001:78e:0:1991:8:25; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2600:3c0a:e001:78e:0:1991:8:25; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from sea.source.kernel.org (sea.source.kernel.org [IPv6:2600:3c0a:e001:78e:0:1991:8:25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDnk21dHz2xWt; Fri, 21 Aug 2026 19:01:46 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 0364143D4F; Fri, 21 Aug 2026 09:01:44 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289509 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4797-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDp55W1nz1xvQ for ; Fri, 21 Aug 2026 19:02:05 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDp231zhz2ywn; Fri, 21 Aug 2026 19:02:02 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.105.4.254 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302922; cv=none; b=CGr017OuF+Jilz6NAPbkiXbB5WIBsT/mt+JqI8MhaXmPGaQU12fDY/OTvs97+/aB5K3GbP3maHNaDR42oifbz3ixzboIcS5abPXH3iV8adF+PkZl+s6NJvT6FTATDg3KW4dZlmBgpKCCpCCO2133yPhGbbOPr2xRYjMpgx7UQ9fsFnalSCVou1Uu1ihwTMeVY0PzyGMh0HIKdcYxaFbvQ+iYW4iOFkxwbPRru45ZUPhv9Ra4eIP5YiLmcsDWJ6os2sdrPZqHfJD6v+toeaoqoGQerPirneEUL5qq01ka7OSVwZwYpN1A+VWD/QRhj5DUhn8xxCgw3KCj8OhtszzpIA== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302922; c=relaxed/relaxed; bh=NQHMtNGYh33aRoPAi8RPd3UZO5E2j6ZyBROIFyP12mM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QbbA2kRbdqpHycxwN9KVXUM40EU6ABhuHmtFojKPWBiY0JK9BtlFa9kQlJGuCsWYk0vDhFQI2QCTWKeCROvWzpTYMR1C8PrIFgDrmSxSP4iFap4TRRUfQwym1PEUEZv5OcbD65XCYYTs3ei/JnmwPZbS9DRyX1K8fFu8el5/E6n25YipGSuR6ByYD9PlAYszm0NXlVODOzjlqTwVoafjeLhpDm7j9ALEWqLUZfoFJKyGR6xLa0e598RIEMrH1Han7nzQidjLMB5pGssZClQuIwueQRk09LE9RhY8ZpeNR7SIG2+MooP2DJl70JH70tfgZG8+dn60667jIo7DUfqCXQ== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDp12rTYz2yDc; Fri, 21 Aug 2026 19:02:01 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 359B661899; Fri, 21 Aug 2026 09:01:59 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: Sudeep Holla --- 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: 2289511 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4798-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDpN5Hhbz1xvQ for ; Fri, 21 Aug 2026 19:02:20 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDpK2vXPz2yxP; Fri, 21 Aug 2026 19:02:17 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.105.4.254 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302937; cv=none; b=KBwmJWrjJZu4FWf/5zF6vrfFFCf1PP81iYVIn5uyJ18IWmZqPOqhX7MR0lETM8aHPcPXClF3fHt9Q2mA9HJvkEuFAcKxY3qDy4nWh+KS//obddQ7K165vGaf1q2N03KsRTZQyKEj+m5MjRsfuAkMvogHNsYWzTDyj3favDCh+jC2D04caev+9A58wE3iFrsMTvFoHdWjuRe97g3XLumE7ip92pn/eitVaoAr4dVQ6QO6BC6t1SQm9vsCuisZPb0cs+XTRLAPSse/9fCKCMQNSYUmuHjfh8VM/NIHK7zNUp9/4CxFThViLKDQq92Mhv3AJG3FgptORQ9OmlURIWCZBw== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302937; c=relaxed/relaxed; bh=aR8mL8TkART+bnB6QDDIWuVlehNY6D0PqxvLTiv8u/k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Hc7I7uRRWis2iErBymDvhio/MPQ4BsnMdAGU4ta1m5jvkIOjlIZJMw6+GPs7CK/9l3mRBw5fygqL1vLu/8yQdgwTabH1cdlj0fb0SwNt8etYQzyDK2eC91tlXlikEnvP05/Lt10iZwG4asyIWxE1Q12GiuGNN6z2v9/oJaK5L4dAPujiwOxvRCSaBKZF3woUg9Nfpri6rysn+EuFYeXsuCci5HLG899MzrevIRPP/wVrY9cBdi4O3RzdfapHZrdV3qAfBu3UlHOw1g5T5QmZ7/xOW2iXSzYO/rJjhe4A+huNuwutRdZufVRORPNmhX89jQZ5trobC4XzvZzAiQYtbg== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDpJ1mzJz2yDc; Fri, 21 Aug 2026 19:02:16 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 4B1C96189F; Fri, 21 Aug 2026 09:02:14 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289514 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4799-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDpg36r4z1xvQ for ; Fri, 21 Aug 2026 19:02:35 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDpc1xFQz301K; Fri, 21 Aug 2026 19:02:32 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.105.4.254 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302952; cv=none; b=eGTXkgYJ2DO8imDigmfYiv4dudZi7w2WOaf+S3IlXtHa4eei7NZDmM+ed06+j8zi6IrKulNAuySmjFEYERHpw3P9BYTRoMvOPKQAa4S5HmCA7edHgfOk2/oQUH95h0SGSDBvUztxsRRjKYnkQhd4/sDH8YRE42LnQm+JeKnN+/vtwCJKP+D24QCVXalaDUYVxuOdMwTKNSX0vih6NotXL5nPrr6sOgkHuI49JHYX1ZLYL5eRkSVaZ50gIPknnNUeni/PZST5a5myVPPPQf2d4RyXouRFJRhLGjHNz4wz8M9pumfAE9m84FwBiKNXo8uc12coB2M/JTqvTMXzuNUPzg== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302952; c=relaxed/relaxed; bh=XrWX5IxvUV7fO+wAsAFbmIKLakSgSg3UMbU7mGscEOA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CTQ+deTqAk9ttnChbjfja+ET0XiorIUM4MtmLPKlWSoRTbQfI04/uWuPgL02U99oYaBQ/YB+n8ZNiIv8gZGrnCc+k4umMz5BPD4oriOf3Kd9orR3tPAlK+V9w7/GZpX9O6nhV00l0l2abMSbey9DmH50WHUOjtzywJjItI6VsQ0Ao0V7WKSKtG6H87UX93EkxGGI+SPHUKDDz9Y6DyFqzl14nWtAdRSOM3zPr6n16On1S8APze79/ytpk+awnZdpIoh20I/2MNpz7kp0WhOq6i6ZrSzfJJ8UHCZeB7e3PWCPVji3cuQwroqRqb/9SJHk1ZueFQd/jPbb8j6NtyNIfw== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDpb1ZWGz300V; Fri, 21 Aug 2026 19:02:31 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 53BA6618B5; Fri, 21 Aug 2026 09:02:29 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289516 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4800-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDpx6LxNz1xvQ for ; Fri, 21 Aug 2026 19:02:49 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDpv3Rslz303K; Fri, 21 Aug 2026 19:02:47 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2600:3c0a:e001:78e:0:1991:8:25" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302967; cv=none; b=NdEF9xQUcLRObxQavE/Os6Hwa12NGD+gzn25iLixSCvdbulCDSH06HV6AKHs0UsZbhcIT9aW6nS6lUwDI5ZEZX44+3X2p5Z/VroS+foCySeM2aUCH9pGUsJohl0nonQVa96+k4qOOeIhIHSnreFBWx31fezqrigVtwq+NSwlqKrq/5YNEWmovaWxmujdtR0Wrn1pFKPArFiU2zuD9ssdyE535Y/3BXHEW5fPSL6V3jkxKnp4Qknl97d7ntzD9GD1DsX757VyH7GFb5rBLRWjQgG6fVAAzu+Vg69wbVLE+xIUfQAkWq+bdahkmzpBYxobBN/ptNIhp+2Tn8CoA6XN2w== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302967; c=relaxed/relaxed; bh=XncYP+BmWd0bM+SFVau3RxfhKReq5yCMsSPg4Vjf4C8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eOiLLVte3qs1NAM/bgn9M9FzgBSBW2cSJHHjUgI5MSeQtsfWM9dINNxNdyd5x+nmfBwKDjCLaDX2LXIqLzJhrf2uC5YvEF8dw4xPW2vokQripmiW7p3GETSd8BNA9JefFkp/lZVUf0pj6GRNO8EZso5W/2JAON3FxV/wdX4Zq/yq90a/GRbKniDsXsd03oUe6FSl7G3+C+Tibg4ftocBNZFxSg0Hu7wvXvHQWYj9zZhToqXS6dIEmmBgSMXQM9hVUta0T8fGwxp6S+FHY5JyAuZQwA2zAw4XgUGmG9mQhOQpco/I1yU6r6cz80ad4FNtKp2OH39mCpvsGzT085ywpQ== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=2600:3c0a:e001:78e:0:1991:8:25; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2600:3c0a:e001:78e:0:1991:8:25; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from sea.source.kernel.org (sea.source.kernel.org [IPv6:2600:3c0a:e001:78e:0:1991:8:25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDpt3tgfz303F; Fri, 21 Aug 2026 19:02:46 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 3266045123; Fri, 21 Aug 2026 09:02:44 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289518 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4801-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDqC64NHz1xvQ for ; Fri, 21 Aug 2026 19:03:03 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDqB26WWz304l; Fri, 21 Aug 2026 19:03:02 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2600:3c04:e001:324:0:1991:8:25" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302982; cv=none; b=PBraRxS7jKVuNAhG02mkb6kzgKC/2OVD9OgEevjJNwflzu+0hGy04zs/WTTA0IkpnGVqahAAQinMu+8Lzvs9/b2dxGrlzY/YQxAlxC1fBAh6vriSJTSe5KxaLcBO7s1vJzpsyjAaIVI0shDS81VyDmeAYe394NtdoJ4xS7W+DMq8NBATlu01yZnPkKI+vPB5L4Pa77EX0IaoY++7lDUEalgI1qqgNvBhEJrhHAn4XEQ9elRmRetcbwfegZcR6rmFk89Ubfv6+u9juy2Z2NsnUtb5u6H+Ax4eiEgffdh6OaCj6xNf/Ax/QsnFgs5VzXuYMSzcf2Kui77jMnPosjen/Q== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302982; c=relaxed/relaxed; bh=6E5fG2+nEik0ay/c+1HINFkbMjG4z3r5bpfH0fvjLhI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cfUVX7S/N+cwuzkWRk4r5tAcc+VXYePLjloF+3Xt8AARPbCmnGm2ZLoQSB1zOHmoQJFueySoK/90GNql/B1erNKxi+ChzbMAk/mRrOF5Czki4pi3Pozd1OL83gvyM/HMf/L9Kj5Cb6CV4iv4fTP6SI8EqaMFsH0ZOpLh2t9kz6wyJr1r0FwyJRwXppt+Ieu1Dywt8K3ZycavEL61vmAUCv3vkZ8OuMPiXlGaJiJILmrhYU3y1MGFfwBksc5Ohw7bdwCtyf+vvzr+EI4vYzmv+PZevU2wLWBLkeE4knLNdL2WYkqV8HSgBFAdEcZlQ6kMnd13rK0h8xvXsJ0NnNsBuQ== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [IPv6:2600:3c04:e001:324:0:1991:8:25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDq92zchz302l; Fri, 21 Aug 2026 19:03:01 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 6B4156189B; Fri, 21 Aug 2026 09:02:59 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289522 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4802-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDqV0ZkBz1xvQ for ; Fri, 21 Aug 2026 19:03:18 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDqT3Grcz30BW; Fri, 21 Aug 2026 19:03:17 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.105.4.254 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302997; cv=none; b=ZvEO/F3CDQxlPM+102OII1UbLOxvdFgrGIiPgUxPCkdrrvRpYnotjPvVah9cYqTjtr/H+tj/NfhZnUXXR6/t8wrGncWBGIXc1C4kPFGXCT6pfwTlpqrPYWUC1I3N8/d/CUIW4zZanpgkkM8cNcrmaPso9kAjxHBVJgvYnwPSWBCsr3FfOMzgSE9DYXbYu1Pb0sfdtHx0MAApDWfY7lI8Bhj/4DYZahgQx4AEEg2nkmvm2SoqtoXXWJXz5n82YoNqMFkPdvnYMmid1Wl4D2bbgF5xDb2g2XlrDlL0Trwr07Hf9HVhcow1XjSxWdoi/kwmLivxpIJguxincS6dtSKeCQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787302997; c=relaxed/relaxed; bh=uqx3XgkJJohHA7Mcb8Jypbo2yvaRetF23BQugkNhEe8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NygF9p/GM0kN8sxT9NSBi1vsNBxqxQ5AaC3W19+rTupcqNf8g2wlyuUw5+zevYiPGoOEHYihFWFBlxhBkO8L+d//rQudXi29MVFhPIwu6wKUB52+PGvbuRZRK+9YaTb/gB00T/dRpwjRa0btREqUfXc9UX5LkTudLU6+mFsr2ONB84gI1gT3mhcycgDIM3+GsE3nKf+TiVrl/gRjshVyR0RAIgRzvQCKFwF1NBJi53Z6voXGdzGgNu1JVulFO8SCXacmNpu6xiLCm8ouGE8iHOlSpowiDKn5Imiys6EKG179lIpdFG999YkiWvE3qlWfvhYRCgCtEpBqaL3BUWZOew== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDqS4RSQz30B4; Fri, 21 Aug 2026 19:03:16 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 85569618B8; Fri, 21 Aug 2026 09:03:14 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289524 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4803-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDqm6f2Xz1xvQ for ; Fri, 21 Aug 2026 19:03:32 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDql6qVGz30WR; Fri, 21 Aug 2026 19:03:31 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.234.252.31 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787303011; cv=none; b=PZBx2FqsYlzg0MTW5eRY4W0UVnRyEangt/THrsH1GY6tRwhcP5HTxrjOqz9nriLbcNNXkSIF10JPmLe0LTaMCwF87rLut4jACeU8e3spTfLHqpP/LESVIBR8wP/TuX/GxwnxJz3cfokjddSNFZ0ydybSakRdGnpUNeWdTg2cVl/2H9sPMhC6ikjYK47vKDGCwklM0ZWEaOU5cxBIWvHqvbT2qmhMduLEybiE6roOX1kjBG6y7mDEZYkkp6vUycTvXKQBrVCnJ58/iqaTlymnqF/TdsAasX4/9ELkheD2flkUEd23RRXHV1UFIFevOb5QyluNJXNm9nN7meqc+BHYoQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787303011; c=relaxed/relaxed; bh=w0/s+bb+js2b83HDw0YlgeqQNEJGiYtptz+Z9ITYCsw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Mok0VDXNm/N6SI1Hlsrtgf7lDkcPGrUQZzaW6NgT679y8Vf9J9DeAFEKjX5YwQrgHClK37klwhu+YTiQ4Ka9SBMFrIpnMoppAgtuseCG3ZNkKbyyswHlQFdkvzayRmXQhqNKu6yk5cvxqP44GkxwtRed1Y8BEubRqkTBSL1W7egE9fvUUtO0f8R3H3MT1tMiG1ufeKVy92TNVkxnIqL7Htu3pk+SjThUlqsNPV4Brt5EuxK2ofT1AGZvMneFjVVQJpu4evB4ibxZSRcZ/K1Wb0K71XV6p4h/mUNHkWEAzDQBrGtQPtv43QopxUPv2vTY4jlxdVrG1zFuC9LRKpm1YA== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.234.252.31; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.234.252.31; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDql0xjJz30WD; Fri, 21 Aug 2026 19:03:31 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 64C1140C2F; Fri, 21 Aug 2026 09:03:29 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289526 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4804-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDr33BhLz1xvQ for ; Fri, 21 Aug 2026 19:03:47 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDr31YvJz30hP; Fri, 21 Aug 2026 19:03:47 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.234.252.31 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787303027; cv=none; b=cQsOPfobMzCA6+IR1QUQU7es9le4QQjJBfmYsz38g7VA6hoN8r0jF440G93rnLtlZotYDh/3BTIneYi+WukWxBOhakR1QPUxis5ELnEM8GmWUgRD+vqdm8hW19vkloU8yMMDu7TyWtXix1ibHPOHqNwHbNwE/HHZu5Ym66bkrvZGeI0rYMHC6FDvdm/8B5+arV5c/C9ZZTnl178QMZ72XgQwdfXu1lrfUpabIizgFAkPm8sBQppYOVxoyZBxLOKUx7Np9fPxUt+hK2mJI2aPPfai/Jg66gQJAQLQGeJ/HFq/46yF/HMb/sPgtRchCiX3a91At8GidTR5kl9BLVVjCA== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787303027; c=relaxed/relaxed; bh=1U3S7OiKrSVjqr36qvoVhjlFnjsEcKZD5Z4POBhizKI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XILwbeefWAN6Rn27b0X+6Duysb7j6YJbuffyIGeXbTx6XtItHAe2s8cARepcJPlR5FtJoYqAguJloqKSoOAaT6Iin2elp1rYUBOOII6OfCDflP0iT0B382cAD2dInhqIGwzaqg5cPa72Ik5kqWrtQbK4HFGbJqzDKqBjO1OL63U84RkVDnSuENhZJRyscrAthLm24L3l54m7F8VL6rJuIMBnXnQxOKVz0i3fqX6vD4k8/TV4mBE6Cb94yaqPl1Nw+rAzcLpFXyJNF0DBWMX/Xs+n6j4cYPTBLNClJA2o5FAI+BuBZQuT23+3E4lgpTUgV+p8syPg+tfLadPExMOfpQ== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.234.252.31; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.234.252.31; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDr21Ccjz30gX; Fri, 21 Aug 2026 19:03:46 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 74E0D40AA3; Fri, 21 Aug 2026 09:03:44 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289529 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4805-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDrM42K6z1xvQ for ; Fri, 21 Aug 2026 19:04:03 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDrK6fDRz3bnx; Fri, 21 Aug 2026 19:04:01 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.234.252.31 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787303041; cv=none; b=gK32g+blcLmtx/M+FI9I5348qXMNoB4fjsVNOW9Wzow9Ai9aDPO4zhYQ2binfbBqTSg7Ban2bcstyQfDpjZcadCT6bNyhMR6oeDz0Z20o9YhVkLiujXhBFr6NFaywCPqrE8AerEpqvhEcM7uKACDlGGfzmd+VAu4Q2Z9CjeGGQme78lI7XN5MTrlGX0iOWzzKJTALKvuzmKbnAQ+MctgfNBznjEl9fZYjwjJfD/uG4PY9WfCv6G9yjmOKZQ/HfagDIZ/rbwUrejA81kryZvyN+uDeIMrhoxcrADR5iOHsekNZbsvu9qr7d2qdiSuOq2IgIjvIQBei6IKK8vQ/Hljcw== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787303041; c=relaxed/relaxed; bh=HHw2phGMpilBrCUaA9JhcC9At+jiJ9lpbnVuwcbaeEg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lLNyBIQBAfwydShOfZcOHzW1oziz7/OMpJ5t+7Jb0HYGMJfJwnuKYS+TzlfuoNT6XoRIXgbdLURyJ3t85n9a0ErPoucn8yfHb0fuPa5vvjWmclpd8pamSVCrLekkOgHfBr1K1YJ4Cjan2SBLAPqLoLNyR+PqhMxDFt4A3pNAxz38gQXSiNQmvgDbK/5t3uO6PMJvnTrG/liPfmN6DNzTlpfWxRbSrNvbvwgNesTgLD03kAHxD8wnnZwHdoWkPd3sDXj9P7uxVGJLVmY7vDdcHuECZlKpN/X2sFFpyzWeaNgViSgsg5zCRNU1I2y5coL3pVWaHwGHneWyCj7dk0AV7w== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.234.252.31; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.234.252.31; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDrK18VQz30B7; Fri, 21 Aug 2026 19:04:01 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 815A5402BF; Fri, 21 Aug 2026 09:03:59 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289531 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4806-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDrf4pXBz1xvQ for ; Fri, 21 Aug 2026 19:04:18 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDrd4R58z3bqM; Fri, 21 Aug 2026 19:04:17 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.105.4.254 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787303057; cv=none; b=RIob09Ge39cFMm5jfaYRdUHtYVAZtvwTt655z28qiuxG9pOkdr7JqNvNpygHxYOg0tKJcXW5TLVW7PHbAtaUGB9uN2sV+KuWwQZyVaUMiiGrHKGFriZH2Xo+6b1zdm9tIwVz4WO0vbO0gyXYdNpkAoh9r+R57jPhC2HA8x0q55OIhYZT/8Hr++Tpfp5kjw3xSjJCKYMbh0aKD4hO2aGdkJP+FRFtxrag5veKksZL0DBQ66hPr5Fy1lmDLD+AqPrNUVsF5/ADcFqUKuG5WDLiAnlAxMKoMk3m2+X5JjW/OmRbMYeODrZlpHoG9AmbGclbp3IgVODazKGN/Rd8ap0rJg== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787303057; c=relaxed/relaxed; bh=Usy3PgSBIh1QSQ6laEpUYZGvqSHbiAzqMCe9pFrPVU0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=g4GbDA/FeG1NeUCJdLqbiCBQ5EiWt9YG8xaDmq84G60BI6jhIhRem8dN2mfifFf7M/nsdagbh5q3pdKSpRtzomOwdyYpd23txEGXBFQfjM0b/y9fVugGqFM0n4kOxzMPExUZ+auMnD8kDL2bZ9DWW7zy4ii4c5z3qANXSHlc69IbTx9EDVyIahgPCBMkRr0mzN8Q+Mj2KmSy3ekinLId1QRZN6i5Wn4/hrQxdvscgzBxU+IT+PBu0YV6P0HSkofx32uajudY601409321jV7ocj2eEXQSJSonBv9MuGvS+qdJN8GDF3JlcPwkNU/t1dDQDBIXYs9EbSXvUmC09DWNA== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDrc5LMlz30gX; Fri, 21 Aug 2026 19:04:16 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id C3B4C618D2; Fri, 21 Aug 2026 09:04:14 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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 Acked-by: Ulf Hansson --- 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: 2289533 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4807-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDry2dgKz1xvQ for ; Fri, 21 Aug 2026 19:04:34 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDrw0Y7gz3bqq; Fri, 21 Aug 2026 19:04:32 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.234.252.31 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787303072; cv=none; b=od6y+ZTlwlwQ0cdOzsSlU1lRtv6J18rijpCbapceyYPjVgi4nW3gJB+qDUdz5OPUIb9xJHaJmEGh6yOoDd0RvqrI1N3TwTpT3HODEDIsK64q0U9YSB49cnyOMAloJV2IZcyjgcxlZhKyqndBpFhyobgbWAoWnnmjvAVLI3d6zfT15kXEWhqFyavGvkymIAi9qicG8+Tzn5u1hGv7AlD+cIped0HsSRKuALdo+JrVhNieWTH1d+RbV7BHpbxu8mP70whyFmeS4e96TjHcq/8BYmnRWxrTod9lVXowGcTYhowi5uBqlFuBFnqjf8IIqfta/gunv4T/9lppIS+2vkmJog== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787303072; c=relaxed/relaxed; bh=UjAbSupE/I3gjkA/r+CxggJI0p9J85Zn8zuFFXwGXVU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=k15hDv5hHEOU5JW2C3+SPb/Koz6yob8HbASuZaWIaPSnxR8hIbJ3tsmsthfV/joCY0xzGUwvZ9Vai+NVufGgvVK1NCFCEmVJuMWr3fgDL8vFjD8E4nY5gee7u10Q3ny5sT2MYPAd0necTy02m2hBHHc4RZ3R+4HLYeMzYqpAhzCYw+agCdpmQf96iw/ri5Aro0tGaKIqHh01DxwV0kZBakwZCgHTkFcB8v7AiapxNPfvG6Umxj5pn7B8ToH24Av6It4zlJABZEa04Aewcqx60e2c7MFVDh75v+i/DiOeI4lrVBMCBJK2dBw4v2du4ujFH9zkwGFn+IiGPhgAPgk8Fg== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.234.252.31; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.234.252.31; helo=sea.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDrv1wrtz3bpx; Fri, 21 Aug 2026 19:04:31 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id AADB745142; Fri, 21 Aug 2026 09:04:29 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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 Acked-by: Linus Walleij --- 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: 2289536 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4808-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDsF0X8Qz1xvQ for ; Fri, 21 Aug 2026 19:04:49 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDsC6kfbz3brR; Fri, 21 Aug 2026 19:04:47 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.105.4.254 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787303087; cv=none; b=lXei7KXyFu7Sqc9hpRig+M4v7jm2sUt99eN+L1kYEs6xibRk3ALiph7Q4DU/H5Kx5d8IJCSAHhEUN7Ewd44i4Jr5UEjRHrV4s0FETc6BG6c1tpdQMZxHdm7q5Mk3aSHeJkO+rgD4C/01Z5gWVwYsv8M3BveNuPUJgXdFJ5QObfMErDj0tnXc8h9eUAuTBQDXOCDQmlrz1rGW4JRtMaepIoLGjIMP+KekP82ZcJMlCVc3baZDjYniwbrS751ix3CCFX/dXAd4yOikhGuOdGALuj8ROc077SRLkgM90P99D8PqwqIZn/hPBpbt6NeC37C4hb0mubrYXKd4totXzhKUAg== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787303087; c=relaxed/relaxed; bh=qXV52+XJ+DRfn1F+0FjeSnHXuvt+SSnmIy+75ouQp+U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VNEAqw7OiGrfzXGpUkdKFpcW0ClSNctrECbSo/Z7BTN4v8mYkGijwvce6yxhK1esoFPorUAk95+qzJ6Vcn8RC8HKmjy/AVNTtrUqOysYs71OZe6fiqMdwUjSZsKPvciTB0FwRXfz4KzXSVgULAvRYh3iWqxpxJSGbhUxmq+TUww2EsSL8HqD5R49bPQBrOe2EAdaRakgwCTnhkFwqCM55wPI6PvogFo9a9bWk7wDaGcMAk1N52ZsRX9P4QmLjOjs53MgpCJOB07xO6vXdGI5b2Z0gcBd0BPXRC328iifQBpqiKToVz5nS8c119zaAo0cChxA7csa9ZLjdrR4Coq5fQ== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDsC09d0z3bpx; Fri, 21 Aug 2026 19:04:46 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id E69FB618C9; Fri, 21 Aug 2026 09:04:44 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289538 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4809-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDsX3Phjz1xvQ for ; Fri, 21 Aug 2026 19:05:04 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDsV61vSz3bsL; Fri, 21 Aug 2026 19:05:02 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.105.4.254 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787303102; cv=none; b=YQAiSaXpJF9429UwzozzTUi+IiwBPhEHdo9E4bzcfLt2DyGCXQ9zwwovhf36fDDgP1n+MwzzCQHtBMVO6lKNfwVuqynSqx9pIZ4i1Xi0iayNA/+WMlPtftyQDQc5mt94g0HYpb3z5h9+SzPLgDdKW7rbdT/xJK2lUJThnZ7xSP5Tml8KAtSZhTjapb16p5dk8KIKxoW7NaSKCMufr/i9FrMrIYwz8hBOcXoFBZL0hLMLx0zipRBVuM+6M6iUnnpt+5MGjYNRpjlYd1/ti1YMNwmYPwsmVBg0BHcfSs2XgwAZd/nGAzX7HiGcPyndbK/Q0hqfTVfmwQ5PE83F3CeQBA== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787303102; c=relaxed/relaxed; bh=oNIcbkNGrav4X+tGpa6f5NksBwBQLYNO1DslwLk7zQo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Fd4j8K3/WO4b9aPpXcSVhqY5+IcIPOUcQB6bqz6bfpjcGgcQCJFSTJxoYdD4dQtwx3jsTSN86tQgorCMfMfAgmuv/mdizZy3rvSlU2iU6AqtPd4bPadeNzuAasrLn72ZQmxm6tS/wRIpVupM1ZZXzJIVtKmJklvtbVq1p3xSXPaSr9LUAwtzDdl7E36uaWw2lGTKqPe4pK4Up1KgIqX6fEpDN81mqsBjHClYvuQbtQJqP7olakURRPloeJpiGLXJvQEBoJuh3mr4gMyWac2wloTst/u+4V2EfB22AcX8+c3KfdSNo7VSejMOYSkhHyh2F3L8LmVKeJo+joCE5S5A1w== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDsT6T3Lz3bsK; Fri, 21 Aug 2026 19:05:01 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 0A403618D7; Fri, 21 Aug 2026 09:05:00 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289540 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4810-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDsp1njCz1xvQ for ; Fri, 21 Aug 2026 19:05:18 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDsn6KfXz3bsX; Fri, 21 Aug 2026 19:05:17 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.105.4.254 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787303117; cv=none; b=OuD7Dr9M+BQQugBgQOlfeKhLkhc4j9yvxFqzfDzgdQhw0osaKIq5VrsTPLDqs7enHOZgGneKK3tz/kOZlR3jTeOJU57QDPvCozdlYgheWodYR7S/fYzXMCmC8YNY+XFvjzNBE3KGWdnUMJ+FKfnd9Iy+Nl91p9bzm0cEL9/Bp8iMq2ysojAj/TXmAdIgjTmZLvF9rpwse1D6zxNchCbfv6cgIs+glNZ+bgioE4YmSbAOOsO/xskepTxteyaPEPbHgNWJU3P7B4pJm1jpSrwmPCVRJ7SDBviqN8K7tOgS5PeTqc96RFrEhnxbpUL0nUYIa3n9SUa4/MGvSzB652gZJA== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787303117; c=relaxed/relaxed; bh=jmqVrBvpc8seaSlewwMFXORAx+tTpcIR7P0mCVsBl/8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Qm/jIu5sBRyxnj7m3YBxCuaD4xbP0HJIGDzX1sS+HlfKAM+OfAKruj6Cgt0Eq18LjyU/y2Lx7zu54Q4JBrlZFv2+pwVt1XpLsqoVBpedRKgpCD9MWBO9BxOuQ9V8bnULolssnuO9htRDCDq3WemH26oI0W/pDKNPneQDyec26+8vunnPre0nNA7c37IsJYJsJJJMlUvjUWtSTpkAEbj/L+2lQDJOAQUbRrRNo+0Ofgui+HnLzA6OKCFkzWgQDqRcC+md68kxuW9ZeO6Z5L505Rv2EL/UunrJtpSJbFIJSz0OMLmAZ33rHOpoPKg79uRsuJ8dmdAbYlTqNF020nHPpQ== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDsn0B1wz3bsT; Fri, 21 Aug 2026 19:05:17 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 1A59F618E0; Fri, 21 Aug 2026 09:05:15 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289542 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4811-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDt515sXz1xvQ for ; Fri, 21 Aug 2026 19:05:33 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDt46v6Vz3bsy; Fri, 21 Aug 2026 19:05:32 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2600:3c04:e001:324:0:1991:8:25" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787303132; cv=none; b=F3wVDxLez71D95K4weSpEVBHsD6tQ3I+BZmRJAAu30pXFI8ITXwt0rM9/NJBb42rq5EkPN/hWnPCGwrf5W7Bap+QcV7r02zqxRE1YSVokn5SEb8kCgzTUQ7gs1i5wHHGy7iu8jlLjlQ9pPQtZMHXfYBGiKK1f2k+xqwNntSud++1IeJWN61q2xEMKaj/kC3G9KZfKNx18zeYbRgY4Zpz8/enCvAe5ctjpjv1WytMsxNGxHIM13UBNXtlbfjjRh8MzBDYXsaLFXM2zFm2kntZDpm+rZZYmIl9rp1fkQQ7IitwPfrJaJkdM6ZxYnvUqyzdYEUQxjZ4/EtedNORQ4vNIA== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787303132; c=relaxed/relaxed; bh=f5Hzvca94/MpqPmGFa6vAWEDRGZpUXT7cxp37bpGpu8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fz5OLrB8wH9GU1Kq3KmyLhFPOVJQwBC+/1YZeCbKw365wQiEl6DbvWv+9rT3IMStjVfXtf8LZ5zSfQdRgn4pyC5SPQf6wzlfMnAfSMEtOPkQFGM9EWbNOizZPj1WQJQL5Xehajqd/jq59h0dG4rnp5o+avy48Qcuw82SrLiYXJkBMt0JiLyvuFRYPUnfQF7FTnwlJBwqAzyrRA2XqTYyvekUyAJ9PB8ceQwkMZPENYEg6/eBYrHGwBr84gX7lQCIArfhDOakgIokdufdusTCY+PhxXc8qgsydC3Wivt5fPDYD6WoiW57sfn4ceKn9T1q8Mvi1+rlSCeiTfh28GWPUQ== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [IPv6:2600:3c04:e001:324:0:1991:8:25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDt40dx8z3bsT; Fri, 21 Aug 2026 19:05:32 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 2D1EC618F9; Fri, 21 Aug 2026 09:05:30 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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: 2289544 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org; envelope-from=linux-aspeed+bounces-4812-incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:21b9:f100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hRDtN21hQz1xpj for ; Fri, 21 Aug 2026 19:05:48 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hRDtN0kykz3btc; Fri, 21 Aug 2026 19:05:48 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2600:3c04:e001:324:0:1991:8:25" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787303148; cv=none; b=aJ8HnvP4IPN36P1hTts+CAnHvr6ffrBwEGewPAUhrKj38ZyQkPQL+qrTlKV6OV59fwxBLbDIw/4qj1NW9M68VhIbePiOtVm/y6XJgv28OzJ+k22N8/OV8CDRC37VXnNq7wY+O+G4s4D7I8YdFDiWbvLEV77o28a5scgDtCOyK6GEg9nvsmlEycihT03fz93mu8G9qyc6Xt5jt45azx33jj5WqEPQHt0br9Exckan6ySEDFcy8a2rfS/yaVgLkCyDt90wVcGXLNmCl+0NAyPQFYij6QH6T6vcjWs5w+rJCcabcXhoBeLtzHT3+hzQhtvAftn5CR4BqwgxGhAGvAAKVQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1787303148; c=relaxed/relaxed; bh=p8811fIOUMeDJPL4kxhAUd5eRiyVv42HJh+DBrKnPwQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KqJ0FT6LKh6yjBaWYn+9YXfA0OlNwnvT1gdSBuczYUjPs+rG3doJJ7P6zO+tBxswdL6kvUM6k0tD1z9rQYIOk1s8q5vCFdo9x7oXF7DurzvcmtzsBRrvMJPrGJReCsXJrdSncSkEpRHaGjpiopsV5bVGZMbrnINBVkLkSXCcxAZINvzNVVTyrCWKz3W3SXjp85zlc77tescMZqS365sV2pFeKx/DBaRUCDj5Cc1cXKnSqUXsQkxyEhB5rW+eP1tGsDRG2ssoGXXEInc4aRXqLJ6T8rYbZ+7rFjddlpoqE3YjRClZVeFvu8jZhO6FjtXO5EEPZC2ETVl6Wcp5JNj0rw== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=pass (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=srs0=h7h1=go=glider.be=geert+renesas@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [IPv6:2600:3c04:e001:324:0:1991:8:25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hRDtM1YGgz3bsq; Fri, 21 Aug 2026 19:05:47 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 3C88D618FB; Fri, 21 Aug 2026 09:05:45 +0000 (UTC) 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: X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Spam-Status: No, score=0.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org 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;