Re: [PATCH 18/34] lib: checksum: hide unused expected_csum_ipv6_magic[]

From: Arnd Bergmann
Date: Thu Apr 04 2024 - 07:44:09 EST


On Wed, Apr 3, 2024, at 11:03, Christophe Leroy wrote:
> Le 03/04/2024 à 10:58, Arnd Bergmann a écrit :
>
>> On Wed, Apr 3, 2024, at 10:41, Christophe Leroy wrote:
>> Yes, I usually prefer that approach, and I think I tried it first
>> but ran into compile-time problems because csum_ipv6_magic()
>> is declared conditionally. Let me try again, maybe I misremember
>> what I did or I can remove some more #ifdef checks for this.
>
> FWIW, before replying I did a build check with pmac32_defconfig
> (powerpc) with CONFIG_NET removed. I was able to build
> lib/checksum_kunit.o and objdump shown there was no reference to
> csum_ipv6_magic() inside it.

Right, got it now. I was confused a bit by CONFIG_NET vs CONFIG_IPV6
given that the common definition for csum_ipv6_magic() is in
net/ipv6 but unlike other files there still gets build when IPV6
is disabled but NET remains turned on.

I've done a little more randconfig testing to verify it,
sending v2 now.

Arnd