| Message ID | 631df13629bf77d55bda770f94c7b1863690f2e2.1787239813.git.geert+renesas@glider.be |
|---|---|
| State | New |
| Headers | show
Return-Path: <linux-aspeed+bounces-4789-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-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 <incoming@patchwork.ozlabs.org>; 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 <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 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: <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-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)
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-nomadik.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)