From: Joe Damato <joe@dama.to>
To: longlong yan <yanlonglong@kylinos.cn>
Cc: pabeni@redhat.com, kuba@kernel.org, davem@davemloft.net,
edumazet@google.com, netdev@vger.kernel.org,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
shuah@kernel.org, horms@kernel.org
Subject: Re: [PATCH] selftests/net: use MAP_FAILED instead of (void *)-1 in tcp_mmap
Date: Wed, 22 Jul 2026 06:15:19 -0700 [thread overview]
Message-ID: <amDCZ5t8wDtqNAIe@devvm20253.cco0.facebook.com> (raw)
In-Reply-To: <20260722015129.916-1-yanlonglong@kylinos.cn>
On Wed, Jul 22, 2026 at 09:51:29AM +0800, longlong yan wrote:
> mmap() is documented to return MAP_FAILED on error, but tcp_mmap.c
> compares the return value against (void *)-1 and (unsigned char *)-1.
>
> Replace these with the standard MAP_FAILED macro for better readability
> and type safety.
>
> Signed-off-by: longlong yan <yanlonglong@kylinos.cn>
> ---
> tools/testing/selftests/net/tcp_mmap.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
Looks right to me. Not sure if it needs to be set with "net-next" in the
subject line to make which tree this targets more explicit?
Either way:
Reviewed-by: Joe Damato <joe@dama.to>
next prev parent reply other threads:[~2026-07-22 13:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-22 1:51 [PATCH] selftests/net: use MAP_FAILED instead of (void *)-1 in tcp_mmap longlong yan
2026-07-22 13:15 ` Joe Damato [this message]
2026-07-22 13:46 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=amDCZ5t8wDtqNAIe@devvm20253.cco0.facebook.com \
--to=joe@dama.to \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=yanlonglong@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox