From patchwork Fri Aug 21 08:53:55 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3020 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mxe881.netcup.net (Postfix) with ESMTPS id E1BB91C0130 for ; Fri, 21 Aug 2026 11:08:01 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 104.64.211.4) smtp.mailfrom=linux-sunxi+bounces-25289-noreply=patchwork.local@lists.linux.dev smtp.helo=sin.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 104.64.211.4 as permitted sender) client-ip=104.64.211.4; envelope-from=linux-sunxi+bounces-25289-noreply=patchwork.local@lists.linux.dev; helo=sin.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sin.lore.kernel.org (Postfix) with ESMTP id 24F05301ACBD for ; Fri, 21 Aug 2026 09:07:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 815E147279B; Fri, 21 Aug 2026 09:05:56 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC55845A2AD; Fri, 21 Aug 2026 09:05:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787303154; cv=none; b=oV+v08feGlhzxBevHr108s1OgTEz+iLP3/iWFRb5ZL1+K3K5ZgrKcVUGB/MXIehHAM7hzTatP1fOMMfNve7gKrB6BY4PaqVfjORXBsGZjVbRLgzO0jBPPimA9D0bacJZdNWQcPSopcBACE367D5ROrj93u2GRn/RowYcu5GHkhg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787303154; c=relaxed/simple; bh=BoVDFLjm3qmryxpWKKtPiB9xGLwmcZ8bdHtjqA34dYQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rRL7+mmiS5ceIHiEQj9rH6TOU9bd11/V60QxzEudxf56JRbvrevGpPPTGv04UTpfQp6Ys7FXrP/6cJObGZef9SI/MxYQmhdGoW30/R6cMMuChh0cMyE4nfwROb3do3mtvksGHAC4or+4Zmu8vheT2QqyUiRtWn3Xi+3txLCZwgw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5598F1F000E9; Fri, 21 Aug 2026 09:05:30 +0000 (UTC) From: Geert Uytterhoeven To: Ryan Chen , Joel Stanley , Stephen Boyd , Brian Masney , Jerome Brunet , Andrew Jeffery , Billy Tsai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Taichi Sugaya , Takao Orito , Linus Walleij , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Sudeep Holla , Cristian Marussi , David Lechner , Abel Vesa , Peng Fan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Santosh Shilimkar , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Vladimir Zapolskiy , Heiko Stuebner , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Peter Griffin , Alim Akhtar , Dinh Nguyen , Viresh Kumar , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Emilio_L=C3=B3pe?= =?utf-8?q?z?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Ulf Hansson , Liviu Dudau , Lorenzo Pieralisi , Michal Simek , Matthias Brugger Cc: linux-clk@vger.kernel.org, linux-aspeed@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org, arm-scmi@vger.kernel.org, imx@lists.linux.dev, linux-mips@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, soc@lists.linux.dev, linux-stm32@st-md-mailman.stormreply.com, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, Geert Uytterhoeven Subject: [PATCH 45/45] clk: zynqmp: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 10:53:55 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= The clk_init_data structure contains several mutually-exclusive members for different methods to specify the possible parents of a clock, prompting drivers to initialize only the members they need. However, not initializing all members may cause subtle issues, which are only exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is enabled. Make sure all members are fully initialized, to avoid such bugs, and to prevent future breakage when converting drivers to a different method for specifying the parents. Signed-off-by: Geert Uytterhoeven --- Compile-tested only. --- drivers/clk/zynqmp/clk-gate-zynqmp.c | 2 +- drivers/clk/zynqmp/clk-mux-zynqmp.c | 2 +- drivers/clk/zynqmp/divider.c | 2 +- drivers/clk/zynqmp/pll.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/zynqmp/clk-gate-zynqmp.c b/drivers/clk/zynqmp/clk-gate-zynqmp.c index db10eb69f3fe01a5..1a462af7b8ea3efa 100644 --- a/drivers/clk/zynqmp/clk-gate-zynqmp.c +++ b/drivers/clk/zynqmp/clk-gate-zynqmp.c @@ -109,10 +109,10 @@ struct clk_hw *zynqmp_clk_register_gate(const char *name, u32 clk_id, u8 num_parents, const struct clock_topology *nodes) { + struct clk_init_data init = {}; struct zynqmp_clk_gate *gate; struct clk_hw *hw; int ret; - struct clk_init_data init; /* allocate the gate */ gate = kzalloc_obj(*gate); diff --git a/drivers/clk/zynqmp/clk-mux-zynqmp.c b/drivers/clk/zynqmp/clk-mux-zynqmp.c index e37bd3516974c1ee..79509e387b51fe40 100644 --- a/drivers/clk/zynqmp/clk-mux-zynqmp.c +++ b/drivers/clk/zynqmp/clk-mux-zynqmp.c @@ -133,9 +133,9 @@ struct clk_hw *zynqmp_clk_register_mux(const char *name, u32 clk_id, u8 num_parents, const struct clock_topology *nodes) { + struct clk_init_data init = {}; struct zynqmp_clk_mux *mux; struct clk_hw *hw; - struct clk_init_data init; int ret; mux = kzalloc_obj(*mux); diff --git a/drivers/clk/zynqmp/divider.c b/drivers/clk/zynqmp/divider.c index 4075f6ecf076a8e6..3eabd1cf211ddba3 100644 --- a/drivers/clk/zynqmp/divider.c +++ b/drivers/clk/zynqmp/divider.c @@ -278,9 +278,9 @@ struct clk_hw *zynqmp_clk_register_divider(const char *name, u8 num_parents, const struct clock_topology *nodes) { + struct clk_init_data init = {}; struct zynqmp_clk_divider *div; struct clk_hw *hw; - struct clk_init_data init; int ret; /* allocate the divider */ diff --git a/drivers/clk/zynqmp/pll.c b/drivers/clk/zynqmp/pll.c index 6463787cf57b6018..6158386ca743d1f8 100644 --- a/drivers/clk/zynqmp/pll.c +++ b/drivers/clk/zynqmp/pll.c @@ -313,9 +313,9 @@ struct clk_hw *zynqmp_clk_register_pll(const char *name, u32 clk_id, u8 num_parents, const struct clock_topology *nodes) { + struct clk_init_data init = {}; struct zynqmp_pll *pll; struct clk_hw *hw; - struct clk_init_data init; int ret; init.name = name;