From a3f8683bf7d5e6254fe68f5c5d3585e27eea8ed0 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 2 Jul 2017 22:22:01 -0400 Subject: ->poll() methods should return __poll_t The most common place to find POLL... bitmaps: return values of ->poll() and its subsystem counterparts. Signed-off-by: Al Viro --- fs/proc/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/proc') diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 225f541f7078..44e37f38493b 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c @@ -238,7 +238,7 @@ static unsigned int proc_reg_poll(struct file *file, struct poll_table_struct *p { struct proc_dir_entry *pde = PDE(file_inode(file)); unsigned int rv = DEFAULT_POLLMASK; - unsigned int (*poll)(struct file *, struct poll_table_struct *); + __poll_t (*poll)(struct file *, struct poll_table_struct *); if (use_pde(pde)) { poll = pde->proc_fops->poll; if (poll) -- cgit v1.2.3 From e6c8adca20ba459dd88057ca74232bf9f1045075 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Mon, 3 Jul 2017 22:25:56 -0400 Subject: anntotate the places where ->poll() return values go Signed-off-by: Al Viro --- drivers/media/platform/soc_camera/soc_camera.c | 2 +- drivers/media/v4l2-core/v4l2-dev.c | 2 +- drivers/staging/comedi/drivers/serial2002.c | 2 +- drivers/tty/tty_io.c | 2 +- drivers/vfio/virqfd.c | 2 +- drivers/vhost/vhost.c | 4 ++-- fs/debugfs/file.c | 2 +- fs/proc/inode.c | 2 +- fs/select.c | 5 +++-- net/smc/af_smc.c | 2 +- net/socket.c | 2 +- virt/kvm/eventfd.c | 2 +- 12 files changed, 15 insertions(+), 14 deletions(-) (limited to 'fs/proc') 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) { struct soc_camera_device *icd = file->private_data; struct soc_camera_host *ici = to_soc_camera_host(icd->parent); - unsigned res = POLLERR; + __poll_t res = POLLERR; if (icd->streamer != file) 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, static unsigned int v4l2_poll(struct file *filp, struct poll_table_struct *poll) { struct video_device *vdev = video_devdata(filp); - unsigned int res = POLLERR | POLLHUP; + __poll_t res = POLLERR | POLLHUP; if (!vdev->fops->poll) 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) poll_initwait(&table); while (1) { long elapsed; - int mask; + __poll_t mask; mask = f->f_op->poll(f, &table.pt); 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) { struct tty_struct *tty = file_tty(filp); struct tty_ldisc *ld; - int ret = 0; + __poll_t ret = 0; if (tty_paranoia_check(tty, file_inode(filp), "tty_poll")) 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, struct eventfd_ctx *ctx; struct virqfd *virqfd; int ret = 0; - unsigned int events; + __poll_t events; virqfd = kzalloc(sizeof(*virqfd), GFP_KERNEL); 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); * keep a reference to a file until after vhost_poll_stop is called. */ int vhost_poll_start(struct vhost_poll *poll, struct file *file) { - unsigned long mask; + __poll_t mask; int ret = 0; if (poll->wqh) @@ -211,7 +211,7 @@ int vhost_poll_start(struct vhost_poll *poll, struct file *file) mask = file->f_op->poll(file, &poll->table); if (mask) - vhost_poll_wakeup(&poll->wait, 0, 0, (void *)mask); + vhost_poll_wakeup(&poll->wait, 0, 0, (void *)(uintptr_t)mask); if (mask & POLLERR) { if (poll->wqh) 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, struct poll_table_struct *wait) { struct dentry *dentry = F_DENTRY(filp); - unsigned int r = 0; + __poll_t r = 0; const struct file_operations *real_fops; 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 static unsigned int proc_reg_poll(struct file *file, struct poll_table_struct *pts) { struct proc_dir_entry *pde = PDE(file_inode(file)); - unsigned int rv = DEFAULT_POLLMASK; + __poll_t rv = DEFAULT_POLLMASK; __poll_t (*poll)(struct file *, struct poll_table_struct *); if (use_pde(pde)) { 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) rinp = fds->res_in; routp = fds->res_out; rexp = fds->res_ex; for (i = 0; i < n; ++rinp, ++routp, ++rexp) { - unsigned long in, out, ex, all_bits, bit = 1, mask, j; + unsigned long in, out, ex, all_bits, bit = 1, j; unsigned long res_in = 0, res_out = 0, res_ex = 0; + __poll_t mask; in = *inp++; out = *outp++; ex = *exp++; all_bits = in | out | ex; @@ -806,7 +807,7 @@ static inline unsigned int do_pollfd(struct pollfd *pollfd, poll_table *pwait, bool *can_busy_poll, unsigned int busy_flag) { - unsigned int mask; + __poll_t mask; int fd; 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, poll_table *wait) { struct sock *sk = sock->sk; - unsigned int mask = 0; + __poll_t mask = 0; struct smc_sock *smc; int rc; 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); /* No kernel lock held - perfect */ static unsigned int sock_poll(struct file *file, poll_table *wait) { - unsigned int busy_flag = 0; + __poll_t busy_flag = 0; struct socket *sock; /* 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) struct fd f; struct eventfd_ctx *eventfd = NULL, *resamplefd = NULL; int ret; - unsigned int events; + __poll_t events; int idx; if (!kvm_arch_intc_initialized(kvm)) -- cgit v1.2.3 From 076ccb76e1a6cf0aa5371132efdd502a11e806f1 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Mon, 3 Jul 2017 01:02:18 -0400 Subject: fs: annotate ->poll() instances Signed-off-by: Al Viro --- fs/cachefiles/daemon.c | 6 +++--- fs/coda/psdev.c | 4 ++-- fs/debugfs/file.c | 2 +- fs/dlm/plock.c | 4 ++-- fs/dlm/user.c | 2 +- fs/ecryptfs/miscdev.c | 4 ++-- fs/eventfd.c | 4 ++-- fs/eventpoll.c | 2 +- fs/fuse/dev.c | 4 ++-- fs/fuse/file.c | 2 +- fs/fuse/fuse_i.h | 2 +- fs/kernfs/file.c | 2 +- fs/notify/fanotify/fanotify_user.c | 4 ++-- fs/notify/inotify/inotify_user.c | 4 ++-- fs/ocfs2/dlmfs/dlmfs.c | 4 ++-- fs/orangefs/devorangefs-req.c | 4 ++-- fs/pipe.c | 4 ++-- fs/proc/inode.c | 2 +- fs/proc/kmsg.c | 2 +- fs/proc/proc_sysctl.c | 4 ++-- fs/proc_namespace.c | 4 ++-- fs/signalfd.c | 4 ++-- fs/timerfd.c | 4 ++-- fs/userfaultfd.c | 4 ++-- 24 files changed, 41 insertions(+), 41 deletions(-) (limited to 'fs/proc') diff --git a/fs/cachefiles/daemon.c b/fs/cachefiles/daemon.c index 1ee54ffd3a24..7edbd0679952 100644 --- a/fs/cachefiles/daemon.c +++ b/fs/cachefiles/daemon.c @@ -31,7 +31,7 @@ static ssize_t cachefiles_daemon_read(struct file *, char __user *, size_t, loff_t *); static ssize_t cachefiles_daemon_write(struct file *, const char __user *, size_t, loff_t *); -static unsigned int cachefiles_daemon_poll(struct file *, +static __poll_t cachefiles_daemon_poll(struct file *, struct poll_table_struct *); static int cachefiles_daemon_frun(struct cachefiles_cache *, char *); static int cachefiles_daemon_fcull(struct cachefiles_cache *, char *); @@ -291,11 +291,11 @@ found_command: * poll for culling state * - use POLLOUT to indicate culling state */ -static unsigned int cachefiles_daemon_poll(struct file *file, +static __poll_t cachefiles_daemon_poll(struct file *file, struct poll_table_struct *poll) { struct cachefiles_cache *cache = file->private_data; - unsigned int mask; + __poll_t mask; poll_wait(file, &cache->daemon_pollwq, poll); mask = 0; diff --git a/fs/coda/psdev.c b/fs/coda/psdev.c index f40e3953e7fe..49d3c6fda89a 100644 --- a/fs/coda/psdev.c +++ b/fs/coda/psdev.c @@ -61,10 +61,10 @@ static struct class *coda_psdev_class; * Device operations */ -static unsigned int coda_psdev_poll(struct file *file, poll_table * wait) +static __poll_t coda_psdev_poll(struct file *file, poll_table * wait) { struct venus_comm *vcp = (struct venus_comm *) file->private_data; - unsigned int mask = POLLOUT | POLLWRNORM; + __poll_t mask = POLLOUT | POLLWRNORM; poll_wait(file, &vcp->vc_waitq, wait); mutex_lock(&vcp->vc_mutex); diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c index 2571404a072b..6fdbf21be318 100644 --- a/fs/debugfs/file.c +++ b/fs/debugfs/file.c @@ -206,7 +206,7 @@ FULL_PROXY_FUNC(unlocked_ioctl, long, filp, PROTO(struct file *filp, unsigned int cmd, unsigned long arg), ARGS(filp, cmd, arg)); -static unsigned int full_proxy_poll(struct file *filp, +static __poll_t full_proxy_poll(struct file *filp, struct poll_table_struct *wait) { struct dentry *dentry = F_DENTRY(filp); diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c index e631b1689228..a4c63e9e6385 100644 --- a/fs/dlm/plock.c +++ b/fs/dlm/plock.c @@ -463,9 +463,9 @@ static ssize_t dev_write(struct file *file, const char __user *u, size_t count, return count; } -static unsigned int dev_poll(struct file *file, poll_table *wait) +static __poll_t dev_poll(struct file *file, poll_table *wait) { - unsigned int mask = 0; + __poll_t mask = 0; poll_wait(file, &send_wq, wait); diff --git a/fs/dlm/user.c b/fs/dlm/user.c index d18e7a539f11..662432af8ce8 100644 --- a/fs/dlm/user.c +++ b/fs/dlm/user.c @@ -887,7 +887,7 @@ static ssize_t device_read(struct file *file, char __user *buf, size_t count, return rv; } -static unsigned int device_poll(struct file *file, poll_table *wait) +static __poll_t device_poll(struct file *file, poll_table *wait) { struct dlm_user_proc *proc = file->private_data; diff --git a/fs/ecryptfs/miscdev.c b/fs/ecryptfs/miscdev.c index f09cacaf8c80..7423e792a092 100644 --- a/fs/ecryptfs/miscdev.c +++ b/fs/ecryptfs/miscdev.c @@ -38,11 +38,11 @@ static atomic_t ecryptfs_num_miscdev_opens; * * Returns the poll mask */ -static unsigned int +static __poll_t ecryptfs_miscdev_poll(struct file *file, poll_table *pt) { struct ecryptfs_daemon *daemon = file->private_data; - unsigned int mask = 0; + __poll_t mask = 0; mutex_lock(&daemon->mux); if (daemon->flags & ECRYPTFS_DAEMON_ZOMBIE) { diff --git a/fs/eventfd.c b/fs/eventfd.c index 2fb4eadaa118..6318a9b57e53 100644 --- a/fs/eventfd.c +++ b/fs/eventfd.c @@ -114,10 +114,10 @@ static int eventfd_release(struct inode *inode, struct file *file) return 0; } -static unsigned int eventfd_poll(struct file *file, poll_table *wait) +static __poll_t eventfd_poll(struct file *file, poll_table *wait) { struct eventfd_ctx *ctx = file->private_data; - unsigned int events = 0; + __poll_t events = 0; u64 count; poll_wait(file, &ctx->wqh, wait); diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 21e6fee00e8b..67fb3b850c99 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -920,7 +920,7 @@ static int ep_read_events_proc(struct eventpoll *ep, struct list_head *head, return 0; } -static unsigned int ep_eventpoll_poll(struct file *file, poll_table *wait) +static __poll_t ep_eventpoll_poll(struct file *file, poll_table *wait) { struct eventpoll *ep = file->private_data; int depth = 0; diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 17f0d05bfd4c..aa089a6925d0 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -2004,9 +2004,9 @@ out: return ret; } -static unsigned fuse_dev_poll(struct file *file, poll_table *wait) +static __poll_t fuse_dev_poll(struct file *file, poll_table *wait) { - unsigned mask = POLLOUT | POLLWRNORM; + __poll_t mask = POLLOUT | POLLWRNORM; struct fuse_iqueue *fiq; struct fuse_dev *fud = fuse_get_dev(file); diff --git a/fs/fuse/file.c b/fs/fuse/file.c index cb7dff5c45d7..fa4ca6bd2c96 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -2751,7 +2751,7 @@ static void fuse_register_polled_file(struct fuse_conn *fc, spin_unlock(&fc->lock); } -unsigned fuse_file_poll(struct file *file, poll_table *wait) +__poll_t fuse_file_poll(struct file *file, poll_table *wait) { struct fuse_file *ff = file->private_data; struct fuse_conn *fc = ff->fc; diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index d5773ca67ad2..c4c093bbf456 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h @@ -951,7 +951,7 @@ long fuse_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg, unsigned int flags); long fuse_ioctl_common(struct file *file, unsigned int cmd, unsigned long arg, unsigned int flags); -unsigned fuse_file_poll(struct file *file, poll_table *wait); +__poll_t fuse_file_poll(struct file *file, poll_table *wait); int fuse_dev_release(struct inode *inode, struct file *file); bool fuse_write_update_size(struct inode *inode, loff_t pos); diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c index 9698e51656b1..c53d9cc5ae7a 100644 --- a/fs/kernfs/file.c +++ b/fs/kernfs/file.c @@ -832,7 +832,7 @@ void kernfs_drain_open_files(struct kernfs_node *kn) * to see if it supports poll (Neither 'poll' nor 'select' return * an appropriate error code). When in doubt, set a suitable timeout value. */ -static unsigned int kernfs_fop_poll(struct file *filp, poll_table *wait) +static __poll_t kernfs_fop_poll(struct file *filp, poll_table *wait) { struct kernfs_open_file *of = kernfs_of(filp); struct kernfs_node *kn = kernfs_dentry_node(filp->f_path.dentry); diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c index d0d4bc4c4b70..ef08d64c84b8 100644 --- a/fs/notify/fanotify/fanotify_user.c +++ b/fs/notify/fanotify/fanotify_user.c @@ -239,10 +239,10 @@ out_close_fd: } /* intofiy userspace file descriptor functions */ -static unsigned int fanotify_poll(struct file *file, poll_table *wait) +static __poll_t fanotify_poll(struct file *file, poll_table *wait) { struct fsnotify_group *group = file->private_data; - int ret = 0; + __poll_t ret = 0; poll_wait(file, &group->notification_waitq, wait); spin_lock(&group->notification_lock); diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index d3c20e0bb046..5c29bf16814f 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c @@ -107,10 +107,10 @@ static inline u32 inotify_mask_to_arg(__u32 mask) } /* intofiy userspace file descriptor functions */ -static unsigned int inotify_poll(struct file *file, poll_table *wait) +static __poll_t inotify_poll(struct file *file, poll_table *wait) { struct fsnotify_group *group = file->private_data; - int ret = 0; + __poll_t ret = 0; poll_wait(file, &group->notification_waitq, wait); spin_lock(&group->notification_lock); diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c index 9c7c18c0e129..385fcefa8bc5 100644 --- a/fs/ocfs2/dlmfs/dlmfs.c +++ b/fs/ocfs2/dlmfs/dlmfs.c @@ -220,9 +220,9 @@ static int dlmfs_file_setattr(struct dentry *dentry, struct iattr *attr) return 0; } -static unsigned int dlmfs_file_poll(struct file *file, poll_table *wait) +static __poll_t dlmfs_file_poll(struct file *file, poll_table *wait) { - int event = 0; + __poll_t event = 0; struct inode *inode = file_inode(file); struct dlmfs_inode_private *ip = DLMFS_I(inode); diff --git a/fs/orangefs/devorangefs-req.c b/fs/orangefs/devorangefs-req.c index a324dc584bf7..109fffd6d153 100644 --- a/fs/orangefs/devorangefs-req.c +++ b/fs/orangefs/devorangefs-req.c @@ -814,10 +814,10 @@ void orangefs_dev_cleanup(void) ORANGEFS_REQDEVICE_NAME); } -static unsigned int orangefs_devreq_poll(struct file *file, +static __poll_t orangefs_devreq_poll(struct file *file, struct poll_table_struct *poll_table) { - int poll_revent_mask = 0; + __poll_t poll_revent_mask = 0; poll_wait(file, &orangefs_request_list_waitq, poll_table); diff --git a/fs/pipe.c b/fs/pipe.c index 6d98566201ef..a449ca0ec0c6 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -515,10 +515,10 @@ static long pipe_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) } /* No kernel lock held - fine */ -static unsigned int +static __poll_t pipe_poll(struct file *filp, poll_table *wait) { - unsigned int mask; + __poll_t mask; struct pipe_inode_info *pipe = filp->private_data; int nrbufs; diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 149fd4d75db6..5e6f160d96a2 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c @@ -234,7 +234,7 @@ static ssize_t proc_reg_write(struct file *file, const char __user *buf, size_t return rv; } -static unsigned int proc_reg_poll(struct file *file, struct poll_table_struct *pts) +static __poll_t proc_reg_poll(struct file *file, struct poll_table_struct *pts) { struct proc_dir_entry *pde = PDE(file_inode(file)); __poll_t rv = DEFAULT_POLLMASK; diff --git a/fs/proc/kmsg.c b/fs/proc/kmsg.c index e0f8774acd65..f0bfb45c3f9f 100644 --- a/fs/proc/kmsg.c +++ b/fs/proc/kmsg.c @@ -40,7 +40,7 @@ static ssize_t kmsg_read(struct file *file, char __user *buf, return do_syslog(SYSLOG_ACTION_READ, buf, count, SYSLOG_FROM_PROC); } -static unsigned int kmsg_poll(struct file *file, poll_table *wait) +static __poll_t kmsg_poll(struct file *file, poll_table *wait) { poll_wait(file, &log_wait, wait); if (do_syslog(SYSLOG_ACTION_SIZE_UNREAD, NULL, 0, SYSLOG_FROM_PROC)) diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index c5cbbdff3c3d..63325377621a 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -630,12 +630,12 @@ static int proc_sys_open(struct inode *inode, struct file *filp) return 0; } -static unsigned int proc_sys_poll(struct file *filp, poll_table *wait) +static __poll_t proc_sys_poll(struct file *filp, poll_table *wait) { struct inode *inode = file_inode(filp); struct ctl_table_header *head = grab_header(inode); struct ctl_table *table = PROC_I(inode)->sysctl_entry; - unsigned int ret = DEFAULT_POLLMASK; + __poll_t ret = DEFAULT_POLLMASK; unsigned long event; /* sysctl was unregistered */ diff --git a/fs/proc_namespace.c b/fs/proc_namespace.c index 7b635d173213..7a3d0ff9b7a8 100644 --- a/fs/proc_namespace.c +++ b/fs/proc_namespace.c @@ -18,12 +18,12 @@ #include "pnode.h" #include "internal.h" -static unsigned mounts_poll(struct file *file, poll_table *wait) +static __poll_t mounts_poll(struct file *file, poll_table *wait) { struct seq_file *m = file->private_data; struct proc_mounts *p = m->private; struct mnt_namespace *ns = p->ns; - unsigned res = POLLIN | POLLRDNORM; + __poll_t res = POLLIN | POLLRDNORM; int event; poll_wait(file, &p->ns->poll, wait); diff --git a/fs/signalfd.c b/fs/signalfd.c index 5f1ff8756595..31e923bec99a 100644 --- a/fs/signalfd.c +++ b/fs/signalfd.c @@ -58,10 +58,10 @@ static int signalfd_release(struct inode *inode, struct file *file) return 0; } -static unsigned int signalfd_poll(struct file *file, poll_table *wait) +static __poll_t signalfd_poll(struct file *file, poll_table *wait) { struct signalfd_ctx *ctx = file->private_data; - unsigned int events = 0; + __poll_t events = 0; poll_wait(file, ¤t->sighand->signalfd_wqh, wait); diff --git a/fs/timerfd.c b/fs/timerfd.c index 040612ec9598..0510717f3a53 100644 --- a/fs/timerfd.c +++ b/fs/timerfd.c @@ -227,10 +227,10 @@ static int timerfd_release(struct inode *inode, struct file *file) return 0; } -static unsigned int timerfd_poll(struct file *file, poll_table *wait) +static __poll_t timerfd_poll(struct file *file, poll_table *wait) { struct timerfd_ctx *ctx = file->private_data; - unsigned int events = 0; + __poll_t events = 0; unsigned long flags; poll_wait(file, &ctx->wqh, wait); diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c index ac9a4e65ca49..c0a5d9c47c6d 100644 --- a/fs/userfaultfd.c +++ b/fs/userfaultfd.c @@ -921,10 +921,10 @@ static inline struct userfaultfd_wait_queue *find_userfault_evt( return find_userfault_in(&ctx->event_wqh); } -static unsigned int userfaultfd_poll(struct file *file, poll_table *wait) +static __poll_t userfaultfd_poll(struct file *file, poll_table *wait) { struct userfaultfd_ctx *ctx = file->private_data; - unsigned int ret; + __poll_t ret; poll_wait(file, &ctx->fd_wqh, wait); -- cgit v1.2.3