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

Marek Szyprowski posted 1 patch 2 years, 8 months ago
drivers/clk/clk.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] clk: Fix best_parent_rate after moving code into a separate function
Posted by Marek Szyprowski 2 years, 8 months ago
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 <m.szyprowski@samsung.com>
---
 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
Re: [PATCH] clk: Fix best_parent_rate after moving code into a separate function
Posted by Stephen Boyd 2 years, 7 months ago
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 <m.szyprowski@samsung.com>
> ---

Applied to clk-next
Re: [PATCH] clk: Fix best_parent_rate after moving code into a separate function
Posted by Maxime Ripard 2 years, 7 months ago
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 <m.szyprowski@samsung.com>

Acked-by: Maxime Ripard <mripard@kernel.org>

Thanks!
Maxime