* [PATCH net-next] vsock: remove unnecessary null check in vsock_getname()
@ 2025-07-25 1:38 Wang Liang
2025-07-25 8:39 ` Stefano Garzarella
2025-07-26 18:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Wang Liang @ 2025-07-25 1:38 UTC (permalink / raw)
To: sgarzare, davem, edumazet, kuba, pabeni, horms
Cc: yuehaibing, zhangchangzhong, wangliang74, virtualization, netdev,
linux-kernel
The local variable 'vm_addr' is always not NULL, no need to check it.
Signed-off-by: Wang Liang <wangliang74@huawei.com>
---
net/vmw_vsock/af_vsock.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index 1053662725f8..fae512594849 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -1028,11 +1028,6 @@ static int vsock_getname(struct socket *sock,
vm_addr = &vsk->local_addr;
}
- if (!vm_addr) {
- err = -EINVAL;
- goto out;
- }
-
/* sys_getsockname() and sys_getpeername() pass us a
* MAX_SOCK_ADDR-sized buffer and don't set addr_len. Unfortunately
* that macro is defined in socket.c instead of .h, so we hardcode its
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] vsock: remove unnecessary null check in vsock_getname()
2025-07-25 1:38 [PATCH net-next] vsock: remove unnecessary null check in vsock_getname() Wang Liang
@ 2025-07-25 8:39 ` Stefano Garzarella
2025-07-26 18:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Stefano Garzarella @ 2025-07-25 8:39 UTC (permalink / raw)
To: Wang Liang
Cc: davem, edumazet, kuba, pabeni, horms, yuehaibing, zhangchangzhong,
virtualization, netdev, linux-kernel
On Fri, Jul 25, 2025 at 09:38:08AM +0800, Wang Liang wrote:
>The local variable 'vm_addr' is always not NULL, no need to check it.
>
>Signed-off-by: Wang Liang <wangliang74@huawei.com>
>---
> net/vmw_vsock/af_vsock.c | 5 -----
> 1 file changed, 5 deletions(-)
Thanks for the cleanup! We've had it since the beginning, maybe some
changes were made during initial development...
LGTM!
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
>
>diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
>index 1053662725f8..fae512594849 100644
>--- a/net/vmw_vsock/af_vsock.c
>+++ b/net/vmw_vsock/af_vsock.c
>@@ -1028,11 +1028,6 @@ static int vsock_getname(struct socket *sock,
> vm_addr = &vsk->local_addr;
> }
>
>- if (!vm_addr) {
>- err = -EINVAL;
>- goto out;
>- }
>-
> /* sys_getsockname() and sys_getpeername() pass us a
> * MAX_SOCK_ADDR-sized buffer and don't set addr_len. Unfortunately
> * that macro is defined in socket.c instead of .h, so we hardcode its
>--
>2.34.1
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] vsock: remove unnecessary null check in vsock_getname()
2025-07-25 1:38 [PATCH net-next] vsock: remove unnecessary null check in vsock_getname() Wang Liang
2025-07-25 8:39 ` Stefano Garzarella
@ 2025-07-26 18:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-07-26 18:40 UTC (permalink / raw)
To: Wang Liang
Cc: sgarzare, davem, edumazet, kuba, pabeni, horms, yuehaibing,
zhangchangzhong, virtualization, netdev, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 25 Jul 2025 09:38:08 +0800 you wrote:
> The local variable 'vm_addr' is always not NULL, no need to check it.
>
> Signed-off-by: Wang Liang <wangliang74@huawei.com>
> ---
> net/vmw_vsock/af_vsock.c | 5 -----
> 1 file changed, 5 deletions(-)
Here is the summary with links:
- [net-next] vsock: remove unnecessary null check in vsock_getname()
https://git.kernel.org/netdev/net-next/c/002f79a5f015
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] 3+ messages in thread
end of thread, other threads:[~2025-07-26 18:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-25 1:38 [PATCH net-next] vsock: remove unnecessary null check in vsock_getname() Wang Liang
2025-07-25 8:39 ` Stefano Garzarella
2025-07-26 18:40 ` 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).