From patchwork Fri Aug 21 10:03:02 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3045 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id BFE991C0591 for ; Fri, 21 Aug 2026 12:46:06 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25291-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25291-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 464DF32EC08F for ; Fri, 21 Aug 2026 10:03:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D83A846D577; Fri, 21 Aug 2026 10:03:34 +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 EEBB346D547; Fri, 21 Aug 2026 10:03:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787306611; cv=none; b=IIS4dI0Bb3trRKNh0YihpQYtAsaoZXunBFcCtlWtC3SOcsb8Gx3iVaM0t1XseHpL+b6jw7L/LEDjdYBVsD07jIkE13rSDGRjT/2fTjfovwwvm3JacEbo+rFARDsAnAURyndmfFFUK9phcBG/7ymiBwGhgCYDSrlziUVQ++7jNXA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787306611; c=relaxed/simple; bh=aODltv+dZo/KzCD3Woo9MaUfMh74qSOBBBrH3O5MNOU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pYnwi1oJlvj34B514LDURbDYxliAcIB38waeCI8QeZOWmB2J4QYESKTspY3j16tVl2GRxUbH2/t/r9d+4K5q62Eu00V+GkyY5yaDWF3VjNZ7C1tLSbOo+YwTF9k1F4kdjDgx2Etx1nlXHBwrZcQbepuYcF6pI77FJU7EEdt6OmA= 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 00A881F00A3A; Fri, 21 Aug 2026 10:03:11 +0000 (UTC) From: Geert Uytterhoeven To: Chen-Yu Tsai , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jernej Skrabec , Samuel Holland , Thierry Reding , Mikko Perttunen , Jonathan Hunter Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, linux-clk@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 1/2] drm/sun4i: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 12:03:02 +0200 Message-ID: <0f37278d04c02461e17f42032a379dccfb773171.1787239944.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.66 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[sea.lore.kernel.org:rdns,sea.lore.kernel.org:helo]; PRECEDENCE_BULK(0.00)[]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; TAGGED_RCPT(0.00)[renesas]; DMARC_NA(0.00)[glider.be]; RCPT_COUNT_TWELVE(0.00)[17]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; FREEMAIL_TO(0.00)[kernel.org,linux.intel.com,suse.de,gmail.com,ffwll.ch,sholland.org,nvidia.com]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10:c]; TO_DN_SOME(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[geert@glider.be,linux-sunxi@lists.linux.dev]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; TAGGED_FROM(0.00)[bounces-25291-noreply=patchwork.local,renesas]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: BFE991C0591 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= The clk_init_data structure contains several mutually-exclusive members for different methods to specify the possible parents of a clock, prompting drivers to initialize only the members they need. However, not initializing all members may cause subtle issues, which are only exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is enabled. Make sure all members are fully initialized, to avoid such bugs, and to prevent future breakage when converting drivers to a different method for specifying the parents. Signed-off-by: Geert Uytterhoeven Acked-by: Chen-Yu Tsai --- Compile-tested only. --- drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c | 2 +- drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 2 +- drivers/gpu/drm/sun4i/sun4i_tcon_dclk.c | 2 +- drivers/gpu/drm/sun4i/sun8i_hdmi_phy_clk.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c b/drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c index b1beadb9bb59f8ff..958099d137f8df9b 100644 --- a/drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c +++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c @@ -109,7 +109,7 @@ static const struct clk_ops sun4i_ddc_ops = { int sun4i_ddc_create(struct sun4i_hdmi *hdmi, struct clk *parent) { - struct clk_init_data init; + struct clk_init_data init = {}; struct sun4i_ddc *ddc; const char *parent_name; diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c b/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c index fbf7da9d9592141b..15b09d5479d97aa3 100644 --- a/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c +++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c @@ -202,7 +202,7 @@ static const struct clk_ops sun4i_tmds_ops = { int sun4i_tmds_create(struct sun4i_hdmi *hdmi) { - struct clk_init_data init; + struct clk_init_data init = {}; struct sun4i_tmds *tmds; const char *parents[2]; diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon_dclk.c b/drivers/gpu/drm/sun4i/sun4i_tcon_dclk.c index 4afb12bd5281f0d1..bdac1d622cc41351 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon_dclk.c +++ b/drivers/gpu/drm/sun4i/sun4i_tcon_dclk.c @@ -167,7 +167,7 @@ static const struct clk_ops sun4i_dclk_ops = { int sun4i_dclk_create(struct device *dev, struct sun4i_tcon *tcon) { const char *clk_name, *parent_name; - struct clk_init_data init; + struct clk_init_data init = {}; struct sun4i_dclk *dclk; int ret; diff --git a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy_clk.c b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy_clk.c index a4d31fe3abff1ab1..bd0dba95421b3d8e 100644 --- a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy_clk.c +++ b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy_clk.c @@ -143,7 +143,7 @@ static const struct clk_ops sun8i_phy_clk_ops = { int sun8i_phy_clk_create(struct sun8i_hdmi_phy *phy, struct device *dev, bool second_parent) { - struct clk_init_data init; + struct clk_init_data init = {}; struct sun8i_phy_clk *priv; const char *parents[2]; From patchwork Fri Aug 21 10:03:03 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 3044 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 853101C056A for ; Fri, 21 Aug 2026 12:03:44 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 104.64.211.4) smtp.mailfrom=linux-sunxi+bounces-25292-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-25292-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 5D19730060A0 for ; Fri, 21 Aug 2026 10:03:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3F4F446EF8D; Fri, 21 Aug 2026 10:03:37 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CAF1346EC64; Fri, 21 Aug 2026 10:03:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787306615; cv=none; b=s9M97OYTGXReX+JglHdM6vuhN1ttYeGtdFbHPAmyqxxfyAbefbZ68YXaMsi9PY58a5n1Ocz/n41P+EgqBO73ScDLy673Shhxz/sj5i1BkvqYqg6WHS4fCYuDrl060KKrxguyfPX53q9XRU2bP3MeGFVJ2fwnnf6jW6360Nd048Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787306615; c=relaxed/simple; bh=bk5/3KnTW1K4VMMTGCj94ajjE4NZlaE1Y7kf52o0HtA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=J70bD30BOdNdVGrkwwGyVnxh2teu/+5f8riAK5phzmgAkCdOaDiXwZU9590rTrYToX6y7znmRxyaPPA289Oji3rfQQjygOBjQlzI6dWKIUjdj7t6PCNkKQ8ghB360gxtqZSISM4Yrlj7+oGhiOKmVrq2XCG6A48ZlhJOMy9ZX1M= 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 BF2421F00A3E; Fri, 21 Aug 2026 10:03:15 +0000 (UTC) From: Geert Uytterhoeven To: Chen-Yu Tsai , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jernej Skrabec , Samuel Holland , Thierry Reding , Mikko Perttunen , Jonathan Hunter Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, linux-clk@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 2/2] drm/tegra: Make sure clk_init_data is fully initialized Date: Fri, 21 Aug 2026 12:03:03 +0200 Message-ID: <9bc5029f7ad84b0b1e02be231a5abd7e5fa03946.1787239944.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.66 / 15.00]; BAYES_HAM(-5.50)[99.99%]; RBL_SENDERSCORE(2.00)[104.64.211.4:from]; SUSPICIOUS_RECIPS(1.50)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[sin.lore.kernel.org:rdns,sin.lore.kernel.org:helo,glider.be:email]; PRECEDENCE_BULK(0.00)[]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; TAGGED_RCPT(0.00)[renesas]; DMARC_NA(0.00)[glider.be]; RCPT_COUNT_TWELVE(0.00)[17]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; FREEMAIL_TO(0.00)[kernel.org,linux.intel.com,suse.de,gmail.com,ffwll.ch,sholland.org,nvidia.com]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:104.64.211.4:c]; TO_DN_SOME(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[geert@glider.be,linux-sunxi@lists.linux.dev]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:63949, ipnet:104.64.192.0/19, country:SG]; TAGGED_FROM(0.00)[bounces-25292-noreply=patchwork.local,renesas]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 853101C056A 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/gpu/drm/tegra/sor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c index e384cbd0cbf72fb9..46449c69807d369e 100644 --- a/drivers/gpu/drm/tegra/sor.c +++ b/drivers/gpu/drm/tegra/sor.c @@ -600,8 +600,8 @@ static const struct clk_ops tegra_clk_sor_pad_ops = { static struct clk *tegra_clk_sor_pad_register(struct tegra_sor *sor, const char *name) { + struct clk_init_data init = {}; struct tegra_clk_sor_pad *pad; - struct clk_init_data init; struct clk *clk; pad = devm_kzalloc(sor->dev, sizeof(*pad), GFP_KERNEL);