clk: renesas: rcar-gen3: Improve arithmetic divisions
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 30 Aug 2019 13:45:09 +0000 (15:45 +0200)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 1 Oct 2019 08:24:46 +0000 (10:24 +0200)
commitb5dea62d34042d173ba1d1887c8dd40262423d68
treec620513858ddd2bbeb400a032f789762274ebc82
parent3e8c1d4cce6b679f4cfd81dfdbbf727f06986aa5
clk: renesas: rcar-gen3: Improve arithmetic divisions

- Use div64_ul() instead of div_u64() if the divisor is unsigned long,
    to avoid truncation to 32-bit on 64-bit platforms,
  - Use div_u64() for 64-by-32 divisions.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Link: https://lore.kernel.org/r/20190830134515.11925-3-geert+renesas@glider.be
drivers/clk/renesas/rcar-gen3-cpg.c