Skip to content

Commit 89dc65a

Browse files
ConchuODbebarino
authored andcommitted
clk: k210: remove an implicit 64-bit division
The K210 clock driver depends on SOC_CANAAN, which is only selectable when !MMU on RISC-V. !MMU is not possible on 32-bit yet, but patches have been sent for its enabling. The kernel test robot reported this implicit 64-bit division there. Replace the implicit division with an explicit one. Reported-by: kernel test robot <[email protected]> Link: https://lore.kernel.org/linux-riscv/[email protected]/ Signed-off-by: Conor Dooley <[email protected]> Signed-off-by: Jesse Taube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Damien Le Moal <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent 2624387 commit 89dc65a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/clk/clk-k210.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ static unsigned long k210_pll_get_rate(struct clk_hw *hw,
495495
f = FIELD_GET(K210_PLL_CLKF, reg) + 1;
496496
od = FIELD_GET(K210_PLL_CLKOD, reg) + 1;
497497

498-
return (u64)parent_rate * f / (r * od);
498+
return div_u64((u64)parent_rate * f, r * od);
499499
}
500500

501501
static const struct clk_ops k210_pll_ops = {

0 commit comments

Comments
 (0)