Skip to content
Commit e9d47b7b authored by Arnd Bergmann's avatar Arnd Bergmann Committed by David S. Miller
Browse files

lib: checksum: hide unused expected_csum_ipv6_magic[]



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: f24a7010 ("lib: checksum: Fix build with CONFIG_NET=n")
Suggested-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
Acked-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
Acked-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Tested-by: Simon Horman <horms@kernel.org> # build-tested
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bccb798e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment