From: Sudeep Holla <sudeep.holla@arm.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Cristian Marussi <cristian.marussi@arm.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Peng Fan <peng.fan@nxp.com>,
<arm-scmi@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-clk@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] clk: scmi: Fix children encountered before parents case
Date: Thu, 12 Jun 2025 09:29:16 +0100 [thread overview]
Message-ID: <20250612-eccentric-fresh-bee-e52db4@sudeepholla> (raw)
In-Reply-To: <20250612-clk-scmi-children-parent-fix-v2-1-125b26a311f6@pengutronix.de>
On Thu, Jun 12, 2025 at 09:36:58AM +0200, Sascha Hauer wrote:
> When it comes to clocks with parents the SCMI clk driver assumes that
> parents are always initialized before their children which might not
> always be the case.
>
> During initialization of the parent_data array we have:
>
> sclk->parent_data[i].hw = hws[sclk->info->parents[i]];
>
> hws[sclk->info->parents[i]] will not yet be initialized when children
> are encountered before their possible parents. Solve this by allocating
> all struct scmi_clk as an array first and populating all hws[] upfront.
>
LGTM. I would like to add a note that we don't free individual scmi_clk
if for some reason it fails to setup. I can do that when I apply, just
checking if anyone has any objections. Please shout out if you have.
--
Regards,
Sudeep
next prev parent reply other threads:[~2025-06-12 9:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-12 7:36 [PATCH v2] clk: scmi: Fix children encountered before parents case Sascha Hauer
2025-06-12 8:29 ` Sudeep Holla [this message]
2025-06-12 8:43 ` Sascha Hauer
2025-06-12 9:35 ` Sudeep Holla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250612-eccentric-fresh-bee-e52db4@sudeepholla \
--to=sudeep.holla@arm.com \
--cc=arm-scmi@vger.kernel.org \
--cc=cristian.marussi@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=peng.fan@nxp.com \
--cc=s.hauer@pengutronix.de \
--cc=sboyd@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox