Skip to content

Commit ade994f

Browse files
author
Al Viro
committed
net: annotate ->poll() instances
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent e6c5a7d commit ade994f

File tree

40 files changed

+77
-76
lines changed

40 files changed

+77
-76
lines changed

drivers/staging/irda/net/af_irda.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1737,12 +1737,12 @@ static int irda_shutdown(struct socket *sock, int how)
17371737
/*
17381738
* Function irda_poll (file, sock, wait)
17391739
*/
1740-
static unsigned int irda_poll(struct file * file, struct socket *sock,
1740+
static __poll_t irda_poll(struct file * file, struct socket *sock,
17411741
poll_table *wait)
17421742
{
17431743
struct sock *sk = sock->sk;
17441744
struct irda_sock *self = irda_sk(sk);
1745-
unsigned int mask;
1745+
__poll_t mask;
17461746

17471747
poll_wait(file, sk_sleep(sk), wait);
17481748
mask = 0;

drivers/staging/irda/net/irnet/irnet_ppp.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -419,12 +419,12 @@ irnet_ctrl_read(irnet_socket * ap,
419419
* Poll : called when someone do a select on /dev/irnet.
420420
* Just check if there are new events...
421421
*/
422-
static inline unsigned int
422+
static inline __poll_t
423423
irnet_ctrl_poll(irnet_socket * ap,
424424
struct file * file,
425425
poll_table * wait)
426426
{
427-
unsigned int mask;
427+
__poll_t mask;
428428

429429
DENTER(CTRL_TRACE, "(ap=0x%p)\n", ap);
430430

@@ -608,12 +608,12 @@ dev_irnet_read(struct file * file,
608608
/*
609609
* Poll : called when someone do a select on /dev/irnet
610610
*/
611-
static unsigned int
611+
static __poll_t
612612
dev_irnet_poll(struct file * file,
613613
poll_table * wait)
614614
{
615615
irnet_socket * ap = file->private_data;
616-
unsigned int mask;
616+
__poll_t mask;
617617

618618
DENTER(FS_TRACE, "(file=0x%p, ap=0x%p)\n",
619619
file, ap);

drivers/staging/irda/net/irnet/irnet_ppp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static ssize_t
7070
char __user *,
7171
size_t,
7272
loff_t *);
73-
static unsigned int
73+
static __poll_t
7474
dev_irnet_poll(struct file *,
7575
poll_table *);
7676
static long

include/linux/skbuff.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3242,7 +3242,7 @@ struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned flags,
32423242
int *peeked, int *off, int *err);
32433243
struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock,
32443244
int *err);
3245-
unsigned int datagram_poll(struct file *file, struct socket *sock,
3245+
__poll_t datagram_poll(struct file *file, struct socket *sock,
32463246
struct poll_table_struct *wait);
32473247
int skb_copy_datagram_iter(const struct sk_buff *from, int offset,
32483248
struct iov_iter *to, int size);

include/net/bluetooth/bluetooth.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ int bt_sock_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
271271
int flags);
272272
int bt_sock_stream_recvmsg(struct socket *sock, struct msghdr *msg,
273273
size_t len, int flags);
274-
uint bt_sock_poll(struct file *file, struct socket *sock, poll_table *wait);
274+
__poll_t bt_sock_poll(struct file *file, struct socket *sock, poll_table *wait);
275275
int bt_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
276276
int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo);
277277
int bt_sock_wait_ready(struct sock *sk, unsigned long flags);

include/net/inet_connection_sock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ void inet_csk_prepare_forced_close(struct sock *sk);
305305
/*
306306
* LISTEN is a special case for poll..
307307
*/
308-
static inline unsigned int inet_csk_listen_poll(const struct sock *sk)
308+
static inline __poll_t inet_csk_listen_poll(const struct sock *sk)
309309
{
310310
return !reqsk_queue_empty(&inet_csk(sk)->icsk_accept_queue) ?
311311
(POLLIN | POLLRDNORM) : 0;

include/net/iucv/af_iucv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ struct iucv_sock_list {
153153
atomic_t autobind_name;
154154
};
155155

156-
unsigned int iucv_sock_poll(struct file *file, struct socket *sock,
156+
__poll_t iucv_sock_poll(struct file *file, struct socket *sock,
157157
poll_table *wait);
158158
void iucv_sock_link(struct iucv_sock_list *l, struct sock *s);
159159
void iucv_sock_unlink(struct iucv_sock_list *l, struct sock *s);

include/net/sctp/sctp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ int sctp_backlog_rcv(struct sock *sk, struct sk_buff *skb);
107107
int sctp_inet_listen(struct socket *sock, int backlog);
108108
void sctp_write_space(struct sock *sk);
109109
void sctp_data_ready(struct sock *sk);
110-
unsigned int sctp_poll(struct file *file, struct socket *sock,
110+
__poll_t sctp_poll(struct file *file, struct socket *sock,
111111
poll_table *wait);
112112
void sctp_sock_rfree(struct sk_buff *skb);
113113
void sctp_copy_sock(struct sock *newsk, struct sock *sk,

include/net/sock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1582,7 +1582,7 @@ int sock_no_connect(struct socket *, struct sockaddr *, int, int);
15821582
int sock_no_socketpair(struct socket *, struct socket *);
15831583
int sock_no_accept(struct socket *, struct socket *, int, bool);
15841584
int sock_no_getname(struct socket *, struct sockaddr *, int *, int);
1585-
unsigned int sock_no_poll(struct file *, struct socket *,
1585+
__poll_t sock_no_poll(struct file *, struct socket *,
15861586
struct poll_table_struct *);
15871587
int sock_no_ioctl(struct socket *, unsigned int, unsigned long);
15881588
int sock_no_listen(struct socket *, int);

include/net/tcp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ bool tcp_peer_is_proven(struct request_sock *req, struct dst_entry *dst);
387387
void tcp_close(struct sock *sk, long timeout);
388388
void tcp_init_sock(struct sock *sk);
389389
void tcp_init_transfer(struct sock *sk, int bpf_op);
390-
unsigned int tcp_poll(struct file *file, struct socket *sock,
390+
__poll_t tcp_poll(struct file *file, struct socket *sock,
391391
struct poll_table_struct *wait);
392392
int tcp_getsockopt(struct sock *sk, int level, int optname,
393393
char __user *optval, int __user *optlen);

include/net/udp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ int udp_ioctl(struct sock *sk, int cmd, unsigned long arg);
275275
int udp_init_sock(struct sock *sk);
276276
int __udp_disconnect(struct sock *sk, int flags);
277277
int udp_disconnect(struct sock *sk, int flags);
278-
unsigned int udp_poll(struct file *file, struct socket *sock, poll_table *wait);
278+
__poll_t udp_poll(struct file *file, struct socket *sock, poll_table *wait);
279279
struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb,
280280
netdev_features_t features,
281281
bool is_ipv6);

net/atm/common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,11 +648,11 @@ int vcc_sendmsg(struct socket *sock, struct msghdr *m, size_t size)
648648
return error;
649649
}
650650

651-
unsigned int vcc_poll(struct file *file, struct socket *sock, poll_table *wait)
651+
__poll_t vcc_poll(struct file *file, struct socket *sock, poll_table *wait)
652652
{
653653
struct sock *sk = sock->sk;
654654
struct atm_vcc *vcc;
655-
unsigned int mask;
655+
__poll_t mask;
656656

657657
sock_poll_wait(file, sk_sleep(sk), wait);
658658
mask = 0;

net/atm/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ int vcc_connect(struct socket *sock, int itf, short vpi, int vci);
1717
int vcc_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
1818
int flags);
1919
int vcc_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len);
20-
unsigned int vcc_poll(struct file *file, struct socket *sock, poll_table *wait);
20+
__poll_t vcc_poll(struct file *file, struct socket *sock, poll_table *wait);
2121
int vcc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
2222
int vcc_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
2323
int vcc_setsockopt(struct socket *sock, int level, int optname,

net/batman-adv/icmp_socket.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ static ssize_t batadv_socket_write(struct file *file, const char __user *buff,
292292
return len;
293293
}
294294

295-
static unsigned int batadv_socket_poll(struct file *file, poll_table *wait)
295+
static __poll_t batadv_socket_poll(struct file *file, poll_table *wait)
296296
{
297297
struct batadv_socket_client *socket_client = file->private_data;
298298

net/batman-adv/log.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ static ssize_t batadv_log_read(struct file *file, char __user *buf,
176176
return error;
177177
}
178178

179-
static unsigned int batadv_log_poll(struct file *file, poll_table *wait)
179+
static __poll_t batadv_log_poll(struct file *file, poll_table *wait)
180180
{
181181
struct batadv_priv *bat_priv = file->private_data;
182182
struct batadv_priv_debug_log *debug_log = bat_priv->debug_log;

net/bluetooth/af_bluetooth.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ int bt_sock_stream_recvmsg(struct socket *sock, struct msghdr *msg,
421421
}
422422
EXPORT_SYMBOL(bt_sock_stream_recvmsg);
423423

424-
static inline unsigned int bt_accept_poll(struct sock *parent)
424+
static inline __poll_t bt_accept_poll(struct sock *parent)
425425
{
426426
struct bt_sock *s, *n;
427427
struct sock *sk;
@@ -437,11 +437,11 @@ static inline unsigned int bt_accept_poll(struct sock *parent)
437437
return 0;
438438
}
439439

440-
unsigned int bt_sock_poll(struct file *file, struct socket *sock,
440+
__poll_t bt_sock_poll(struct file *file, struct socket *sock,
441441
poll_table *wait)
442442
{
443443
struct sock *sk = sock->sk;
444-
unsigned int mask = 0;
444+
__poll_t mask = 0;
445445

446446
BT_DBG("sock %p, sk %p", sock, sk);
447447

net/caif/caif_socket.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -934,11 +934,11 @@ static int caif_release(struct socket *sock)
934934
}
935935

936936
/* Copied from af_unix.c:unix_poll(), added CAIF tx_flow handling */
937-
static unsigned int caif_poll(struct file *file,
937+
static __poll_t caif_poll(struct file *file,
938938
struct socket *sock, poll_table *wait)
939939
{
940940
struct sock *sk = sock->sk;
941-
unsigned int mask;
941+
__poll_t mask;
942942
struct caifsock *cf_sk = container_of(sk, struct caifsock, sk);
943943

944944
sock_poll_wait(file, sk_sleep(sk), wait);

net/core/datagram.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -831,11 +831,11 @@ EXPORT_SYMBOL(skb_copy_and_csum_datagram_msg);
831831
* and you use a different write policy from sock_writeable()
832832
* then please supply your own write_space callback.
833833
*/
834-
unsigned int datagram_poll(struct file *file, struct socket *sock,
834+
__poll_t datagram_poll(struct file *file, struct socket *sock,
835835
poll_table *wait)
836836
{
837837
struct sock *sk = sock->sk;
838-
unsigned int mask;
838+
__poll_t mask;
839839

840840
sock_poll_wait(file, sk_sleep(sk), wait);
841841
mask = 0;

net/core/sock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2496,7 +2496,7 @@ int sock_no_getname(struct socket *sock, struct sockaddr *saddr,
24962496
}
24972497
EXPORT_SYMBOL(sock_no_getname);
24982498

2499-
unsigned int sock_no_poll(struct file *file, struct socket *sock, poll_table *pt)
2499+
__poll_t sock_no_poll(struct file *file, struct socket *sock, poll_table *pt)
25002500
{
25012501
return 0;
25022502
}

net/dccp/dccp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ int dccp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int nonblock,
316316
int flags, int *addr_len);
317317
void dccp_shutdown(struct sock *sk, int how);
318318
int inet_dccp_listen(struct socket *sock, int backlog);
319-
unsigned int dccp_poll(struct file *file, struct socket *sock,
319+
__poll_t dccp_poll(struct file *file, struct socket *sock,
320320
poll_table *wait);
321321
int dccp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len);
322322
void dccp_req_err(struct sock *sk, u64 seq);

net/dccp/proto.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,10 +313,10 @@ EXPORT_SYMBOL_GPL(dccp_disconnect);
313313
* take care of normal races (between the test and the event) and we don't
314314
* go look at any of the socket buffers directly.
315315
*/
316-
unsigned int dccp_poll(struct file *file, struct socket *sock,
316+
__poll_t dccp_poll(struct file *file, struct socket *sock,
317317
poll_table *wait)
318318
{
319-
unsigned int mask;
319+
__poll_t mask;
320320
struct sock *sk = sock->sk;
321321

322322
sock_poll_wait(file, sk_sleep(sk), wait);

net/decnet/af_decnet.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,11 +1209,11 @@ static int dn_getname(struct socket *sock, struct sockaddr *uaddr,int *uaddr_len
12091209
}
12101210

12111211

1212-
static unsigned int dn_poll(struct file *file, struct socket *sock, poll_table *wait)
1212+
static __poll_t dn_poll(struct file *file, struct socket *sock, poll_table *wait)
12131213
{
12141214
struct sock *sk = sock->sk;
12151215
struct dn_scp *scp = DN_SK(sk);
1216-
int mask = datagram_poll(file, sock, wait);
1216+
__poll_t mask = datagram_poll(file, sock, wait);
12171217

12181218
if (!skb_queue_empty(&scp->other_receive_queue))
12191219
mask |= POLLRDBAND;

net/ipv4/tcp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,9 +493,9 @@ static void tcp_tx_timestamp(struct sock *sk, u16 tsflags)
493493
* take care of normal races (between the test and the event) and we don't
494494
* go look at any of the socket buffers directly.
495495
*/
496-
unsigned int tcp_poll(struct file *file, struct socket *sock, poll_table *wait)
496+
__poll_t tcp_poll(struct file *file, struct socket *sock, poll_table *wait)
497497
{
498-
unsigned int mask;
498+
__poll_t mask;
499499
struct sock *sk = sock->sk;
500500
const struct tcp_sock *tp = tcp_sk(sk);
501501
int state;

net/ipv4/udp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2502,9 +2502,9 @@ int compat_udp_getsockopt(struct sock *sk, int level, int optname,
25022502
* but then block when reading it. Add special case code
25032503
* to work around these arguably broken applications.
25042504
*/
2505-
unsigned int udp_poll(struct file *file, struct socket *sock, poll_table *wait)
2505+
__poll_t udp_poll(struct file *file, struct socket *sock, poll_table *wait)
25062506
{
2507-
unsigned int mask = datagram_poll(file, sock, wait);
2507+
__poll_t mask = datagram_poll(file, sock, wait);
25082508
struct sock *sk = sock->sk;
25092509

25102510
if (!skb_queue_empty(&udp_sk(sk)->reader_queue))

net/iucv/af_iucv.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,7 +1474,7 @@ static int iucv_sock_recvmsg(struct socket *sock, struct msghdr *msg,
14741474
return copied;
14751475
}
14761476

1477-
static inline unsigned int iucv_accept_poll(struct sock *parent)
1477+
static inline __poll_t iucv_accept_poll(struct sock *parent)
14781478
{
14791479
struct iucv_sock *isk, *n;
14801480
struct sock *sk;
@@ -1489,11 +1489,11 @@ static inline unsigned int iucv_accept_poll(struct sock *parent)
14891489
return 0;
14901490
}
14911491

1492-
unsigned int iucv_sock_poll(struct file *file, struct socket *sock,
1492+
__poll_t iucv_sock_poll(struct file *file, struct socket *sock,
14931493
poll_table *wait)
14941494
{
14951495
struct sock *sk = sock->sk;
1496-
unsigned int mask = 0;
1496+
__poll_t mask = 0;
14971497

14981498
sock_poll_wait(file, sk_sleep(sk), wait);
14991499

net/nfc/llcp_sock.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ static int llcp_sock_getname(struct socket *sock, struct sockaddr *uaddr,
531531
return 0;
532532
}
533533

534-
static inline unsigned int llcp_accept_poll(struct sock *parent)
534+
static inline __poll_t llcp_accept_poll(struct sock *parent)
535535
{
536536
struct nfc_llcp_sock *llcp_sock, *parent_sock;
537537
struct sock *sk;
@@ -549,11 +549,11 @@ static inline unsigned int llcp_accept_poll(struct sock *parent)
549549
return 0;
550550
}
551551

552-
static unsigned int llcp_sock_poll(struct file *file, struct socket *sock,
552+
static __poll_t llcp_sock_poll(struct file *file, struct socket *sock,
553553
poll_table *wait)
554554
{
555555
struct sock *sk = sock->sk;
556-
unsigned int mask = 0;
556+
__poll_t mask = 0;
557557

558558
pr_debug("%p\n", sk);
559559

net/nfc/nci/uart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ static ssize_t nci_uart_tty_write(struct tty_struct *tty, struct file *file,
305305
return 0;
306306
}
307307

308-
static unsigned int nci_uart_tty_poll(struct tty_struct *tty,
308+
static __poll_t nci_uart_tty_poll(struct tty_struct *tty,
309309
struct file *filp, poll_table *wait)
310310
{
311311
return 0;

net/packet/af_packet.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4080,12 +4080,12 @@ static int packet_ioctl(struct socket *sock, unsigned int cmd,
40804080
return 0;
40814081
}
40824082

4083-
static unsigned int packet_poll(struct file *file, struct socket *sock,
4083+
static __poll_t packet_poll(struct file *file, struct socket *sock,
40844084
poll_table *wait)
40854085
{
40864086
struct sock *sk = sock->sk;
40874087
struct packet_sock *po = pkt_sk(sk);
4088-
unsigned int mask = datagram_poll(file, sock, wait);
4088+
__poll_t mask = datagram_poll(file, sock, wait);
40894089

40904090
spin_lock_bh(&sk->sk_receive_queue.lock);
40914091
if (po->rx_ring.pg_vec) {

net/phonet/socket.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,12 +341,12 @@ static int pn_socket_getname(struct socket *sock, struct sockaddr *addr,
341341
return 0;
342342
}
343343

344-
static unsigned int pn_socket_poll(struct file *file, struct socket *sock,
344+
static __poll_t pn_socket_poll(struct file *file, struct socket *sock,
345345
poll_table *wait)
346346
{
347347
struct sock *sk = sock->sk;
348348
struct pep_sock *pn = pep_sk(sk);
349-
unsigned int mask = 0;
349+
__poll_t mask = 0;
350350

351351
poll_wait(file, sk_sleep(sk), wait);
352352

net/rds/af_rds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,12 @@ static int rds_getname(struct socket *sock, struct sockaddr *uaddr,
152152
* to send to a congested destination, the system call may still fail (and
153153
* return ENOBUFS).
154154
*/
155-
static unsigned int rds_poll(struct file *file, struct socket *sock,
155+
static __poll_t rds_poll(struct file *file, struct socket *sock,
156156
poll_table *wait)
157157
{
158158
struct sock *sk = sock->sk;
159159
struct rds_sock *rs = rds_sk_to_rs(sk);
160-
unsigned int mask = 0;
160+
__poll_t mask = 0;
161161
unsigned long flags;
162162

163163
poll_wait(file, sk_sleep(sk), wait);

net/rfkill/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,10 +1139,10 @@ static int rfkill_fop_open(struct inode *inode, struct file *file)
11391139
return -ENOMEM;
11401140
}
11411141

1142-
static unsigned int rfkill_fop_poll(struct file *file, poll_table *wait)
1142+
static __poll_t rfkill_fop_poll(struct file *file, poll_table *wait)
11431143
{
11441144
struct rfkill_data *data = file->private_data;
1145-
unsigned int res = POLLOUT | POLLWRNORM;
1145+
__poll_t res = POLLOUT | POLLWRNORM;
11461146

11471147
poll_wait(file, &data->read_wait, wait);
11481148

0 commit comments

Comments
 (0)