2023-06-13 13:29:09

by Marek Szyprowski

[permalink] [raw]
Subject: [PATCH] clk: Fix best_parent_rate after moving code into a separate function

best_parent_rate entry is still being used in the code and needs to be
always updated regardless of the CLK_SET_RATE_NO_REPARENT flag.

Fixes: 1b4e99fda73f ("clk: Move no reparent case into a separate function")
Signed-off-by: Marek Szyprowski <[email protected]>
---
drivers/clk/clk.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index ffc9f03840b7..7ac9f7a8cb84 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -629,6 +629,7 @@ clk_core_determine_rate_no_reparent(struct clk_hw *hw,
best = clk_core_get_rate_nolock(core);
}

+ req->best_parent_rate = best;
req->rate = best;

return 0;
--
2.34.1



2023-06-13 15:36:10

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH] clk: Fix best_parent_rate after moving code into a separate function

On Tue, Jun 13, 2023 at 03:16:31PM +0200, Marek Szyprowski wrote:
> best_parent_rate entry is still being used in the code and needs to be
> always updated regardless of the CLK_SET_RATE_NO_REPARENT flag.
>
> Fixes: 1b4e99fda73f ("clk: Move no reparent case into a separate function")
> Signed-off-by: Marek Szyprowski <[email protected]>

Acked-by: Maxime Ripard <[email protected]>

Thanks!
Maxime


Attachments:
(No filename) (420.00 B)
signature.asc (235.00 B)
Download all attachments

2023-06-13 19:27:34

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH] clk: Fix best_parent_rate after moving code into a separate function

Quoting Marek Szyprowski (2023-06-13 06:16:31)
> best_parent_rate entry is still being used in the code and needs to be
> always updated regardless of the CLK_SET_RATE_NO_REPARENT flag.
>
> Fixes: 1b4e99fda73f ("clk: Move no reparent case into a separate function")
> Signed-off-by: Marek Szyprowski <[email protected]>
> ---

Applied to clk-next