From: Brian Masney <masneyb@kernel.org>
To: Joshua Covington <joshuacov@gmail.com>
Cc: Jerome Brunet <jbrunet@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Brian Masney <bmasney+clk@redhat.com>,
Jerome Brunet <jbrunet+clk@baylibre.com>,
Andrea della Porta <andrea.porta@suse.com>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
linux-clk@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v3 1/3] clk: allow a clk_hw to be registered again after unregistering it
Date: Thu, 3 Dec 2026 19:48:36 -0500 [thread overview]
Message-ID: <axIN5CQpNIX30a9y@x1g10> (raw)
In-Reply-To: <20261203174218.142726-1-joshuacov@gmail.com>
On Thu, Dec 03, 2026 at 05:42:18PM +0000, Joshua Covington wrote:
> On Thu, Dec 03, 2026 at 05:36:41PM +0100, Jerome Brunet wrote:
> > I'm not too the sure the WARN() condition is needed though.
> > It is very late for such a consistency check and what it is checking should
> > be guaranteed by the registration code, no ? Can't we just skip the check ?
>
> Right. I took the check over from Brian's proposal, and it never
> triggered in my testing, neither in the KUnit runs nor on the CM5.
>
> __clk_register() sets both pointers and clears them again if the
> registration fails, so for the clk returned by the registration the
> check always passes. The only case it would catch is if
> clk_unregister() is being called with some other clk of the same clock,
> e.g. one from clk_hw_get_clk(), which clk_unregister() has never checked
> for either.
>
> Brian, unless you had a specific case in mind for it, I will drop it in
> v4 and clear hw->core and hw->clk unconditionally.
Yes that sounds good.
Brian
prev parent reply other threads:[~2026-12-04 0:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20261124231751.83938-1-joshuacov@gmail.com>
2026-11-24 23:17 ` [PATCH v3 1/3] clk: allow a clk_hw to be registered again after unregistering it Joshua Covington
2026-12-03 10:26 ` Jerome Brunet
2026-12-03 15:19 ` Joshua Covington
2026-12-03 16:36 ` Jerome Brunet
2026-12-03 17:42 ` Joshua Covington
2026-12-04 0:48 ` Brian Masney [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=axIN5CQpNIX30a9y@x1g10 \
--to=masneyb@kernel.org \
--cc=andrea.porta@suse.com \
--cc=bmasney+clk@redhat.com \
--cc=florian.fainelli@broadcom.com \
--cc=jbrunet+clk@baylibre.com \
--cc=jbrunet@baylibre.com \
--cc=joshuacov@gmail.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=s.nawrocki@samsung.com \
--cc=sboyd@kernel.org \
--cc=stable@vger.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