Subject: Re: [PATCH v2] lib: checksum: hide unused expected_csum_ipv6_magic[]

From: Simon Horman <[email-masked]>
Date: Mon, 8 Apr 2024 08:49:39 +0100

On Thu, Apr 04, 2024 at 06:36:45PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <[email-masked]>
> 
> 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: f24a70106dc1 ("lib: checksum: Fix build with CONFIG_NET=n")
> Suggested-by: Christophe Leroy <[email-masked]>
> Acked-by: Palmer Dabbelt <[email-masked]>
> Acked-by: Jakub Kicinski <[email-masked]>
> Signed-off-by: Arnd Bergmann <[email-masked]>
> ---
> resending v2 to netdev

Reviewed-by: Simon Horman <[email-masked]>
Tested-by: Simon Horman <[email-masked]> # build-tested