summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Ford <aford173@gmail.com>2024-12-15 23:05:55 +0100
committerVinod Koul <vkoul@kernel.org>2024-12-24 16:07:56 +0100
commit739214dd1c209e34323814fb815fb17cccb9f95b (patch)
treef2211482cfe3b6b3dab65292d15d77d907c32939
parentphy: core: Fix an OF node refcount leakage in of_phy_provider_lookup() (diff)
downloadlinux-739214dd1c209e34323814fb815fb17cccb9f95b.tar.xz
linux-739214dd1c209e34323814fb815fb17cccb9f95b.zip
phy: freescale: fsl-samsung-hdmi: Fix 64-by-32 division cocci warnings
The Kernel test robot returns the following warning: do_div() does a 64-by-32 division, please consider using div64_ul instead. To prevent the 64-by-32 divsion, consolidate both the multiplication and the do_div into one line which explicitly uses u64 sizes. Fixes: 1951dbb41d1d ("phy: freescale: fsl-samsung-hdmi: Support dynamic integer") Signed-off-by: Adam Ford <aford173@gmail.com> Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412091243.fSObwwPi-lkp@intel.com/ Link: https://lore.kernel.org/r/20241215220555.99113-1-aford173@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r--drivers/phy/freescale/phy-fsl-samsung-hdmi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/phy/freescale/phy-fsl-samsung-hdmi.c b/drivers/phy/freescale/phy-fsl-samsung-hdmi.c
index 2c8038864357..d3ccf547ba1c 100644
--- a/drivers/phy/freescale/phy-fsl-samsung-hdmi.c
+++ b/drivers/phy/freescale/phy-fsl-samsung-hdmi.c
@@ -424,8 +424,7 @@ static unsigned long fsl_samsung_hdmi_phy_find_pms(unsigned long fout, u8 *p, u1
* Fvco = (M * f_ref) / P,
* where f_ref is 24MHz.
*/
- tmp = (u64)_m * 24 * MHZ;
- do_div(tmp, _p);
+ tmp = div64_ul((u64)_m * 24 * MHZ, _p);
if (tmp < 750 * MHZ ||
tmp > 3000 * MHZ)
continue;