Skip to content

Commit 739214d

Browse files
aford173vinodkoul
authored andcommitted
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: 1951dbb ("phy: freescale: fsl-samsung-hdmi: Support dynamic integer") Signed-off-by: Adam Ford <[email protected]> Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent a2d633c commit 739214d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/phy/freescale/phy-fsl-samsung-hdmi.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,7 @@ static unsigned long fsl_samsung_hdmi_phy_find_pms(unsigned long fout, u8 *p, u1
424424
* Fvco = (M * f_ref) / P,
425425
* where f_ref is 24MHz.
426426
*/
427-
tmp = (u64)_m * 24 * MHZ;
428-
do_div(tmp, _p);
427+
tmp = div64_ul((u64)_m * 24 * MHZ, _p);
429428
if (tmp < 750 * MHZ ||
430429
tmp > 3000 * MHZ)
431430
continue;

0 commit comments

Comments
 (0)