The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=815f2a61bfa43bf46d79b34f081e2fac1dca1d3d
commit 815f2a61bfa43bf46d79b34f081e2fac1dca1d3d Author: Gleb Smirnoff <gleb...@freebsd.org> AuthorDate: 2025-02-03 05:36:17 +0000 Commit: Gleb Smirnoff <gleb...@freebsd.org> CommitDate: 2025-02-03 06:38:24 +0000 sockets: removed unused argument from sopoll() --- sys/kern/sys_generic.c | 2 +- sys/kern/sys_socket.c | 2 +- sys/kern/uipc_domain.c | 3 +-- sys/kern/uipc_socket.c | 8 +++----- sys/sys/protosw.h | 3 +-- sys/sys/socketvar.h | 6 ++---- 6 files changed, 9 insertions(+), 15 deletions(-) diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 6fc7d5d2eefa..a3722d771573 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -1817,7 +1817,7 @@ selsocket(struct socket *so, int events, struct timeval *tvp, struct thread *td) */ for (;;) { selfdalloc(td, NULL); - if (sopoll(so, events, NULL, td) != 0) { + if (sopoll(so, events, td) != 0) { error = 0; break; } diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c index 9011aa31c44f..ec9fd615685b 100644 --- a/sys/kern/sys_socket.c +++ b/sys/kern/sys_socket.c @@ -288,7 +288,7 @@ soo_poll(struct file *fp, int events, struct ucred *active_cred, if (error) return (error); #endif - return (sopoll(so, events, fp->f_cred, td)); + return (sopoll(so, events, td)); } static int diff --git a/sys/kern/uipc_domain.c b/sys/kern/uipc_domain.c index c5296f12ba94..0d3c622fa9c0 100644 --- a/sys/kern/uipc_domain.c +++ b/sys/kern/uipc_domain.c @@ -177,8 +177,7 @@ pr_soreceive_notsupp(struct socket *so, struct sockaddr **paddr, } static int -pr_sopoll_notsupp(struct socket *so, int events, struct ucred *cred, - struct thread *td) +pr_sopoll_notsupp(struct socket *so, int events, struct thread *td) { return (EOPNOTSUPP); } diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 46a7053f2872..accd63642024 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -4405,20 +4405,18 @@ sohasoutofband(struct socket *so) } int -sopoll(struct socket *so, int events, struct ucred *active_cred, - struct thread *td) +sopoll(struct socket *so, int events, struct thread *td) { /* * We do not need to set or assert curvnet as long as everyone uses * sopoll_generic(). */ - return (so->so_proto->pr_sopoll(so, events, active_cred, td)); + return (so->so_proto->pr_sopoll(so, events, td)); } int -sopoll_generic(struct socket *so, int events, struct ucred *active_cred, - struct thread *td) +sopoll_generic(struct socket *so, int events, struct thread *td) { int revents; diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h index f9d7e1c4bb69..941d377b1549 100644 --- a/sys/sys/protosw.h +++ b/sys/sys/protosw.h @@ -93,8 +93,7 @@ typedef int pr_sosend_t(struct socket *, struct sockaddr *, struct uio *, struct mbuf *, struct mbuf *, int, struct thread *); typedef int pr_soreceive_t(struct socket *, struct sockaddr **, struct uio *, struct mbuf **, struct mbuf **, int *); -typedef int pr_sopoll_t(struct socket *, int, struct ucred *, - struct thread *); +typedef int pr_sopoll_t(struct socket *, int, struct thread *); typedef void pr_sosetlabel_t(struct socket *); typedef void pr_close_t(struct socket *); typedef int pr_bindat_t(int, struct socket *, struct sockaddr *, diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index e818fd3fc757..57209ea5557f 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -525,10 +525,8 @@ struct socket * sonewconn(struct socket *head, int connstatus); struct socket * sopeeloff(struct socket *); -int sopoll(struct socket *so, int events, struct ucred *active_cred, - struct thread *td); -int sopoll_generic(struct socket *so, int events, - struct ucred *active_cred, struct thread *td); +int sopoll(struct socket *so, int events, struct thread *td); +int sopoll_generic(struct socket *so, int events, struct thread *td); int soreceive(struct socket *so, struct sockaddr **paddr, struct uio *uio, struct mbuf **mp0, struct mbuf **controlp, int *flagsp); int soreceive_stream(struct socket *so, struct sockaddr **paddr,