| Message ID | 33f8a87834a75b6677894f1993c90f00eb6a2547.1787239813.git.geert+renesas@glider.be |
|---|---|
| State | New |
| Headers | show
Return-Path: <linux-aspeed+bounces-4777-incoming=patchwork.ozlabs.org@lists.ozlabs.org> 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 <incoming@patchwork.ozlabs.org>; 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 <geert+renesas@glider.be> To: Ryan Chen <ryan_chen@aspeedtech.com>, Joel Stanley <joel@jms.id.au>, Stephen Boyd <sboyd@kernel.org>, Brian Masney <bmasney+clk@redhat.com>, Jerome Brunet <jbrunet+clk@baylibre.com>, Andrew Jeffery <andrew@codeconstruct.com.au>, Billy Tsai <billy_tsai@aspeedtech.com>, Nicolas Ferre <nicolas.ferre@microchip.com>, Alexandre Belloni <alexandre.belloni@bootlin.com>, Claudiu Beznea <claudiu.beznea@tuxon.dev>, Ray Jui <rjui@broadcom.com>, Scott Branden <sbranden@broadcom.com>, Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>, Taichi Sugaya <sugaya.taichi@socionext.com>, Takao Orito <orito.takao@socionext.com>, Linus Walleij <linusw@kernel.org>, Avi Fishman <avifishman70@gmail.com>, Tomer Maimon <tmaimon77@gmail.com>, Tali Perry <tali.perry1@gmail.com>, Patrick Venture <venture@google.com>, Nancy Yuen <yuenn@google.com>, Benjamin Fair <benjaminfair@google.com>, Sudeep Holla <sudeep.holla@kernel.org>, Cristian Marussi <cristian.marussi@arm.com>, David Lechner <david@lechnology.com>, Abel Vesa <abelvesa@kernel.org>, Peng Fan <peng.fan@nxp.com>, Frank Li <Frank.Li@nxp.com>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, Paul Cercueil <paul@crapouillou.net>, Santosh Shilimkar <ssantosh@kernel.org>, Andrew Lunn <andrew@lunn.ch>, Gregory Clement <gregory.clement@bootlin.com>, Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>, Vladimir Zapolskiy <vz@mleia.com>, Heiko Stuebner <heiko@sntech.de>, Krzysztof Kozlowski <krzk@kernel.org>, Sylwester Nawrocki <s.nawrocki@samsung.com>, Chanwoo Choi <cw00.choi@samsung.com>, Peter Griffin <peter.griffin@linaro.org>, Alim Akhtar <alim.akhtar@samsung.com>, Dinh Nguyen <dinguyen@kernel.org>, Viresh Kumar <vireshk@kernel.org>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= <emilio@elopez.com.ar>, Chen-Yu Tsai <wens@kernel.org>, Jernej Skrabec <jernej.skrabec@gmail.com>, Samuel Holland <samuel@sholland.org>, Prashant Gaikwad <pgaikwad@nvidia.com>, Thierry Reding <thierry.reding@kernel.org>, Jonathan Hunter <jonathanh@nvidia.com>, Kunihiko Hayashi <hayashi.kunihiko@socionext.com>, Masami Hiramatsu <mhiramat@kernel.org>, Ulf Hansson <ulfh@kernel.org>, Liviu Dudau <liviu.dudau@arm.com>, Lorenzo Pieralisi <lpieralisi@kernel.org>, Michal Simek <michal.simek@amd.com>, Matthias Brugger <matthias.bgg@gmail.com> 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 <geert+renesas@glider.be> 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: <cover.1787239813.git.geert+renesas@glider.be> References: <cover.1787239813.git.geert+renesas@glider.be> X-Mailing-List: linux-aspeed@lists.ozlabs.org List-Id: <linux-aspeed.lists.ozlabs.org> List-Help: <mailto:linux-aspeed+help@lists.ozlabs.org> List-Owner: <mailto:linux-aspeed+owner@lists.ozlabs.org> List-Post: <mailto:linux-aspeed@lists.ozlabs.org> List-Archive: <https://lore.kernel.org/linux-aspeed/>, <https://lists.ozlabs.org/pipermail/linux-aspeed/> List-Subscribe: <mailto:linux-aspeed+subscribe@lists.ozlabs.org>, <mailto:linux-aspeed+subscribe-digest@lists.ozlabs.org>, <mailto:linux-aspeed+subscribe-nomail@lists.ozlabs.org> List-Unsubscribe: <mailto:linux-aspeed+unsubscribe@lists.ozlabs.org> Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 |
| Series |
clk: Make sure clk_init_data is fully initialized (part two)
|
expand
|
On Fri, Aug 21, 2026 at 10:53 AM Geert Uytterhoeven <geert+renesas@glider.be> wrote: > The clk_init_data structure contains several mutually-exclusive members > for different methods to specify the possible parents of a clock, > prompting drivers to initialize only the members they need. However, > not initializing all members may cause subtle issues, which are only > exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is > enabled. > > Make sure all members are fully initialized, to avoid such bugs, and to > prevent future breakage when converting drivers to a different method > for specifying the parents. > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Linus Walleij <linusw@kernel.org> Yours, Linus Walleij
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);
The clk_init_data structure contains several mutually-exclusive members for different methods to specify the possible parents of a clock, prompting drivers to initialize only the members they need. However, not initializing all members may cause subtle issues, which are only exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is enabled. Make sure all members are fully initialized, to avoid such bugs, and to prevent future breakage when converting drivers to a different method for specifying the parents. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> --- Compile-tested only. --- drivers/clk/clk-gemini.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)