]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: delay: use do_div() instead of __udivdi3()
authorPaul Walmsley <paul.walmsley@sifive.com>
Wed, 7 Aug 2019 01:28:33 +0000 (18:28 -0700)
committerPaul Walmsley <paul.walmsley@sifive.com>
Thu, 8 Aug 2019 23:05:38 +0000 (16:05 -0700)
commit5671d27c006fd51f21940af5f6ef48921ab05007
tree2b30cec4d28347b7787c8239a0d4d5d9fdd1801b
parent69974314d8d1fd38736ba0b32c73cd3e5c879c52
riscv: delay: use do_div() instead of __udivdi3()

In preparation for removing __udivdi3() from the RISC-V
architecture-specific files, convert its one user to use do_div().
This avoids breaking the RV32 build after __udivdi3() is removed.

This second version removes the assignment of the remainder to an
unused temporary variable.  Thanks to Nicolas Pitre <nico@fluxnic.net>
for the suggestion.

Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Nicolas Pitre <nico@fluxnic.net>
arch/riscv/lib/delay.c