Files
twx-linux/lib
Arnd Bergmann 1e775697c6 lib: checksum: hide unused expected_csum_ipv6_magic[]
[ Upstream commit e9d47b7b31 ]

When CONFIG_NET is disabled, an extra warning shows up for this
unused variable:

lib/checksum_kunit.c:218:18: error: 'expected_csum_ipv6_magic' defined but not used [-Werror=unused-const-variable=]

Replace the #ifdef with an IS_ENABLED() check that makes the compiler's
dead-code-elimination take care of the link failure.

Fixes: f24a70106d ("lib: checksum: Fix build with CONFIG_NET=n")
Suggested-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Simon Horman <horms@kernel.org> # build-tested
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-17 11:23:28 +02:00
..
2023-12-11 14:33:07 +01:00
2024-01-19 11:59:11 -08:00
2024-03-06 10:52:12 +01:00
2024-02-15 12:17:28 -05:00
2024-01-19 11:59:11 -08:00