[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240813094035.974317-1-quic_skakitap@quicinc.com>
Date: Tue, 13 Aug 2024 15:10:35 +0530
From: Satya Priya Kakitapalli <quic_skakitap@...cinc.com>
To: Bjorn Andersson <andersson@...nel.org>,
Michael Turquette
<mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>
CC: <linux-arm-msm@...r.kernel.org>, <linux-clk@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, Ajit Pandey <quic_ajipan@...cinc.com>,
"Imran
Shaik" <quic_imrashai@...cinc.com>,
Taniya Das <quic_tdas@...cinc.com>,
Jagadeesh Kona <quic_jkona@...cinc.com>,
Satya Priya Kakitapalli
<quic_skakitap@...cinc.com>,
kernel test robot <lkp@...el.com>,
Dan Carpenter
<dan.carpenter@...aro.org>
Subject: [PATCH] clk: qcom: clk-alpha-pll: Replace divide operator with comparison
In zonda_pll_adjust_l_val() replace the divide operator with comparison
operator since comparisons are faster than divisions.
Fixes: f4973130d255 ("clk: qcom: clk-alpha-pll: Update set_rate for Zonda PLL")
Reported-by: kernel test robot <lkp@...el.com>
Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
Closes: https://lore.kernel.org/r/202408110724.8pqbpDiD-lkp@intel.com/
Signed-off-by: Satya Priya Kakitapalli <quic_skakitap@...cinc.com>
---
drivers/clk/qcom/clk-alpha-pll.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c
index 2f620ccb41cb..fd8a82bb3690 100644
--- a/drivers/clk/qcom/clk-alpha-pll.c
+++ b/drivers/clk/qcom/clk-alpha-pll.c
@@ -2126,7 +2126,7 @@ static void zonda_pll_adjust_l_val(unsigned long rate, unsigned long prate, u32
remainder = do_div(quotient, prate);
*l = quotient;
- if ((remainder * 2) / prate)
+ if ((remainder * 2) >= prate)
*l = *l + 1;
}
--
2.25.1
Powered by blists - more mailing lists