* [PATCH next v2] clk: microchip: core: remove duplicate roclk_determine_rate()
@ 2025-09-28 0:34 Brian Masney
2025-10-01 4:55 ` Stephen Boyd
0 siblings, 1 reply; 2+ messages in thread
From: Brian Masney @ 2025-09-28 0:34 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Brian Masney
Cc: linux-clk, linux-kernel, kernel test robot
Fix compiler error caused by the round_rate() to determine_rate()
migration.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202509280327.jsapR0Ww-lkp@intel.com/
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
I didn't cross compile the original series on MIPS, and this driver
isn't compiled with COMPILE_TEST. I couldn't enable COMPILE_TEST for
this driver because of the asm/mach-pic32/pic32.h include.
I didn't include a Fixes tag since the original commit didn't make it's
way into Linus's tree yet. I'm not sure if you want to squash this, or
include it as a separate commit.
Fixes: e9f039c08cdc ("clk: microchip: core: convert from round_rate() to determine_rate()")
The SHA is from next-20250926.
Changes since v1:
https://lore.kernel.org/linux-clk/20250927-clk-microchip-core-compile-error-v1-1-c5c3bd633c5b@redhat.com/T/#u
- Add Reported-by and Closes tags
---
drivers/clk/microchip/clk-core.c | 23 ++++++++---------------
1 file changed, 8 insertions(+), 15 deletions(-)
diff --git a/drivers/clk/microchip/clk-core.c b/drivers/clk/microchip/clk-core.c
index 3e03e10539c72cc28e53401093e37409c2ea3d08..b34348d491f3e1b576b2b9a8a66bfddd8c2296ea 100644
--- a/drivers/clk/microchip/clk-core.c
+++ b/drivers/clk/microchip/clk-core.c
@@ -374,20 +374,6 @@ static unsigned long roclk_recalc_rate(struct clk_hw *hw,
return roclk_calc_rate(parent_rate, rodiv, rotrim);
}
-static int roclk_determine_rate(struct clk_hw *hw,
- struct clk_rate_request *req)
-{
- u32 rotrim, rodiv;
-
- /* calculate dividers for new rate */
- roclk_calc_div_trim(req->rate, req->best_parent_rate, &rodiv, &rotrim);
-
- /* caclulate new rate (rounding) based on new rodiv & rotrim */
- req->rate = roclk_calc_rate(req->best_parent_rate, rodiv, rotrim);
-
- return 0;
-}
-
static int roclk_determine_rate(struct clk_hw *hw,
struct clk_rate_request *req)
{
@@ -398,6 +384,8 @@ static int roclk_determine_rate(struct clk_hw *hw,
/* find a parent which can generate nearest clkrate >= rate */
for (i = 0; i < clk_hw_get_num_parents(hw); i++) {
+ u32 rotrim, rodiv;
+
/* get parent */
parent_clk = clk_hw_get_parent_by_index(hw, i);
if (!parent_clk)
@@ -408,7 +396,12 @@ static int roclk_determine_rate(struct clk_hw *hw,
if (req->rate > parent_rate)
continue;
- nearest_rate = roclk_round_rate(hw, req->rate, &parent_rate);
+ /* calculate dividers for new rate */
+ roclk_calc_div_trim(req->rate, req->best_parent_rate, &rodiv, &rotrim);
+
+ /* caclulate new rate (rounding) based on new rodiv & rotrim */
+ nearest_rate = roclk_calc_rate(req->best_parent_rate, rodiv, rotrim);
+
delta = abs(nearest_rate - req->rate);
if ((nearest_rate >= req->rate) && (delta < best_delta)) {
best_parent_clk = parent_clk;
---
base-commit: 262858079afde6d367ce3db183c74d8a43a0e83f
change-id: 20250927-clk-microchip-core-compile-error-fef8c20ed5fe
Best regards,
--
Brian Masney <bmasney@redhat.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH next v2] clk: microchip: core: remove duplicate roclk_determine_rate()
2025-09-28 0:34 [PATCH next v2] clk: microchip: core: remove duplicate roclk_determine_rate() Brian Masney
@ 2025-10-01 4:55 ` Stephen Boyd
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2025-10-01 4:55 UTC (permalink / raw)
To: Brian Masney, Michael Turquette
Cc: linux-clk, linux-kernel, kernel test robot
Quoting Brian Masney (2025-09-27 17:34:34)
> Fix compiler error caused by the round_rate() to determine_rate()
> migration.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202509280327.jsapR0Ww-lkp@intel.com/
> Signed-off-by: Brian Masney <bmasney@redhat.com>
> ---
Applied to clk-next
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-01 4:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-28 0:34 [PATCH next v2] clk: microchip: core: remove duplicate roclk_determine_rate() Brian Masney
2025-10-01 4:55 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®