Skip to content

Commit e6c8adc

Browse files
author
Al Viro
committed
anntotate the places where ->poll() return values go
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent a3f8683 commit e6c8adc

12 files changed

Lines changed: 15 additions & 14 deletions

File tree

‎drivers/media/platform/soc_camera/soc_camera.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ static unsigned int soc_camera_poll(struct file *file, poll_table *pt)
809809
{
810810
struct soc_camera_device *icd = file->private_data;
811811
struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
812-
unsigned res = POLLERR;
812+
__poll_t res = POLLERR;
813813

814814
if (icd->streamer != file)
815815
return POLLERR;

‎drivers/media/v4l2-core/v4l2-dev.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ static ssize_t v4l2_write(struct file *filp, const char __user *buf,
334334
static unsigned int v4l2_poll(struct file *filp, struct poll_table_struct *poll)
335335
{
336336
struct video_device *vdev = video_devdata(filp);
337-
unsigned int res = POLLERR | POLLHUP;
337+
__poll_t res = POLLERR | POLLHUP;
338338

339339
if (!vdev->fops->poll)
340340
return DEFAULT_POLLMASK;

‎drivers/staging/comedi/drivers/serial2002.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ static void serial2002_tty_read_poll_wait(struct file *f, int timeout)
119119
poll_initwait(&table);
120120
while (1) {
121121
long elapsed;
122-
int mask;
122+
__poll_t mask;
123123

124124
mask = f->f_op->poll(f, &table.pt);
125125
if (mask & (POLLRDNORM | POLLRDBAND | POLLIN |

‎drivers/tty/tty_io.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2059,7 +2059,7 @@ static unsigned int tty_poll(struct file *filp, poll_table *wait)
20592059
{
20602060
struct tty_struct *tty = file_tty(filp);
20612061
struct tty_ldisc *ld;
2062-
int ret = 0;
2062+
__poll_t ret = 0;
20632063

20642064
if (tty_paranoia_check(tty, file_inode(filp), "tty_poll"))
20652065
return 0;

‎drivers/vfio/virqfd.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ int vfio_virqfd_enable(void *opaque,
113113
struct eventfd_ctx *ctx;
114114
struct virqfd *virqfd;
115115
int ret = 0;
116-
unsigned int events;
116+
__poll_t events;
117117

118118
virqfd = kzalloc(sizeof(*virqfd), GFP_KERNEL);
119119
if (!virqfd)

‎drivers/vhost/vhost.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,15 @@ EXPORT_SYMBOL_GPL(vhost_poll_init);
203203
* keep a reference to a file until after vhost_poll_stop is called. */
204204
int vhost_poll_start(struct vhost_poll *poll, struct file *file)
205205
{
206-
unsigned long mask;
206+
__poll_t mask;
207207
int ret = 0;
208208

209209
if (poll->wqh)
210210
return 0;
211211

212212
mask = file->f_op->poll(file, &poll->table);
213213
if (mask)
214-
vhost_poll_wakeup(&poll->wait, 0, 0, (void *)mask);
214+
vhost_poll_wakeup(&poll->wait, 0, 0, (void *)(uintptr_t)mask);
215215
if (mask & POLLERR) {
216216
if (poll->wqh)
217217
remove_wait_queue(poll->wqh, &poll->wait);

‎fs/debugfs/file.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ static unsigned int full_proxy_poll(struct file *filp,
210210
struct poll_table_struct *wait)
211211
{
212212
struct dentry *dentry = F_DENTRY(filp);
213-
unsigned int r = 0;
213+
__poll_t r = 0;
214214
const struct file_operations *real_fops;
215215

216216
if (debugfs_file_get(dentry))

‎fs/proc/inode.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ static ssize_t proc_reg_write(struct file *file, const char __user *buf, size_t
237237
static unsigned int proc_reg_poll(struct file *file, struct poll_table_struct *pts)
238238
{
239239
struct proc_dir_entry *pde = PDE(file_inode(file));
240-
unsigned int rv = DEFAULT_POLLMASK;
240+
__poll_t rv = DEFAULT_POLLMASK;
241241
__poll_t (*poll)(struct file *, struct poll_table_struct *);
242242
if (use_pde(pde)) {
243243
poll = pde->proc_fops->poll;

‎fs/select.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,9 @@ static int do_select(int n, fd_set_bits *fds, struct timespec64 *end_time)
484484
rinp = fds->res_in; routp = fds->res_out; rexp = fds->res_ex;
485485

486486
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;
488488
unsigned long res_in = 0, res_out = 0, res_ex = 0;
489+
__poll_t mask;
489490

490491
in = *inp++; out = *outp++; ex = *exp++;
491492
all_bits = in | out | ex;
@@ -806,7 +807,7 @@ static inline unsigned int do_pollfd(struct pollfd *pollfd, poll_table *pwait,
806807
bool *can_busy_poll,
807808
unsigned int busy_flag)
808809
{
809-
unsigned int mask;
810+
__poll_t mask;
810811
int fd;
811812

812813
mask = 0;

‎net/smc/af_smc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,7 @@ static unsigned int smc_poll(struct file *file, struct socket *sock,
11301130
poll_table *wait)
11311131
{
11321132
struct sock *sk = sock->sk;
1133-
unsigned int mask = 0;
1133+
__poll_t mask = 0;
11341134
struct smc_sock *smc;
11351135
int rc;
11361136

0 commit comments

Comments
 (0)