lkml.org 
[lkml]   [2024]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] lib: checksum: hide unused expected_csum_ipv6_magic[]
On Thu, Apr 04, 2024 at 06:36:45PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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 <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>
> ---
> resending v2 to netdev

Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Simon Horman <horms@kernel.org> # build-tested

\
 
 \ /
  Last update: 2024-05-27 16:28    [W:0.033 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site