From: Jerome Brunet <jbrunet@baylibre.com>
To: Brian Masney <masneyb@kernel.org>, Carlo Caione <ccaione@baylibre.com>
Cc: "Stephen Boyd" <sboyd@kernel.org>,
"Brian Masney" <bmasney+clk@redhat.com>,
"Jerome Brunet" <jbrunet+clk@baylibre.com>,
"Brian Norris" <computersforpeace@gmail.com>,
"Maxime Coquelin" <maxime.coquelin@st.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Michael Turquette" <mturquette@linaro.org>,
"Stephen Boyd" <sboyd@codeaurora.org>,
"David Laight" <david.laight.linux@gmail.com>,
"Sebastian Reichel" <sebastian.reichel@collabora.com>,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] clk: divider: Fix the divisor for rates above 4.29 GHz
Date: Mon, 16 Nov 2026 12:19:43 +0100 [thread overview]
Message-ID: <1jmrr92fcg.fsf@starbuckisacylon.baylibre.com> (raw)
In-Reply-To: <avXhA9mJL0EIcm_0@x1g10>
On jeu. 12 nov. 2026 at 10:53, Brian Masney <masneyb@kernel.org> wrote:
> On Thu, Nov 12, 2026 at 04:29:55PM +0100, Carlo Caione wrote:
>> On Thu, Nov 12, 2026 at 10:09:46 +0100, Brian Masney wrote:
>> > Hi Carlo,
>>
>> Hi Brian,
>>
>> > > static int _div_round_up(const struct clk_div_table *table,
>> > > unsigned long parent_rate, unsigned long rate,
>> > > unsigned long flags)
>> > > {
>> > > - int div = DIV_ROUND_UP_ULL((u64)parent_rate, rate);
>> > > + int div = _get_div_round_up(parent_rate, rate);
>> >
>> > _get_div_round_up() returns an unsigned long however it's downsized to
>> > an int here.
>>
>> Right, but wasn't also DIV_ROUND_UP_ULL() previously returning a u64
>> that was stored in the same int?
>
> OK good point.
>
> Reviewed-by: Brian Masney <masneyb@kernel.org>
>
> Jerome: What do you think about this?
>
> Brian
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
I would welcome the other fix regarding div type here though, if you
don't mind Carlo. I don't we ever had a divider going max INT_MAX, but
still better to tie this up.
next prev parent reply other threads:[~2026-11-16 11:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 9:36 [PATCH v2 0/3] Fix clk-divider rates above 4.29 GHz on 64-bit Carlo Caione
2026-11-12 9:36 ` [PATCH v2 1/3] clk: divider: Fix the divisor for rates above 4.29 GHz Carlo Caione
2026-11-12 15:09 ` Brian Masney
2026-11-12 15:29 ` Carlo Caione
2026-11-12 15:38 ` Sebastian Reichel
[not found] ` <avXhA9mJL0EIcm_0@x1g10>
2026-11-16 11:19 ` Jerome Brunet [this message]
2026-11-12 15:34 ` Sebastian Reichel
2026-11-12 9:37 ` [PATCH v2 2/3] clk: divider: Fix round-closest for rates above the parent rate Carlo Caione
2026-11-12 15:41 ` Sebastian Reichel
2026-11-16 21:17 ` Brian Masney
2026-11-12 9:37 ` [PATCH v2 3/3] clk: divider: test: Add tests for rates above 4.29 GHz Carlo Caione
2026-11-12 9:50 ` sashiko-bot
2026-11-16 21:17 ` Brian Masney
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=1jmrr92fcg.fsf@starbuckisacylon.baylibre.com \
--to=jbrunet@baylibre.com \
--cc=bmasney+clk@redhat.com \
--cc=ccaione@baylibre.com \
--cc=computersforpeace@gmail.com \
--cc=david.laight.linux@gmail.com \
--cc=jbrunet+clk@baylibre.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masneyb@kernel.org \
--cc=maxime.coquelin@st.com \
--cc=mturquette@linaro.org \
--cc=s.hauer@pengutronix.de \
--cc=sboyd@codeaurora.org \
--cc=sboyd@kernel.org \
--cc=sebastian.reichel@collabora.com \
--cc=u.kleine-koenig@pengutronix.de \
/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.