From: Stephen Boyd <sboyd@kernel.org>
To: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org
Subject: Re: [PATCH 1/2] clk: clk_core_get() can also return NULL
Date: Thu, 09 Dec 2021 17:15:56 -0800 [thread overview]
Message-ID: <20211210011557.E13FDC341C6@smtp.kernel.org> (raw)
In-Reply-To: <20211208041534.3928718-1-sboyd@kernel.org>
Quoting Stephen Boyd (2021-12-07 20:15:33)
> Nothing stops a clk controller from registering an OF clk provider
> before registering those clks with the clk framework. This is not great
> but we deal with it in the clk framework by refusing to hand out struct
> clk pointers when 'hw->core' is NULL, the indication that clk_register()
> has been called.
>
> Within clk_core_fill_parent_index() we considered this case when a
> clk_hw pointer is referenced directly by filling in the parent cache
> with an -EPROBE_DEFER pointer when the core pointer is NULL. When we
> lookup a parent with clk_core_get() we don't care about the return value
> being NULL though, because that was considered largely impossible, but
> it's been proven now that it can be NULL if two clk providers are
> probing in parallel and the parent provider has been registered before
> the clk has. Let's check for NULL here as well and treat it the same as
> direct clk_hw references.
>
> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
> ---
Applied to clk-next
prev parent reply other threads:[~2021-12-10 1:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-08 4:15 [PATCH 1/2] clk: clk_core_get() can also return NULL Stephen Boyd
2021-12-08 4:15 ` [PATCH 2/2] clk: __clk_core_init() never takes NULL Stephen Boyd
2021-12-10 1:16 ` Stephen Boyd
2021-12-10 1:15 ` Stephen Boyd [this message]
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=20211210011557.E13FDC341C6@smtp.kernel.org \
--to=sboyd@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.