diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2017-07-03 22:25:56 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-11-27 16:19:53 -0500 |
commit | e6c8adca20ba459dd88057ca74232bf9f1045075 (patch) | |
tree | 708ae6987fcd37a5a757825aeb84c74843809999 | |
parent | a3f8683bf7d5e6254fe68f5c5d3585e27eea8ed0 (diff) |
anntotate the places where ->poll() return values go
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | drivers/media/platform/soc_camera/soc_camera.c | 2 | ||||
-rw-r--r-- | drivers/media/v4l2-core/v4l2-dev.c | 2 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/serial2002.c | 2 | ||||
-rw-r--r-- | drivers/tty/tty_io.c | 2 | ||||
-rw-r--r-- | drivers/vfio/virqfd.c | 2 | ||||
-rw-r--r-- | drivers/vhost/vhost.c | 4 | ||||
-rw-r--r-- | fs/debugfs/file.c | 2 | ||||
-rw-r--r-- | fs/proc/inode.c | 2 | ||||
-rw-r--r-- | fs/select.c | 5 | ||||
-rw-r--r-- | net/smc/af_smc.c | 2 | ||||
-rw-r--r-- | net/socket.c | 2 | ||||
-rw-r--r-- | virt/kvm/eventfd.c | 2 |
12 files changed, 15 insertions, 14 deletions
diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c index 916ff68b73d4..f805f45716a3 100644 --- a/drivers/media/platform/soc_camera/soc_camera.c +++ b/drivers/media/platform/soc_camera/soc_camera.c | |||
@@ -809,7 +809,7 @@ static unsigned int soc_camera_poll(struct file *file, poll_table *pt) | |||
809 | { | 809 | { |
810 | struct soc_camera_device *icd = file->private_data; | 810 | struct soc_camera_device *icd = file->private_data; |
811 | struct soc_camera_host *ici = to_soc_camera_host(icd->parent); | 811 | struct soc_camera_host *ici = to_soc_camera_host(icd->parent); |
812 | unsigned res = POLLERR; | 812 | __poll_t res = POLLERR; |
813 | 813 | ||
814 | if (icd->streamer != file) | 814 | if (icd->streamer != file) |
815 | return POLLERR; | 815 | return POLLERR; |
diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c index c647ba648805..ef178edc634b 100644 --- a/drivers/media/v4l2-core/v4l2-dev.c +++ b/drivers/media/v4l2-core/v4l2-dev.c | |||
@@ -334,7 +334,7 @@ static ssize_t v4l2_write(struct file *filp, const char __user *buf, | |||
334 | static unsigned int v4l2_poll(struct file *filp, struct poll_table_struct *poll) | 334 | static unsigned int v4l2_poll(struct file *filp, struct poll_table_struct *poll) |
335 | { | 335 | { |
336 | struct video_device *vdev = video_devdata(filp); | 336 | struct video_device *vdev = video_devdata(filp); |
337 | unsigned int res = POLLERR | POLLHUP; | 337 | __poll_t res = POLLERR | POLLHUP; |
338 | 338 | ||
339 | if (!vdev->fops->poll) | 339 | if (!vdev->fops->poll) |
340 | return DEFAULT_POLLMASK; | 340 | return DEFAULT_POLLMASK; |
diff --git a/drivers/staging/comedi/drivers/serial2002.c b/drivers/staging/comedi/drivers/serial2002.c index cc18e25103ca..a557be8a5076 100644 --- a/drivers/staging/comedi/drivers/serial2002.c +++ b/drivers/staging/comedi/drivers/serial2002.c | |||
@@ -119,7 +119,7 @@ static void serial2002_tty_read_poll_wait(struct file *f, int timeout) | |||
119 | poll_initwait(&table); | 119 | poll_initwait(&table); |
120 | while (1) { | 120 | while (1) { |
121 | long elapsed; | 121 | long elapsed; |
122 | int mask; | 122 | __poll_t mask; |
123 | 123 | ||
124 | mask = f->f_op->poll(f, &table.pt); | 124 | mask = f->f_op->poll(f, &table.pt); |
125 | if (mask & (POLLRDNORM | POLLRDBAND | POLLIN | | 125 | if (mask & (POLLRDNORM | POLLRDBAND | POLLIN | |
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index dc60aeea87d8..287f9a4eef6d 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c | |||
@@ -2059,7 +2059,7 @@ static unsigned int tty_poll(struct file *filp, poll_table *wait) | |||
2059 | { | 2059 | { |
2060 | struct tty_struct *tty = file_tty(filp); | 2060 | struct tty_struct *tty = file_tty(filp); |
2061 | struct tty_ldisc *ld; | 2061 | struct tty_ldisc *ld; |
2062 | int ret = 0; | 2062 | __poll_t ret = 0; |
2063 | 2063 | ||
2064 | if (tty_paranoia_check(tty, file_inode(filp), "tty_poll")) | 2064 | if (tty_paranoia_check(tty, file_inode(filp), "tty_poll")) |
2065 | return 0; | 2065 | return 0; |
diff --git a/drivers/vfio/virqfd.c b/drivers/vfio/virqfd.c index 4797217e5e72..d18b10ff119e 100644 --- a/drivers/vfio/virqfd.c +++ b/drivers/vfio/virqfd.c | |||
@@ -113,7 +113,7 @@ int vfio_virqfd_enable(void *opaque, | |||
113 | struct eventfd_ctx *ctx; | 113 | struct eventfd_ctx *ctx; |
114 | struct virqfd *virqfd; | 114 | struct virqfd *virqfd; |
115 | int ret = 0; | 115 | int ret = 0; |
116 | unsigned int events; | 116 | __poll_t events; |
117 | 117 | ||
118 | virqfd = kzalloc(sizeof(*virqfd), GFP_KERNEL); | 118 | virqfd = kzalloc(sizeof(*virqfd), GFP_KERNEL); |
119 | if (!virqfd) | 119 | if (!virqfd) |
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 33ac2b186b85..c18e70bd0466 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c | |||
@@ -203,7 +203,7 @@ EXPORT_SYMBOL_GPL(vhost_poll_init); | |||
203 | * keep a reference to a file until after vhost_poll_stop is called. */ | 203 | * keep a reference to a file until after vhost_poll_stop is called. */ |
204 | int vhost_poll_start(struct vhost_poll *poll, struct file *file) | 204 | int vhost_poll_start(struct vhost_poll *poll, struct file *file) |
205 | { | 205 | { |
206 | unsigned long mask; | 206 | __poll_t mask; |
207 | int ret = 0; | 207 | int ret = 0; |
208 | 208 | ||
209 | if (poll->wqh) | 209 | if (poll->wqh) |
@@ -211,7 +211,7 @@ int vhost_poll_start(struct vhost_poll *poll, struct file *file) | |||
211 | 211 | ||
212 | mask = file->f_op->poll(file, &poll->table); | 212 | mask = file->f_op->poll(file, &poll->table); |
213 | if (mask) | 213 | if (mask) |
214 | vhost_poll_wakeup(&poll->wait, 0, 0, (void *)mask); | 214 | vhost_poll_wakeup(&poll->wait, 0, 0, (void *)(uintptr_t)mask); |
215 | if (mask & POLLERR) { | 215 | if (mask & POLLERR) { |
216 | if (poll->wqh) | 216 | if (poll->wqh) |
217 | remove_wait_queue(poll->wqh, &poll->wait); | 217 | remove_wait_queue(poll->wqh, &poll->wait); |
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c index cd12e6576b48..2571404a072b 100644 --- a/fs/debugfs/file.c +++ b/fs/debugfs/file.c | |||
@@ -210,7 +210,7 @@ static unsigned int full_proxy_poll(struct file *filp, | |||
210 | struct poll_table_struct *wait) | 210 | struct poll_table_struct *wait) |
211 | { | 211 | { |
212 | struct dentry *dentry = F_DENTRY(filp); | 212 | struct dentry *dentry = F_DENTRY(filp); |
213 | unsigned int r = 0; | 213 | __poll_t r = 0; |
214 | const struct file_operations *real_fops; | 214 | const struct file_operations *real_fops; |
215 | 215 | ||
216 | if (debugfs_file_get(dentry)) | 216 | if (debugfs_file_get(dentry)) |
diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 44e37f38493b..149fd4d75db6 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c | |||
@@ -237,7 +237,7 @@ static ssize_t proc_reg_write(struct file *file, const char __user *buf, size_t | |||
237 | static unsigned int proc_reg_poll(struct file *file, struct poll_table_struct *pts) | 237 | static unsigned int proc_reg_poll(struct file *file, struct poll_table_struct *pts) |
238 | { | 238 | { |
239 | struct proc_dir_entry *pde = PDE(file_inode(file)); | 239 | struct proc_dir_entry *pde = PDE(file_inode(file)); |
240 | unsigned int rv = DEFAULT_POLLMASK; | 240 | __poll_t rv = DEFAULT_POLLMASK; |
241 | __poll_t (*poll)(struct file *, struct poll_table_struct *); | 241 | __poll_t (*poll)(struct file *, struct poll_table_struct *); |
242 | if (use_pde(pde)) { | 242 | if (use_pde(pde)) { |
243 | poll = pde->proc_fops->poll; | 243 | poll = pde->proc_fops->poll; |
diff --git a/fs/select.c b/fs/select.c index 6de493bb42a4..b2bf84be5056 100644 --- a/fs/select.c +++ b/fs/select.c | |||
@@ -484,8 +484,9 @@ static int do_select(int n, fd_set_bits *fds, struct timespec64 *end_time) | |||
484 | rinp = fds->res_in; routp = fds->res_out; rexp = fds->res_ex; | 484 | rinp = fds->res_in; routp = fds->res_out; rexp = fds->res_ex; |
485 | 485 | ||
486 | for (i = 0; i < n; ++rinp, ++routp, ++rexp) { | 486 | for (i = 0; i < n; ++rinp, ++routp, ++rexp) { |
487 | unsigned long in, out, ex, all_bits, bit = 1, mask, j; | 487 | unsigned long in, out, ex, all_bits, bit = 1, j; |
488 | unsigned long res_in = 0, res_out = 0, res_ex = 0; | 488 | unsigned long res_in = 0, res_out = 0, res_ex = 0; |
489 | __poll_t mask; | ||
489 | 490 | ||
490 | in = *inp++; out = *outp++; ex = *exp++; | 491 | in = *inp++; out = *outp++; ex = *exp++; |
491 | all_bits = in | out | ex; | 492 | all_bits = in | out | ex; |
@@ -806,7 +807,7 @@ static inline unsigned int do_pollfd(struct pollfd *pollfd, poll_table *pwait, | |||
806 | bool *can_busy_poll, | 807 | bool *can_busy_poll, |
807 | unsigned int busy_flag) | 808 | unsigned int busy_flag) |
808 | { | 809 | { |
809 | unsigned int mask; | 810 | __poll_t mask; |
810 | int fd; | 811 | int fd; |
811 | 812 | ||
812 | mask = 0; | 813 | mask = 0; |
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c index 6451c5013e06..ae59826230be 100644 --- a/net/smc/af_smc.c +++ b/net/smc/af_smc.c | |||
@@ -1130,7 +1130,7 @@ static unsigned int smc_poll(struct file *file, struct socket *sock, | |||
1130 | poll_table *wait) | 1130 | poll_table *wait) |
1131 | { | 1131 | { |
1132 | struct sock *sk = sock->sk; | 1132 | struct sock *sk = sock->sk; |
1133 | unsigned int mask = 0; | 1133 | __poll_t mask = 0; |
1134 | struct smc_sock *smc; | 1134 | struct smc_sock *smc; |
1135 | int rc; | 1135 | int rc; |
1136 | 1136 | ||
diff --git a/net/socket.c b/net/socket.c index 42d8e9c9ccd5..dceab22a41fd 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -1093,7 +1093,7 @@ EXPORT_SYMBOL(sock_create_lite); | |||
1093 | /* No kernel lock held - perfect */ | 1093 | /* No kernel lock held - perfect */ |
1094 | static unsigned int sock_poll(struct file *file, poll_table *wait) | 1094 | static unsigned int sock_poll(struct file *file, poll_table *wait) |
1095 | { | 1095 | { |
1096 | unsigned int busy_flag = 0; | 1096 | __poll_t busy_flag = 0; |
1097 | struct socket *sock; | 1097 | struct socket *sock; |
1098 | 1098 | ||
1099 | /* | 1099 | /* |
diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c index f2ac53ab8243..a1f68ed999d8 100644 --- a/virt/kvm/eventfd.c +++ b/virt/kvm/eventfd.c | |||
@@ -287,7 +287,7 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args) | |||
287 | struct fd f; | 287 | struct fd f; |
288 | struct eventfd_ctx *eventfd = NULL, *resamplefd = NULL; | 288 | struct eventfd_ctx *eventfd = NULL, *resamplefd = NULL; |
289 | int ret; | 289 | int ret; |
290 | unsigned int events; | 290 | __poll_t events; |
291 | int idx; | 291 | int idx; |
292 | 292 | ||
293 | if (!kvm_arch_intc_initialized(kvm)) | 293 | if (!kvm_arch_intc_initialized(kvm)) |