From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 6FC51322A15; Mon, 18 Aug 2025 14:07:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755526076; cv=none; b=ojPcbjIWQqPSjxlb0tRyKPg09zAZRCLUVZdkDm8C86+pfOnZRzLow6hbleCMOe/3CPTgNMwsSgbNbPb/6Y4ZRCiYnqaMSXb2fmmvbyvcWFUnGJXM9uTKiN7aEqouU71aVAyG6jrT5iY5L9Csxaiq/ZMz9l2bAnlDfEDDEJu4Ou8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755526076; c=relaxed/simple; bh=NqyMA00Nqp6mO/FTtchFaRPZ8nVon/6a91ngrISuL8Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sV19nmhaaXoiK2ctSNMRjNYms/5SVtgvpS0qjdcwjIobG9fzH7/ymH19ZqSNUpKYTnNRqm/plVkmGG7M5Afk3a7tjleTBYspNHErxckAhhpbhmw8gsQdm2i6dyC+3cS1dX6jVD5s1HH9IuchoB8HGanOuccnACCEEFB3PhZ4v7c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=J71ru1Gu; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="J71ru1Gu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3120C113D0; Mon, 18 Aug 2025 14:07:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755526076; bh=NqyMA00Nqp6mO/FTtchFaRPZ8nVon/6a91ngrISuL8Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J71ru1GuKc0pksduCx+d0kWbLreRN6i2Z7+n+nu/a85MhG8IQPbY6avOHZK2NkJGe /sPfQ/ase5KOA5itQXyKQm53rYCwQEHYs7q9g1mV/ME2q16/SEoNh3Ykfs86tzoMFE ykdjK3w67rclOii8wWRAcFbMD2hF49FvKhuksj/4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Claudiu Beznea , Geert Uytterhoeven , Sasha Levin Subject: [PATCH 6.16 419/570] clk: renesas: rzg2l: Postpone updating priv->clks[] Date: Mon, 18 Aug 2025 14:46:46 +0200 Message-ID: <20250818124521.985209348@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250818124505.781598737@linuxfoundation.org> References: <20250818124505.781598737@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Claudiu Beznea [ Upstream commit 2f96afdffad4ef74e3c511207058c41c54a2d014 ] Since the sibling data is filled after the priv->clks[] array entry is populated, the first clock that is probed and has a sibling will temporarily behave as its own sibling until its actual sibling is populated. To avoid any issues, postpone updating priv->clks[] until after the sibling is populated. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20250514090415.4098534-2-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Sasha Levin --- drivers/clk/renesas/rzg2l-cpg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/renesas/rzg2l-cpg.c b/drivers/clk/renesas/rzg2l-cpg.c index a8628f64a03b..c87ad5a972b7 100644 --- a/drivers/clk/renesas/rzg2l-cpg.c +++ b/drivers/clk/renesas/rzg2l-cpg.c @@ -1389,10 +1389,6 @@ rzg2l_cpg_register_mod_clk(const struct rzg2l_mod_clk *mod, goto fail; } - clk = clock->hw.clk; - dev_dbg(dev, "Module clock %pC at %lu Hz\n", clk, clk_get_rate(clk)); - priv->clks[id] = clk; - if (mod->is_coupled) { struct mstp_clock *sibling; @@ -1404,6 +1400,10 @@ rzg2l_cpg_register_mod_clk(const struct rzg2l_mod_clk *mod, } } + clk = clock->hw.clk; + dev_dbg(dev, "Module clock %pC at %lu Hz\n", clk, clk_get_rate(clk)); + priv->clks[id] = clk; + return; fail: -- 2.39.5