]> www.infradead.org Git - users/jedix/linux-maple.git/commit
clk: qcom: clk-alpha-pll: Simplify the zonda_pll_adjust_l_val()
authorSatya Priya Kakitapalli <quic_skakitap@quicinc.com>
Fri, 6 Sep 2024 11:39:05 +0000 (17:09 +0530)
committerStephen Boyd <sboyd@kernel.org>
Mon, 9 Sep 2024 21:06:07 +0000 (14:06 -0700)
commita4d89b11aca3ffa73e234f06685261ce85e5fb41
tree928763c6c06978486b9d1f764f9f1de64df79381
parent71c03a8cb213d267853e0d9f520c972480960544
clk: qcom: clk-alpha-pll: Simplify the zonda_pll_adjust_l_val()

In zonda_pll_adjust_l_val() replace the divide operator with comparison
operator to fix below build error and smatch warning.

drivers/clk/qcom/clk-alpha-pll.o: In function `clk_zonda_pll_set_rate':
clk-alpha-pll.c:(.text+0x45dc): undefined reference to `__aeabi_uldivmod'

smatch warnings:
drivers/clk/qcom/clk-alpha-pll.c:2129 zonda_pll_adjust_l_val() warn: replace
divide condition '(remainder * 2) / prate' with '(remainder * 2) >= prate'

Fixes: f4973130d255 ("clk: qcom: clk-alpha-pll: Update set_rate for Zonda PLL")
Reported-by: Jon Hunter <jonathanh@nvidia.com>
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202408110724.8pqbpDiD-lkp@intel.com/
Signed-off-by: Satya Priya Kakitapalli <quic_skakitap@quicinc.com>
Link: https://lore.kernel.org/r/20240906113905.641336-1-quic_skakitap@quicinc.com
Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/qcom/clk-alpha-pll.c