Re: [PATCH net] kunit: Fix again checksum tests on big endian CPUs

From: Guenter Roeck
Date: Sun Feb 25 2024 - 10:58:58 EST


On Fri, Feb 23, 2024 at 11:41:52AM +0100, Christophe Leroy wrote:
> Commit b38460bc463c ("kunit: Fix checksum tests on big endian CPUs")
> fixed endianness issues with kunit checksum tests, but then
> commit 6f4c45cbcb00 ("kunit: Add tests for csum_ipv6_magic and
> ip_fast_csum") introduced new issues on big endian CPUs. Those issues
> are once again reflected by the warnings reported by sparse.
>
> So, fix them with the same approach, perform proper conversion in
> order to support both little and big endian CPUs. Once the conversions
> are properly done and the right types used, the sparse warnings are
> cleared as well.
>
> Reported-by: Erhard Furtner <erhard_f@xxxxxxxxxxx>
> Fixes: 6f4c45cbcb00 ("kunit: Add tests for csum_ipv6_magic and ip_fast_csum")
> Signed-off-by: Christophe Leroy <christophe.leroy@xxxxxxxxxx>

Tested-by: Guenter Roeck <linux@xxxxxxxxxxxx>