Re: [PATCH] rv: Fix 32-bit build of nomiss KUnit test

Nam Cao <[email protected]>
Newsgroups gmane.linux.kernel
Message-ID <[email protected]>
Gabriele Monaco <[email protected]> writes:

> Commit 8da2a8838365 ("rv: Add KUnit tests for some DA/HA monitors")
> introduced a division of a 64-bit value by 1000 in the nomiss KUnit
> test. This does not compile on 32-bit systems, as standard division of
> 64-bit values leads to an undefined reference to __udivdi3.
>
> Fix the build on 32-bit systems by using div_u64().
>
> Fixes: 8da2a8838365 ("rv: Add KUnit tests for some DA/HA monitors")
> Reported-by: kernel test robot <[email protected]>
> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]
> Signed-off-by: Gabriele Monaco <[email protected]>

Reviewed-by: Nam Cao <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.