From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Jerome Brunet <jbrunet@baylibre.com>
Cc: sashiko-bot@kernel.org, sashiko-reviews@lists.linux.dev,
conor+dt@kernel.org, linux-clk@vger.kernel.org,
robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v8 5/7] clk: nuvoton: ma35d1: Reparent SYSPLL correctly
Date: Tue, 13 Oct 2026 18:53:10 +0200 [thread overview]
Message-ID: <87ld81v8y1.fsf@bootlin.com> (raw)
In-Reply-To: <179181904945.33566.17882786294681341398.b4-reply@b4> (Jerome Brunet's message of "Mon, 12 Oct 2026 17:30:49 +0200")
On 12/10/2026 at 17:30:49 +02, Jerome Brunet <jbrunet@baylibre.com> wrote:
> On 2026-10-06 09:57 +0200, Miquel Raynal wrote:
>> On 05/10/2026 at 11:12:35 +02, Jerome Brunet <jbrunet@baylibre.com> wrote:
>>
>> > On Sun 04 Oct 2026 at 23:19, Miquel Raynal <miquel.raynal@bootlin.com> wrote:
>> >
>> >> On 04/10/2026 at 20:55:50 GMT, sashiko-bot@kernel.org wrote:
>> >>
>> >>> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
>> >>> - [Low] clk: nuvoton: ma35d1: Modification of global static state
>> >>> during probe
>> >>
>> >> There is a single clock controller. Should never be a problem. I can
>> >> certainly move it in to more local scope if someone asks, but it's not
>> >> practically needed.
>> >
>> > I may be missing something key here but why is not in your defined
>> > indexes like the rest of the clocks ?
>>
>> SYSPLL and its parent (HXT_GATE) are in the hws[] array. Are you
>> suggesting to use the hw_clk pointer directly there instead of using the
>> parent data structure as an envelope? Because the issue raised is the
>> global definition of the struct clk_parent_data and then its
>> modification (since I need to reference the hws[SYSPLL] pointer inside).
>
> The problem sashiko is pointing at is that you are creating a global and then use
> it as a local variable, just assigning the the .hw
>
> So 2 possibilities:
> * You just need the .hw then I don't really get why you are doing it differently
> for this clock ?
True.
> * OR, this is one of the those clock where you want to check DT first then
It is not.
> fallback to a fixed clock, then yes you need parent_data. don't forget
> the fw_name (which I did not see here) and use a local variable for that,
> not a global
>
> Did I miss something ?
You got it absolutely right, and while implementing the change I
remember why I used the name instead of the hw pointer:
clk_hw_register_fixed_rate_parent_hw() exists, but
devm_clk_hw_register_fixed_rate_parent_hw() did not.
So since it looks like most of these helpers have their devm_
counterpart, I will add this new helper in clk-provider.h. I plan on
doing that addition in this commit because I think that is what Boyd
used to prefer, but I can add it in a preparation patch that is your own
preference, I don't mind.
Thanks for all the guidance!
Miquèl
next prev parent reply other threads:[~2026-10-13 16:53 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-04 20:45 [PATCH v8 0/7] clk: nuvoton: ma35d1: Fix mux parenting and peripheral clock rates Miquel Raynal
2026-10-04 20:45 ` [PATCH v8 1/7] clk: nuvoton: ma35d1: Use clk_hw pointers as mux parents Miquel Raynal
2026-10-04 20:45 ` [PATCH v8 2/7] clk: nuvoton: ma35d1: Avoid possible error pointer dereferencing Miquel Raynal
2026-10-04 20:45 ` [PATCH v8 3/7] clk: nuvoton: ma35d1: Retrieve HXT/LXT from DT when possible Miquel Raynal
2026-10-04 20:59 ` sashiko-bot
2026-10-04 21:16 ` Miquel Raynal
2026-10-05 9:06 ` Jerome Brunet
2026-10-13 17:12 ` Miquel Raynal
2026-10-13 17:35 ` Jerome Brunet
2026-10-04 20:45 ` [PATCH v8 4/7] clk: nuvoton: ma35d1: Reparent the gates correctly Miquel Raynal
2026-10-04 20:45 ` [PATCH v8 5/7] clk: nuvoton: ma35d1: Reparent SYSPLL correctly Miquel Raynal
2026-10-04 20:55 ` sashiko-bot
2026-10-04 21:19 ` Miquel Raynal
2026-10-05 9:12 ` Jerome Brunet
2026-10-06 7:57 ` Miquel Raynal
2026-10-12 15:30 ` Jerome Brunet
2026-10-13 16:53 ` Miquel Raynal [this message]
2026-10-13 17:37 ` Jerome Brunet
2026-10-04 20:45 ` [PATCH v8 6/7] arm64: dts: nuvoton: ma35d1: Drop HXT clock output name Miquel Raynal
2026-10-04 20:45 ` [PATCH v8 7/7] arm64: dts: nuvoton: ma35d1: Add LXT crystal and clock-names Miquel Raynal
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=87ld81v8y1.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jbrunet@baylibre.com \
--cc=linux-clk@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-bot@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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