diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/dma-buf.h | 2 | ||||
-rw-r--r-- | include/linux/fs.h | 2 | ||||
-rw-r--r-- | include/linux/net.h | 2 | ||||
-rw-r--r-- | include/linux/poll.h | 10 | ||||
-rw-r--r-- | include/linux/posix-clock.h | 2 | ||||
-rw-r--r-- | include/linux/ring_buffer.h | 2 | ||||
-rw-r--r-- | include/linux/rpmsg.h | 4 | ||||
-rw-r--r-- | include/linux/scif.h | 4 | ||||
-rw-r--r-- | include/linux/skbuff.h | 2 | ||||
-rw-r--r-- | include/linux/tty_ldisc.h | 2 | ||||
-rw-r--r-- | include/linux/wait.h | 10 |
11 files changed, 22 insertions, 20 deletions
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index 79f27d60ec66..085db2fee2d7 100644 --- a/include/linux/dma-buf.h +++ b/include/linux/dma-buf.h @@ -301,7 +301,7 @@ struct dma_buf { struct dma_fence_cb cb; wait_queue_head_t *poll; - unsigned long active; + __poll_t active; } cb_excl, cb_shared; }; diff --git a/include/linux/fs.h b/include/linux/fs.h index 6804d075933e..569c51d37312 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1698,7 +1698,7 @@ struct file_operations { ssize_t (*write_iter) (struct kiocb *, struct iov_iter *); int (*iterate) (struct file *, struct dir_context *); int (*iterate_shared) (struct file *, struct dir_context *); - unsigned int (*poll) (struct file *, struct poll_table_struct *); + __poll_t (*poll) (struct file *, struct poll_table_struct *); long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); long (*compat_ioctl) (struct file *, unsigned int, unsigned long); int (*mmap) (struct file *, struct vm_area_struct *); diff --git a/include/linux/net.h b/include/linux/net.h index caeb159abda5..c2d468cb9821 100644 --- a/include/linux/net.h +++ b/include/linux/net.h @@ -147,7 +147,7 @@ struct proto_ops { int (*getname) (struct socket *sock, struct sockaddr *addr, int *sockaddr_len, int peer); - unsigned int (*poll) (struct file *file, struct socket *sock, + __poll_t (*poll) (struct file *file, struct socket *sock, struct poll_table_struct *wait); int (*ioctl) (struct socket *sock, unsigned int cmd, unsigned long arg); diff --git a/include/linux/poll.h b/include/linux/poll.h index d384f12abdd5..04781a753326 100644 --- a/include/linux/poll.h +++ b/include/linux/poll.h @@ -37,7 +37,7 @@ typedef void (*poll_queue_proc)(struct file *, wait_queue_head_t *, struct poll_ */ typedef struct poll_table_struct { poll_queue_proc _qproc; - unsigned long _key; + __poll_t _key; } poll_table; static inline void poll_wait(struct file * filp, wait_queue_head_t * wait_address, poll_table *p) @@ -62,20 +62,20 @@ static inline bool poll_does_not_wait(const poll_table *p) * to be started implicitly on poll(). You typically only want to do that * if the application is actually polling for POLLIN and/or POLLOUT. */ -static inline unsigned long poll_requested_events(const poll_table *p) +static inline __poll_t poll_requested_events(const poll_table *p) { - return p ? p->_key : ~0UL; + return p ? p->_key : ~(__poll_t)0; } static inline void init_poll_funcptr(poll_table *pt, poll_queue_proc qproc) { pt->_qproc = qproc; - pt->_key = ~0UL; /* all events enabled */ + pt->_key = ~(__poll_t)0; /* all events enabled */ } struct poll_table_entry { struct file *filp; - unsigned long key; + __poll_t key; wait_queue_entry_t wait; wait_queue_head_t *wait_address; }; diff --git a/include/linux/posix-clock.h b/include/linux/posix-clock.h index 38d8225510f1..3a3bc71017d5 100644 --- a/include/linux/posix-clock.h +++ b/include/linux/posix-clock.h @@ -68,7 +68,7 @@ struct posix_clock_operations { int (*open) (struct posix_clock *pc, fmode_t f_mode); - uint (*poll) (struct posix_clock *pc, + __poll_t (*poll) (struct posix_clock *pc, struct file *file, poll_table *wait); int (*release) (struct posix_clock *pc); diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h index 289e4d54e3e0..7d9eb39fa76a 100644 --- a/include/linux/ring_buffer.h +++ b/include/linux/ring_buffer.h @@ -96,7 +96,7 @@ __ring_buffer_alloc(unsigned long size, unsigned flags, struct lock_class_key *k }) int ring_buffer_wait(struct ring_buffer *buffer, int cpu, bool full); -int ring_buffer_poll_wait(struct ring_buffer *buffer, int cpu, +__poll_t ring_buffer_poll_wait(struct ring_buffer *buffer, int cpu, struct file *filp, poll_table *poll_table); diff --git a/include/linux/rpmsg.h b/include/linux/rpmsg.h index 10d6ae8bbb7d..ca07366c4c33 100644 --- a/include/linux/rpmsg.h +++ b/include/linux/rpmsg.h @@ -157,7 +157,7 @@ int rpmsg_trysendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst); int rpmsg_trysend_offchannel(struct rpmsg_endpoint *ept, u32 src, u32 dst, void *data, int len); -unsigned int rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp, +__poll_t rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp, poll_table *wait); #else @@ -258,7 +258,7 @@ static inline int rpmsg_trysend_offchannel(struct rpmsg_endpoint *ept, u32 src, return -ENXIO; } -static inline unsigned int rpmsg_poll(struct rpmsg_endpoint *ept, +static inline __poll_t rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp, poll_table *wait) { /* This shouldn't be possible */ diff --git a/include/linux/scif.h b/include/linux/scif.h index 49a35d6edc94..7046111b8d0a 100644 --- a/include/linux/scif.h +++ b/include/linux/scif.h @@ -123,8 +123,8 @@ struct scif_range { */ struct scif_pollepd { scif_epd_t epd; - short events; - short revents; + __poll_t events; + __poll_t revents; }; /** diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index a38c80e9f91e..a87e43d16f44 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -3241,7 +3241,7 @@ struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned flags, int *peeked, int *off, int *err); struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock, int *err); -unsigned int datagram_poll(struct file *file, struct socket *sock, +__poll_t datagram_poll(struct file *file, struct socket *sock, struct poll_table_struct *wait); int skb_copy_datagram_iter(const struct sk_buff *from, int offset, struct iov_iter *to, int size); diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h index 3bc5144b1c7e..1ef64d4ad887 100644 --- a/include/linux/tty_ldisc.h +++ b/include/linux/tty_ldisc.h @@ -187,7 +187,7 @@ struct tty_ldisc_ops { long (*compat_ioctl)(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg); void (*set_termios)(struct tty_struct *tty, struct ktermios *old); - unsigned int (*poll)(struct tty_struct *, struct file *, + __poll_t (*poll)(struct tty_struct *, struct file *, struct poll_table_struct *); int (*hangup)(struct tty_struct *tty); diff --git a/include/linux/wait.h b/include/linux/wait.h index 158715445ffb..55a611486bac 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -206,14 +206,16 @@ void __wake_up_sync(struct wait_queue_head *wq_head, unsigned int mode, int nr); /* * Wakeup macros to be used to report events to the targets. */ +#define poll_to_key(m) ((void *)(__force uintptr_t)(__poll_t)(m)) +#define key_to_poll(m) ((__force __poll_t)(uintptr_t)(void *)(m)) #define wake_up_poll(x, m) \ - __wake_up(x, TASK_NORMAL, 1, (void *) (m)) + __wake_up(x, TASK_NORMAL, 1, poll_to_key(m)) #define wake_up_locked_poll(x, m) \ - __wake_up_locked_key((x), TASK_NORMAL, (void *) (m)) + __wake_up_locked_key((x), TASK_NORMAL, poll_to_key(m)) #define wake_up_interruptible_poll(x, m) \ - __wake_up(x, TASK_INTERRUPTIBLE, 1, (void *) (m)) + __wake_up(x, TASK_INTERRUPTIBLE, 1, poll_to_key(m)) #define wake_up_interruptible_sync_poll(x, m) \ - __wake_up_sync_key((x), TASK_INTERRUPTIBLE, 1, (void *) (m)) + __wake_up_sync_key((x), TASK_INTERRUPTIBLE, 1, poll_to_key(m)) #define ___wait_cond_timeout(condition) \ ({ \ |