From: a0987203069@gmail.com
To: linux-clk@vger.kernel.org
Cc: rosenp@gmail.com, Jacky Huang <ychuang3@nuvoton.com>,
Shan-Chun Hung <schung@nuvoton.com>,
Stephen Boyd <sboyd@kernel.org>,
Brian Masney <bmasney+clk@redhat.com>,
Jerome Brunet <jbrunet+clk@baylibre.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] clk: nuvoton: ma35d1-divider: simplify allocation
Date: Mon, 14 Sep 2026 11:22:48 +0800 [thread overview]
Message-ID: <20260914032248.387264-1-a0987203069@gmail.com> (raw)
In-Reply-To: <20260912002326.237419-1-rosenp@gmail.com>
Hi Rosen,
On Fri, Sep 11, 2026 at 05:23:26PM -0700, Rosen Penev wrote:
> Use a flexible array member instead of kcalloc + pointer that is not
> actually const.
>
> Simplifies allocation slightly.
Thanks for the patch, and sorry for the slow reply.
We're already working on a different fix for this driver internally:
the ADC divider register actually implements a simple closed-form
relationship (rate = parent_rate / (2 * (N + 1))), so building and
scanning a clk_div_table with up to 2^width entries via the generic
divider_recalc_rate()/divider_determine_rate()/divider_get_val()
helpers is unnecessary overhead in the first place -- we're replacing
the table entirely with direct arithmetic in recalc_rate()/
determine_rate()/set_rate() instead of just changing how it's
allocated.
Since our patch removes the table (and the unrelated mask_bit
mechanism, which has an out-of-range shift bug at its only call site)
rather than reshaping it, we won't be adopting this patch, but we do
appreciate you catching the allocation issue. We'll post our fix
shortly for review.
Thanks again,
Joey
prev parent reply other threads:[~2026-09-14 3:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-12 0:23 Rosen Penev
2026-09-14 3:22 ` a0987203069 [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=20260914032248.387264-1-a0987203069@gmail.com \
--to=a0987203069@gmail.com \
--cc=bmasney+clk@redhat.com \
--cc=jbrunet+clk@baylibre.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rosenp@gmail.com \
--cc=sboyd@kernel.org \
--cc=schung@nuvoton.com \
--cc=ychuang3@nuvoton.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®