skmsg: remove unused parameters of sk_msg_wait_data()
Subsystems (5)
PATCH 1/1 skmsg: remove unused parameters of sk_msg_wait_data()
From: Cong Wang <[email protected]>
'err' and 'flags' are not used, we can just get rid of them.
--- include/linux/skmsg.h | 3 +-- net/core/skmsg.c | 3 +-- net/ipv4/tcp_bpf.c | 9 ++------- net/ipv4/udp_bpf.c | 8 ++------ 4 files changed, 6 insertions(+), 17 deletions(-)
include/linux/skmsg.h +1 -2
@@ -126,8 +126,7 @@ int sk_msg_zerocopy_from_iter(struct sock *sk, struct iov_iter *from, struct sk_msg *msg, u32 bytes);int sk_msg_memcopy_from_iter (struct sock *sk,struct iov_iter *from,struct sk_msg *msg,u32 bytes); -int sk_msg_wait_data (struct sock *sk,struct sk_psock *psock,int flags, -long timeo,int *err); +int sk_msg_wait_data (struct sock *sk,struct sk_psock *psock,long timeo);int sk_msg_recvmsg (struct sock *sk,struct sk_psock *psock,struct msghdr *msg,int len,int flags);
net/core/skmsg.c +1 -2
@@ -399,8 +399,7 @@ int sk_msg_memcopy_from_iter(struct sock *sk, struct iov_iter *from, }EXPORT_SYMBOL_GPL (sk_msg_memcopy_from_iter); -int sk_msg_wait_data (struct sock *sk,struct sk_psock *psock,int flags, -long timeo,int *err) +int sk_msg_wait_data (struct sock *sk,struct sk_psock *psock,long timeo) {DEFINE_WAIT_FUNC (wait, woken_wake_function);int ret =0 ;
net/ipv4/tcp_bpf.c +2 -7
@@ -184,11 +184,11 @@ static int tcp_bpf_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, msg_bytes_ready: copied =sk_msg_recvmsg (sk, psock, msg, len, flags);if (!copied) { -int data, err =0 ;long timeo; +int data; timeo =sock_rcvtimeo (sk, nonblock); - data =sk_msg_wait_data (sk, psock, flags, timeo, &err); + data =sk_msg_wait_data (sk, psock, timeo);if (data) {if (!sk_psock_queue_empty (psock)) goto msg_bytes_ready;
@@ -196,14 +196,9 @@ static int tcp_bpf_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,sk_psock_put (sk, psock);return tcp_recvmsg (sk, msg, len, nonblock, flags, addr_len); } -if (err) { - ret = err; - goto out; - } copied = -EAGAIN ; } ret = copied; -out:release_sock (sk);sk_psock_put (sk, psock);return ret;
net/ipv4/udp_bpf.c +2 -6
@@ -43,21 +43,17 @@ static int udp_bpf_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, msg_bytes_ready: copied =sk_msg_recvmsg (sk, psock, msg, len, flags);if (!copied) { -int data, err =0 ;long timeo; +int data; timeo =sock_rcvtimeo (sk, nonblock); - data =sk_msg_wait_data (sk, psock, flags, timeo, &err); + data =sk_msg_wait_data (sk, psock, timeo);if (data) {if (!sk_psock_queue_empty (psock)) goto msg_bytes_ready; ret =sk_udp_recvmsg (sk, msg, len, nonblock, flags, addr_len); goto out; } -if (err) { - ret = err; - goto out; - } copied = -EAGAIN ; } ret = copied;
Signature · 1 line
2.25.1
Quoted 10 lines · Cong Wang
From: Cong Wang <[email protected]>
'err' and 'flags' are not used, we can just get rid of them.
Cc John Fastabend <[email protected]>Cc Daniel Borkmann <[email protected]>Cc Jakub Sitnicki <[email protected]>Cc Lorenz Bauer <[email protected]>Signed-off-by Cong Wang <[email protected]>
[...]
Quoted 10 lines · Cong Wang
From: Cong Wang <[email protected]>
'err' and 'flags' are not used, we can just get rid of them.
Cc John Fastabend <[email protected]>Cc Daniel Borkmann <[email protected]>Cc Jakub Sitnicki <[email protected]>Cc Lorenz Bauer <[email protected]>Signed-off-by Cong Wang <[email protected]>---
Thanks. At bpf-next would also work.
This patch was applied to bpf/bpf-next.git (refs/heads/master):
Hello:
This patch was applied to bpf/bpf-next.git (refs/heads/master):
Quoted 11 lines · On Sun, 16 May 2021 19:23:48 -0700 you wrote:
From: Cong Wang <[email protected]>
'err' and 'flags' are not used, we can just get rid of them.
Cc John Fastabend <[email protected]>Cc Daniel Borkmann <[email protected]>Cc Jakub Sitnicki <[email protected]>Cc Lorenz Bauer <[email protected]>Signed-off-by Cong Wang <[email protected]>[...]
Here is the summary with links:
- [bpf] skmsg: remove unused parameters of sk_msg_wait_data()
https://git.kernel.org/bpf/bpf-next/c/c49661aa6f70
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html