linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: rockchip: fix finding of maximum clock ID
@ 2024-09-12 13:32 Yao Zi
  2024-09-14  6:48 ` Sebastian Reichel
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Yao Zi @ 2024-09-12 13:32 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Heiko Stuebner,
	Sebastian Reichel
  Cc: linux-clk, linux-arm-kernel, linux-rockchip, linux-kernel, Yao Zi

If an ID of a branch's child is greater than current maximum, we should
set new maximum to the child's ID, instead of its parent's.

Fixes: 2dc66a5ab2c6 ("clk: rockchip: rk3588: fix CLK_NR_CLKS usage")
Signed-off-by: Yao Zi <ziyao@disroot.org>
---
 drivers/clk/rockchip/clk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/rockchip/clk.c b/drivers/clk/rockchip/clk.c
index 73d2cbdc716b..0972e9f87470 100644
--- a/drivers/clk/rockchip/clk.c
+++ b/drivers/clk/rockchip/clk.c
@@ -439,7 +439,7 @@ unsigned long rockchip_clk_find_max_clk_id(struct rockchip_clk_branch *list,
 		if (list->id > max)
 			max = list->id;
 		if (list->child && list->child->id > max)
-			max = list->id;
+			max = list->child->id;
 	}
 
 	return max;
-- 
2.46.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-10-09 23:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-12 13:32 [PATCH] clk: rockchip: fix finding of maximum clock ID Yao Zi
2024-09-14  6:48 ` Sebastian Reichel
2024-09-16  7:31   ` Yao Zi
2024-09-14  9:57 ` Heiko Stübner
2024-10-09 23:02   ` Stephen Boyd
2024-10-09 23:07 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).