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/tty/tty_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/tty') 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; -- cgit From afc9a42b7464f76e1388cad87d8543c69f6f74ed Mon Sep 17 00:00:00 2001 From: Al Viro Date: Mon, 3 Jul 2017 06:39:46 -0400 Subject: the rest of drivers/*: annotate ->poll() instances Signed-off-by: Al Viro --- drivers/tty/n_gsm.c | 4 ++-- drivers/tty/n_hdlc.c | 6 +++--- drivers/tty/n_r3964.c | 6 +++--- drivers/tty/n_tty.c | 4 ++-- drivers/tty/tty_io.c | 6 +++--- drivers/tty/vt/vc_screen.c | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) (limited to 'drivers/tty') diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 5131bdc9e765..0edf4fcfea23 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c @@ -2457,10 +2457,10 @@ static ssize_t gsmld_write(struct tty_struct *tty, struct file *file, * Called without the kernel lock held - fine */ -static unsigned int gsmld_poll(struct tty_struct *tty, struct file *file, +static __poll_t gsmld_poll(struct tty_struct *tty, struct file *file, poll_table *wait) { - unsigned int mask = 0; + __poll_t mask = 0; struct gsm_mux *gsm = tty->disc_data; poll_wait(file, &tty->read_wait, wait); diff --git a/drivers/tty/n_hdlc.c b/drivers/tty/n_hdlc.c index eea7b6cb3cc4..929434ebee50 100644 --- a/drivers/tty/n_hdlc.c +++ b/drivers/tty/n_hdlc.c @@ -180,7 +180,7 @@ static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file, const unsigned char *buf, size_t nr); static int n_hdlc_tty_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg); -static unsigned int n_hdlc_tty_poll(struct tty_struct *tty, struct file *filp, +static __poll_t n_hdlc_tty_poll(struct tty_struct *tty, struct file *filp, poll_table *wait); static int n_hdlc_tty_open(struct tty_struct *tty); static void n_hdlc_tty_close(struct tty_struct *tty); @@ -796,11 +796,11 @@ static int n_hdlc_tty_ioctl(struct tty_struct *tty, struct file *file, * to caller. * Returns a bit mask containing info on which ops will not block. */ -static unsigned int n_hdlc_tty_poll(struct tty_struct *tty, struct file *filp, +static __poll_t n_hdlc_tty_poll(struct tty_struct *tty, struct file *filp, poll_table *wait) { struct n_hdlc *n_hdlc = tty2n_hdlc (tty); - unsigned int mask = 0; + __poll_t mask = 0; if (debuglevel >= DEBUG_LEVEL_INFO) printk("%s(%d)n_hdlc_tty_poll() called\n",__FILE__,__LINE__); diff --git a/drivers/tty/n_r3964.c b/drivers/tty/n_r3964.c index 30bb0900cd2f..e81d3db8ad63 100644 --- a/drivers/tty/n_r3964.c +++ b/drivers/tty/n_r3964.c @@ -135,7 +135,7 @@ static ssize_t r3964_write(struct tty_struct *tty, struct file *file, static int r3964_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg); static void r3964_set_termios(struct tty_struct *tty, struct ktermios *old); -static unsigned int r3964_poll(struct tty_struct *tty, struct file *file, +static __poll_t r3964_poll(struct tty_struct *tty, struct file *file, struct poll_table_struct *wait); static void r3964_receive_buf(struct tty_struct *tty, const unsigned char *cp, char *fp, int count); @@ -1216,14 +1216,14 @@ static void r3964_set_termios(struct tty_struct *tty, struct ktermios *old) } /* Called without the kernel lock held - fine */ -static unsigned int r3964_poll(struct tty_struct *tty, struct file *file, +static __poll_t r3964_poll(struct tty_struct *tty, struct file *file, struct poll_table_struct *wait) { struct r3964_info *pInfo = tty->disc_data; struct r3964_client_info *pClient; struct r3964_message *pMsg = NULL; unsigned long flags; - int result = POLLOUT; + __poll_t result = POLLOUT; TRACE_L("POLL"); diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index 427e0d5d8f13..081bbbb7d49c 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c @@ -2368,10 +2368,10 @@ break_out: * Called without the kernel lock held - fine */ -static unsigned int n_tty_poll(struct tty_struct *tty, struct file *file, +static __poll_t n_tty_poll(struct tty_struct *tty, struct file *file, poll_table *wait) { - unsigned int mask = 0; + __poll_t mask = 0; poll_wait(file, &tty->read_wait, wait); poll_wait(file, &tty->write_wait, wait); diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 287f9a4eef6d..00d14d6a76bb 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -144,7 +144,7 @@ static ssize_t tty_read(struct file *, char __user *, size_t, loff_t *); static ssize_t tty_write(struct file *, const char __user *, size_t, loff_t *); ssize_t redirected_tty_write(struct file *, const char __user *, size_t, loff_t *); -static unsigned int tty_poll(struct file *, poll_table *); +static __poll_t tty_poll(struct file *, poll_table *); static int tty_open(struct inode *, struct file *); long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg); #ifdef CONFIG_COMPAT @@ -443,7 +443,7 @@ static ssize_t hung_up_tty_write(struct file *file, const char __user *buf, } /* No kernel lock held - none needed ;) */ -static unsigned int hung_up_tty_poll(struct file *filp, poll_table *wait) +static __poll_t hung_up_tty_poll(struct file *filp, poll_table *wait) { return POLLIN | POLLOUT | POLLERR | POLLHUP | POLLRDNORM | POLLWRNORM; } @@ -2055,7 +2055,7 @@ retry_open: * may be re-entered freely by other callers. */ -static unsigned int tty_poll(struct file *filp, poll_table *wait) +static __poll_t tty_poll(struct file *filp, poll_table *wait) { struct tty_struct *tty = file_tty(filp); struct tty_ldisc *ld; diff --git a/drivers/tty/vt/vc_screen.c b/drivers/tty/vt/vc_screen.c index 85b6634f518a..3e64ccd0040f 100644 --- a/drivers/tty/vt/vc_screen.c +++ b/drivers/tty/vt/vc_screen.c @@ -559,11 +559,11 @@ unlock_out: return ret; } -static unsigned int +static __poll_t vcs_poll(struct file *file, poll_table *wait) { struct vcs_poll_data *poll = vcs_poll_data_get(file); - int ret = DEFAULT_POLLMASK|POLLERR|POLLPRI; + __poll_t ret = DEFAULT_POLLMASK|POLLERR|POLLPRI; if (poll) { poll_wait(file, &poll->waitq, wait); -- cgit