Hi Brian,
On Fri, 12 Dec 2025 at 00:21, Brian Masney <[email protected]> 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 <[email protected]>
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 -- [email protected]
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