projects/linux·commit 196145c6

Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux

196145c6 · Linus Torvalds <[email protected]> · 2024-09-12 16:32:32 -07:00

Pull clk fix from Stephen Boyd:
 "One build fix for 32-bit arches using the Qualcomm PLL driver. It's
  cheaper to use a comparison here instead of a division so we just do
  that to fix the build"

* tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
  clk: qcom: clk-alpha-pll: Simplify the zonda_pll_adjust_l_val()
Commit
196145c606d0f816fd3926483cb1ff87e09c2c0b
Parents
b8e7cd09 · a4d89b11

Merge commit. Changes below are compared with the first parent: b8e7cd09.

Changes

1 files changed · +1 −3

FileStatusAddDelContent
drivers/clk/qcom/clk-alpha-pll.cmodified+1−3View file

drivers/clk/qcom/clk-alpha-pll.c

View file
diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c
index ad9a84d..31bf9d1 100644
--- a/drivers/clk/qcom/clk-alpha-pll.c
+++ b/drivers/clk/qcom/clk-alpha-pll.c
@@ -2124,10 +2124,8 @@ static void zonda_pll_adjust_l_val(unsigned long rate, unsigned long prate, u32
quotient = rate;
remainder = do_div(quotient, prate);
- *l = quotient;
- if ((remainder * 2) / prate)
- *l = *l + 1;
+ *l = rate + (u32)(remainder * 2 >= prate);
}
static int clk_zonda_pll_set_rate(struct clk_hw *hw, unsigned long rate,