[PATCH 2/2] lib: kunit: add tests for __ashldi3(), __ashrdi3(), and __lshrdi3()
Andy Shevchenko
andriy.shevchenko at intel.com
Wed Apr 8 12:41:53 PDT 2026
On Tue, Apr 07, 2026 at 08:28:24AM +0300, Dmitry Antipov wrote:
> Add KUnit tests for '__ashldi3()', '__ashrdi3()', and '__lshrdi3()'
> helper functions used to implement 64-bit arithmetic shift left,
> arithmetic shift right and logical shift right, respectively,
> on a 32-bit CPUs.
>
> Tested with 'qemu-system-riscv32 -M virt' and 'qemu-system-arm -M virt'.
...
> +#include <linux/kernel.h>
> +#include <linux/libgcc.h>
> +#include <kunit/test.h>
Always try to follow IWYU principle. The kernel.h is a niche header and rarely
should be included. I do not see any use of it here. OTOH module.h and
array_size.h are missing.
With that being addressed, I'm always in love with new test cases!
Reviewed-by: Andy Shevchenko <andriy.shevchenko at intel.com>
--
With Best Regards,
Andy Shevchenko
More information about the linux-riscv
mailing list