[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdXudWW3MPKqP0-d+DyMNRF-X62oyHRnj=MM_9MSpJw6sw@mail.gmail.com>
Date: Mon, 29 Dec 2025 11:18:52 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Brian Masney <bmasney@...hat.com>
Cc: Vinod Koul <vkoul@...nel.org>, Kishon Vijay Abraham I <kishon@...nel.org>,
Chun-Kuang Hu <chunkuang.hu@...nel.org>, Philipp Zabel <p.zabel@...gutronix.de>,
Chunfeng Yun <chunfeng.yun@...iatek.com>, Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>, Heiko Stuebner <heiko@...ech.de>,
Neil Armstrong <neil.armstrong@...aro.org>, Stephen Boyd <sboyd@...nel.org>,
Maxime Ripard <mripard@...nel.org>, linux-clk@...r.kernel.org,
linux-phy@...ts.infradead.org, linux-kernel@...r.kernel.org,
dri-devel@...ts.freedesktop.org, linux-mediatek@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-rockchip@...ts.infradead.org
Subject: Re: [PATCH v3 9/9] phy: ti: phy-j721e-wiz: convert from round_rate()
to determine_rate()
Hi Brian,
On Fri, 12 Dec 2025 at 00:21, Brian Masney <bmasney@...hat.com> wrote:
> The round_rate() clk ops is deprecated, so migrate this driver from
> round_rate() to determine_rate() using the Coccinelle semantic patch
> on the cover letter of this series.
>
> Signed-off-by: Brian Masney <bmasney@...hat.com>
Thanks for your patch, which is now commit 27287e3b52b5954b ("phy:
ti: phy-j721e-wiz: convert from round_rate() to determine_rate()")
in phy/next
> --- a/drivers/phy/ti/phy-j721e-wiz.c
> +++ b/drivers/phy/ti/phy-j721e-wiz.c
> @@ -934,12 +934,15 @@ static unsigned long wiz_clk_div_recalc_rate(struct clk_hw *hw,
> return divider_recalc_rate(hw, parent_rate, val, div->table, 0x0, 2);
> }
>
> -static long wiz_clk_div_round_rate(struct clk_hw *hw, unsigned long rate,
> - unsigned long *prate)
> +static int wiz_clk_div_determine_rate(struct clk_hw *hw,
> + struct clk_rate_request *req)
> {
> struct wiz_clk_divider *div = to_wiz_clk_div(hw);
>
> - return divider_round_rate(hw, rate, prate, div->table, 2, 0x0);
> + req->rate = divider_round_rate(hw, req->rate, &req->best_parent_rate,
> + div->table, 2, 0x0);
Is this correct? divider_round_rate() can return a negative error code
(from divider_ro_determine_rate()), which is not handled here?
Looks like several other users of divider_round_rate() use this
same logic, and thus are affected, too.
> +
> + return 0;
> }
>
> static int wiz_clk_div_set_rate(struct clk_hw *hw, unsigned long rate,
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists