Re: [PATCH net] selftests/net: tcp_mmap: remove unused -k option and keepflag

From: Eric Dumazet

Date: Wed Oct 21 2026 - 12:17:15 EST


Le mer. 21 oct. 2026 à 17:27, Greg Thelen <gthelen@xxxxxxxxxx> a écrit :
>
> Commit aacb0c2e524c ("selftests: net: tcp_mmap must use
> TCP_ZEROCOPY_RECEIVE") removed the only read of keepflag in child_thread(),
> leaving the file-scope keepflag variable set by the -k option in main() but
> never read. This triggers a Clang 23 warning:
>
> tcp_mmap.c:91:12: error: variable 'keepflag' set but not used
> [-Werror,-Wunused-but-set-global]
>
> Remove the unused keepflag variable and the dead -k getopt option.
>
> Fixes: aacb0c2e524c ("selftests: net: tcp_mmap must use TCP_ZEROCOPY_RECEIVE")
> Signed-off-by: Greg Thelen <gthelen@xxxxxxxxxx>

Reviewed-by: Eric Dumazet <edumazet@xxxxxxxxxx>

Thanks!