* [PATCH] net/rds: Drop duplicate sin and sin6 assignments
@ 2021-03-10 3:23 Yejune Deng
2021-03-10 21:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Yejune Deng @ 2021-03-10 3:23 UTC (permalink / raw)
To: santosh.shilimkar, davem, kuba
Cc: netdev, linux-rdma, rds-devel, linux-kernel, yejune.deng
There is no need to assign the msg->msg_name to sin or sin6,
because there is DECLARE_SOCKADDR statement.
Signed-off-by: Yejune Deng <yejune.deng@gmail.com>
---
net/rds/recv.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/net/rds/recv.c b/net/rds/recv.c
index aba4afe4dfed..4db109fb6ec2 100644
--- a/net/rds/recv.c
+++ b/net/rds/recv.c
@@ -722,8 +722,6 @@ int rds_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
if (msg->msg_name) {
if (ipv6_addr_v4mapped(&inc->i_saddr)) {
- sin = (struct sockaddr_in *)msg->msg_name;
-
sin->sin_family = AF_INET;
sin->sin_port = inc->i_hdr.h_sport;
sin->sin_addr.s_addr =
@@ -731,8 +729,6 @@ int rds_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
memset(sin->sin_zero, 0, sizeof(sin->sin_zero));
msg->msg_namelen = sizeof(*sin);
} else {
- sin6 = (struct sockaddr_in6 *)msg->msg_name;
-
sin6->sin6_family = AF_INET6;
sin6->sin6_port = inc->i_hdr.h_sport;
sin6->sin6_addr = inc->i_saddr;
--
2.29.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net/rds: Drop duplicate sin and sin6 assignments
2021-03-10 3:23 [PATCH] net/rds: Drop duplicate sin and sin6 assignments Yejune Deng
@ 2021-03-10 21:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-03-10 21:00 UTC (permalink / raw)
To: Yejune Deng
Cc: santosh.shilimkar, davem, kuba, netdev, linux-rdma, rds-devel,
linux-kernel
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Wed, 10 Mar 2021 11:23:43 +0800 you wrote:
> There is no need to assign the msg->msg_name to sin or sin6,
> because there is DECLARE_SOCKADDR statement.
>
> Signed-off-by: Yejune Deng <yejune.deng@gmail.com>
> ---
> net/rds/recv.c | 4 ----
> 1 file changed, 4 deletions(-)
Here is the summary with links:
- net/rds: Drop duplicate sin and sin6 assignments
https://git.kernel.org/netdev/net-next/c/3e6f20e09a45
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-10 21:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 3:23 [PATCH] net/rds: Drop duplicate sin and sin6 assignments Yejune Deng
2021-03-10 21:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).