Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull poll annotations from Al Viro:
"This introduces a __bitwise type for POLL### bitmap, and propagates
the annotations through the tree. Most of that stuff is as simple as
'make ->poll() instances return __poll_t and do the same to local
variables used to hold the future return value'.

Some of the obvious brainos found in process are fixed (e.g. POLLIN
misspelled as POLL_IN). At that point the amount of sparse warnings is
low and most of them are for genuine bugs - e.g. ->poll() instance
deciding to return -EINVAL instead of a bitmap. I hadn't touched those
in this series - it's large enough as it is.

Another problem it has caught was eventpoll() ABI mess; select.c and
eventpoll.c assumed that corresponding POLL### and EPOLL### were
equal. That's true for some, but not all of them - EPOLL### are
arch-independent, but POLL### are not.

The last commit in this series separates userland POLL### values from
the (now arch-independent) kernel-side ones, converting between them
in the few places where they are copied to/from userland. AFAICS, this
is the least disruptive fix preserving poll(2) ABI and making epoll()
work on all architectures.

As it is, it's simply broken on sparc - try to give it EPOLLWRNORM and
it will trigger only on what would've triggered EPOLLWRBAND on other
architectures. EPOLLWRBAND and EPOLLRDHUP, OTOH, are never triggered
at all on sparc. With this patch they should work consistently on all
architectures"

* 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (37 commits)
make kernel-side POLL... arch-independent
eventpoll: no need to mask the result of epi_item_poll() again
eventpoll: constify struct epoll_event pointers
debugging printk in sg_poll() uses %x to print POLL... bitmap
annotate poll(2) guts
9p: untangle ->poll() mess
->si_band gets POLL... bitmap stored into a user-visible long field
ring_buffer_poll_wait() return value used as return value of ->poll()
the rest of drivers/*: annotate ->poll() instances
media: annotate ->poll() instances
fs: annotate ->poll() instances
ipc, kernel, mm: annotate ->poll() instances
net: annotate ->poll() instances
apparmor: annotate ->poll() instances
tomoyo: annotate ->poll() instances
sound: annotate ->poll() instances
acpi: annotate ->poll() instances
crypto: annotate ->poll() instances
block: annotate ->poll() instances
x86: annotate ->poll() instances
...

+928 -810
+1
arch/alpha/include/uapi/asm/Kbuild
··· 2 2 include include/uapi/asm-generic/Kbuild.asm 3 3 4 4 generic-y += bpf_perf_event.h 5 + generic-y += poll.h
-2
arch/alpha/include/uapi/asm/poll.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 - #include <asm-generic/poll.h>
+19 -2
arch/blackfin/include/uapi/asm/poll.h
··· 9 9 #ifndef _UAPI__BFIN_POLL_H 10 10 #define _UAPI__BFIN_POLL_H 11 11 12 - #define POLLWRNORM 4 /* POLLOUT */ 13 - #define POLLWRBAND 256 12 + #ifndef __KERNEL__ 13 + #define POLLWRNORM POLLOUT 14 + #define POLLWRBAND (__force __poll_t)256 15 + #else 16 + #define __ARCH_HAS_MANGLED_POLL 17 + static inline __u16 mangle_poll(__poll_t val) 18 + { 19 + __u16 v = (__force __u16)val; 20 + /* bit 9 -> bit 8, bit 8 -> bit 2 */ 21 + return (v & ~0x300) | ((v & 0x200) >> 1) | ((v & 0x100) >> 6); 22 + } 23 + 24 + static inline __poll_t demangle_poll(__u16 v) 25 + { 26 + /* bit 8 -> bit 9, bit 2 -> bits 2 and 8 */ 27 + return (__force __poll_t)((v & ~0x100) | ((v & 0x100) << 1) | 28 + ((v & 4) << 6)); 29 + } 30 + #endif 14 31 15 32 #include <asm-generic/poll.h> 16 33
+3 -3
arch/cris/arch-v10/drivers/gpio.c
··· 50 50 size_t count, loff_t *off); 51 51 static int gpio_open(struct inode *inode, struct file *filp); 52 52 static int gpio_release(struct inode *inode, struct file *filp); 53 - static unsigned int gpio_poll(struct file *filp, struct poll_table_struct *wait); 53 + static __poll_t gpio_poll(struct file *filp, struct poll_table_struct *wait); 54 54 55 55 /* private data per open() of this driver */ 56 56 ··· 141 141 #define USE_PORTS(priv) ((priv)->minor <= GPIO_MINOR_B) 142 142 143 143 144 - static unsigned int gpio_poll(struct file *file, poll_table *wait) 144 + static __poll_t gpio_poll(struct file *file, poll_table *wait) 145 145 { 146 - unsigned int mask = 0; 146 + __poll_t mask = 0; 147 147 struct gpio_private *priv = file->private_data; 148 148 unsigned long data; 149 149 unsigned long flags;
+4 -4
arch/cris/arch-v10/drivers/sync_serial.c
··· 157 157 158 158 static int sync_serial_open(struct inode *inode, struct file *file); 159 159 static int sync_serial_release(struct inode *inode, struct file *file); 160 - static unsigned int sync_serial_poll(struct file *filp, poll_table *wait); 160 + static __poll_t sync_serial_poll(struct file *filp, poll_table *wait); 161 161 162 162 static long sync_serial_ioctl(struct file *file, 163 163 unsigned int cmd, unsigned long arg); ··· 654 654 655 655 656 656 657 - static unsigned int sync_serial_poll(struct file *file, poll_table *wait) 657 + static __poll_t sync_serial_poll(struct file *file, poll_table *wait) 658 658 { 659 659 int dev = MINOR(file_inode(file)->i_rdev); 660 - unsigned int mask = 0; 660 + __poll_t mask = 0; 661 661 struct sync_port *port; 662 - DEBUGPOLL(static unsigned int prev_mask = 0); 662 + DEBUGPOLL(static __poll_t prev_mask = 0); 663 663 664 664 port = &ports[dev]; 665 665 poll_wait(file, &port->out_wait_q, wait);
+4 -4
arch/cris/arch-v32/drivers/sync_serial.c
··· 178 178 179 179 static int sync_serial_open(struct inode *, struct file *); 180 180 static int sync_serial_release(struct inode *, struct file *); 181 - static unsigned int sync_serial_poll(struct file *filp, poll_table *wait); 181 + static __poll_t sync_serial_poll(struct file *filp, poll_table *wait); 182 182 183 183 static long sync_serial_ioctl(struct file *file, 184 184 unsigned int cmd, unsigned long arg); ··· 555 555 return 0; 556 556 } 557 557 558 - static unsigned int sync_serial_poll(struct file *file, poll_table *wait) 558 + static __poll_t sync_serial_poll(struct file *file, poll_table *wait) 559 559 { 560 560 int dev = iminor(file_inode(file)); 561 - unsigned int mask = 0; 561 + __poll_t mask = 0; 562 562 struct sync_port *port; 563 563 DEBUGPOLL( 564 - static unsigned int prev_mask; 564 + static __poll_t prev_mask; 565 565 ); 566 566 567 567 port = &ports[dev];
+18 -3
arch/frv/include/uapi/asm/poll.h
··· 2 2 #ifndef _ASM_POLL_H 3 3 #define _ASM_POLL_H 4 4 5 + #ifndef __KERNEL__ 5 6 #define POLLWRNORM POLLOUT 6 - #define POLLWRBAND 256 7 + #define POLLWRBAND (__force __poll_t)256 8 + #else 9 + #define __ARCH_HAS_MANGLED_POLL 10 + static inline __u16 mangle_poll(__poll_t val) 11 + { 12 + __u16 v = (__force __u16)val; 13 + /* bit 9 -> bit 8, bit 8 -> bit 2 */ 14 + return (v & ~0x300) | ((v & 0x200) >> 1) | ((v & 0x100) >> 6); 15 + } 16 + 17 + static inline __poll_t demangle_poll(__u16 v) 18 + { 19 + /* bit 8 -> bit 9, bit 2 -> bits 2 and 8 */ 20 + return (__force __poll_t)((v & ~0x100) | ((v & 0x100) << 1) | 21 + ((v & 4) << 6)); 22 + } 23 + #endif 7 24 8 25 #include <asm-generic/poll.h> 9 - 10 26 #undef POLLREMOVE 11 27 12 28 #endif 13 -
+1
arch/ia64/include/uapi/asm/Kbuild
··· 3 3 4 4 generic-y += bpf_perf_event.h 5 5 generic-y += kvm_para.h 6 + generic-y += poll.h
-2
arch/ia64/include/uapi/asm/poll.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 - #include <asm-generic/poll.h>
+2 -2
arch/ia64/kernel/perfmon.c
··· 1644 1644 return -EINVAL; 1645 1645 } 1646 1646 1647 - static unsigned int 1647 + static __poll_t 1648 1648 pfm_poll(struct file *filp, poll_table * wait) 1649 1649 { 1650 1650 pfm_context_t *ctx; 1651 1651 unsigned long flags; 1652 - unsigned int mask = 0; 1652 + __poll_t mask = 0; 1653 1653 1654 1654 if (PFM_IS_FILE(filp) == 0) { 1655 1655 printk(KERN_ERR "perfmon: pfm_poll: bad magic [%d]\n", task_pid_nr(current));
+1
arch/m32r/include/uapi/asm/Kbuild
··· 3 3 4 4 generic-y += bpf_perf_event.h 5 5 generic-y += kvm_para.h 6 + generic-y += poll.h 6 7 generic-y += siginfo.h
-2
arch/m32r/include/uapi/asm/poll.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 - #include <asm-generic/poll.h>
+18 -1
arch/m68k/include/uapi/asm/poll.h
··· 2 2 #ifndef __m68k_POLL_H 3 3 #define __m68k_POLL_H 4 4 5 + #ifndef __KERNEL__ 5 6 #define POLLWRNORM POLLOUT 6 - #define POLLWRBAND 256 7 + #define POLLWRBAND (__force __poll_t)256 8 + #else 9 + #define __ARCH_HAS_MANGLED_POLL 10 + static inline __u16 mangle_poll(__poll_t val) 11 + { 12 + __u16 v = (__force __u16)val; 13 + /* bit 9 -> bit 8, bit 8 -> bit 2 */ 14 + return (v & ~0x300) | ((v & 0x200) >> 1) | ((v & 0x100) >> 6); 15 + } 16 + 17 + static inline __poll_t demangle_poll(__u16 v) 18 + { 19 + /* bit 8 -> bit 9, bit 2 -> bits 2 and 8 */ 20 + return (__force __poll_t)((v & ~0x100) | ((v & 0x100) << 1) | 21 + ((v & 4) << 6)); 22 + } 23 + #endif 7 24 8 25 #include <asm-generic/poll.h> 9 26
+18 -1
arch/mips/include/uapi/asm/poll.h
··· 2 2 #ifndef __ASM_POLL_H 3 3 #define __ASM_POLL_H 4 4 5 + #ifndef __KERNEL__ 5 6 #define POLLWRNORM POLLOUT 6 - #define POLLWRBAND 0x0100 7 + #define POLLWRBAND (__force __poll_t)0x0100 8 + #else 9 + #define __ARCH_HAS_MANGLED_POLL 10 + static inline __u16 mangle_poll(__poll_t val) 11 + { 12 + __u16 v = (__force __u16)val; 13 + /* bit 9 -> bit 8, bit 8 -> bit 2 */ 14 + return (v & ~0x300) | ((v & 0x200) >> 1) | ((v & 0x100) >> 6); 15 + } 16 + 17 + static inline __poll_t demangle_poll(__u16 v) 18 + { 19 + /* bit 8 -> bit 9, bit 2 -> bits 2 and 8 */ 20 + return (__force __poll_t)((v & ~0x100) | ((v & 0x100) << 1) | 21 + ((v & 4) << 6)); 22 + } 23 + #endif 7 24 8 25 #include <asm-generic/poll.h> 9 26
+2 -2
arch/mips/kernel/rtlx.c
··· 336 336 return rtlx_release(iminor(inode)); 337 337 } 338 338 339 - static unsigned int file_poll(struct file *file, poll_table *wait) 339 + static __poll_t file_poll(struct file *file, poll_table *wait) 340 340 { 341 341 int minor = iminor(file_inode(file)); 342 - unsigned int mask = 0; 342 + __poll_t mask = 0; 343 343 344 344 poll_wait(file, &channel_wqs[minor].rt_queue, wait); 345 345 poll_wait(file, &channel_wqs[minor].lx_queue, wait);
+1
arch/mn10300/include/uapi/asm/Kbuild
··· 2 2 include include/uapi/asm-generic/Kbuild.asm 3 3 4 4 generic-y += bpf_perf_event.h 5 + generic-y += poll.h 5 6 generic-y += siginfo.h
-2
arch/mn10300/include/uapi/asm/poll.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 - #include <asm-generic/poll.h>
+1 -1
arch/powerpc/kernel/rtasd.c
··· 388 388 return error; 389 389 } 390 390 391 - static unsigned int rtas_log_poll(struct file *file, poll_table * wait) 391 + static __poll_t rtas_log_poll(struct file *file, poll_table * wait) 392 392 { 393 393 poll_wait(file, &rtas_log_wait, wait); 394 394 if (rtas_log_size)
+3 -3
arch/powerpc/platforms/cell/spufs/backing_ops.c
··· 86 86 return ctx->csa.prob.mb_stat_R; 87 87 } 88 88 89 - static unsigned int spu_backing_mbox_stat_poll(struct spu_context *ctx, 90 - unsigned int events) 89 + static __poll_t spu_backing_mbox_stat_poll(struct spu_context *ctx, 90 + __poll_t events) 91 91 { 92 - int ret; 92 + __poll_t ret; 93 93 u32 stat; 94 94 95 95 ret = 0;
+8 -8
arch/powerpc/platforms/cell/spufs/file.c
··· 762 762 return count; 763 763 } 764 764 765 - static unsigned int spufs_ibox_poll(struct file *file, poll_table *wait) 765 + static __poll_t spufs_ibox_poll(struct file *file, poll_table *wait) 766 766 { 767 767 struct spu_context *ctx = file->private_data; 768 - unsigned int mask; 768 + __poll_t mask; 769 769 770 770 poll_wait(file, &ctx->ibox_wq, wait); 771 771 ··· 898 898 return count; 899 899 } 900 900 901 - static unsigned int spufs_wbox_poll(struct file *file, poll_table *wait) 901 + static __poll_t spufs_wbox_poll(struct file *file, poll_table *wait) 902 902 { 903 903 struct spu_context *ctx = file->private_data; 904 - unsigned int mask; 904 + __poll_t mask; 905 905 906 906 poll_wait(file, &ctx->wbox_wq, wait); 907 907 ··· 1690 1690 return ret; 1691 1691 } 1692 1692 1693 - static unsigned int spufs_mfc_poll(struct file *file,poll_table *wait) 1693 + static __poll_t spufs_mfc_poll(struct file *file,poll_table *wait) 1694 1694 { 1695 1695 struct spu_context *ctx = file->private_data; 1696 1696 u32 free_elements, tagstatus; 1697 - unsigned int mask; 1697 + __poll_t mask; 1698 1698 1699 1699 poll_wait(file, &ctx->mfc_wq, wait); 1700 1700 ··· 2455 2455 return cnt == 0 ? error : cnt; 2456 2456 } 2457 2457 2458 - static unsigned int spufs_switch_log_poll(struct file *file, poll_table *wait) 2458 + static __poll_t spufs_switch_log_poll(struct file *file, poll_table *wait) 2459 2459 { 2460 2460 struct inode *inode = file_inode(file); 2461 2461 struct spu_context *ctx = SPUFS_I(inode)->i_ctx; 2462 - unsigned int mask = 0; 2462 + __poll_t mask = 0; 2463 2463 int rc; 2464 2464 2465 2465 poll_wait(file, &ctx->switch_log->wait, wait);
+2 -3
arch/powerpc/platforms/cell/spufs/hw_ops.c
··· 56 56 return in_be32(&ctx->spu->problem->mb_stat_R); 57 57 } 58 58 59 - static unsigned int spu_hw_mbox_stat_poll(struct spu_context *ctx, 60 - unsigned int events) 59 + static __poll_t spu_hw_mbox_stat_poll(struct spu_context *ctx, __poll_t events) 61 60 { 62 61 struct spu *spu = ctx->spu; 63 - int ret = 0; 62 + __poll_t ret = 0; 64 63 u32 stat; 65 64 66 65 spin_lock_irq(&spu->register_lock);
+1 -2
arch/powerpc/platforms/cell/spufs/spufs.h
··· 185 185 struct spu_context_ops { 186 186 int (*mbox_read) (struct spu_context * ctx, u32 * data); 187 187 u32(*mbox_stat_read) (struct spu_context * ctx); 188 - unsigned int (*mbox_stat_poll)(struct spu_context *ctx, 189 - unsigned int events); 188 + __poll_t (*mbox_stat_poll)(struct spu_context *ctx, __poll_t events); 190 189 int (*ibox_read) (struct spu_context * ctx, u32 * data); 191 190 int (*wbox_write) (struct spu_context * ctx, u32 data); 192 191 u32(*signal1_read) (struct spu_context * ctx);
+1 -1
arch/powerpc/platforms/powernv/opal-prd.c
··· 147 147 return ret; 148 148 } 149 149 150 - static unsigned int opal_prd_poll(struct file *file, 150 + static __poll_t opal_prd_poll(struct file *file, 151 151 struct poll_table_struct *wait) 152 152 { 153 153 poll_wait(file, &opal_prd_msg_wait, wait);
+1
arch/score/include/uapi/asm/Kbuild
··· 2 2 include include/uapi/asm-generic/Kbuild.asm 3 3 4 4 generic-y += bpf_perf_event.h 5 + generic-y += poll.h 5 6 generic-y += siginfo.h
-7
arch/score/include/uapi/asm/poll.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 - #ifndef _ASM_SCORE_POLL_H 3 - #define _ASM_SCORE_POLL_H 4 - 5 - #include <asm-generic/poll.h> 6 - 7 - #endif /* _ASM_SCORE_POLL_H */
+24 -4
arch/sparc/include/uapi/asm/poll.h
··· 2 2 #ifndef __SPARC_POLL_H 3 3 #define __SPARC_POLL_H 4 4 5 + #ifndef __KERNEL__ 5 6 #define POLLWRNORM POLLOUT 6 - #define POLLWRBAND 256 7 - #define POLLMSG 512 8 - #define POLLREMOVE 1024 9 - #define POLLRDHUP 2048 7 + #define POLLWRBAND (__force __poll_t)256 8 + #define POLLMSG (__force __poll_t)512 9 + #define POLLREMOVE (__force __poll_t)1024 10 + #define POLLRDHUP (__force __poll_t)2048 11 + #else 12 + #define __ARCH_HAS_MANGLED_POLL 13 + static inline __u16 mangle_poll(__poll_t val) 14 + { 15 + __u16 v = (__force __u16)val; 16 + /* bit 9 -> bit 8, bit 8 -> bit 2, bit 13 -> bit 11 */ 17 + return (v & ~0x300) | ((v & 0x200) >> 1) | ((v & 0x100) >> 6) | 18 + ((v & 0x2000) >> 2); 19 + 20 + 21 + } 22 + 23 + static inline __poll_t demangle_poll(__u16 v) 24 + { 25 + /* bit 8 -> bit 9, bit 2 -> bits 2 and 8 */ 26 + return (__force __poll_t)((v & ~0x100) | ((v & 0x100) << 1) | 27 + ((v & 4) << 6) | ((v & 0x800) << 2)); 28 + } 29 + #endif 10 30 11 31 #include <asm-generic/poll.h> 12 32
+7
arch/um/Makefile
··· 116 116 KBUILD_KCONFIG := $(HOST_DIR)/um/Kconfig 117 117 118 118 archheaders: 119 + $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \ 120 + kbuild-file=$(HOST_DIR)/include/asm/Kbuild \ 121 + obj=$(HOST_DIR)/include/generated/asm 122 + $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \ 123 + kbuild-file=$(HOST_DIR)/include/uapi/asm/Kbuild \ 124 + obj=$(HOST_DIR)/include/generated/uapi/asm 119 125 $(Q)$(MAKE) KBUILD_SRC= ARCH=$(HEADER_ARCH) archheaders 126 + 120 127 121 128 archprepare: include/generated/user_constants.h 122 129
+3 -3
arch/um/drivers/hostaudio_kern.c
··· 119 119 return err; 120 120 } 121 121 122 - static unsigned int hostaudio_poll(struct file *file, 123 - struct poll_table_struct *wait) 122 + static __poll_t hostaudio_poll(struct file *file, 123 + struct poll_table_struct *wait) 124 124 { 125 - unsigned int mask = 0; 125 + __poll_t mask = 0; 126 126 127 127 #ifdef DEBUG 128 128 printk(KERN_DEBUG "hostaudio: poll called (unimplemented)\n");
+1
arch/x86/include/uapi/asm/Kbuild
··· 5 5 generated-y += unistd_32.h 6 6 generated-y += unistd_64.h 7 7 generated-y += unistd_x32.h 8 + generic-y += poll.h
-1
arch/x86/include/uapi/asm/poll.h
··· 1 - #include <asm-generic/poll.h>
+1 -1
arch/x86/kernel/apm_32.c
··· 1506 1506 return 0; 1507 1507 } 1508 1508 1509 - static unsigned int do_poll(struct file *fp, poll_table *wait) 1509 + static __poll_t do_poll(struct file *fp, poll_table *wait) 1510 1510 { 1511 1511 struct apm_user *as; 1512 1512
+1 -1
arch/x86/kernel/cpu/mcheck/dev-mcelog.c
··· 243 243 return err ? err : buf - ubuf; 244 244 } 245 245 246 - static unsigned int mce_chrdev_poll(struct file *file, poll_table *wait) 246 + static __poll_t mce_chrdev_poll(struct file *file, poll_table *wait) 247 247 { 248 248 poll_wait(file, &mce_chrdev_wait, wait); 249 249 if (READ_ONCE(mcelog.next))
+19 -2
arch/xtensa/include/uapi/asm/poll.h
··· 12 12 #ifndef _XTENSA_POLL_H 13 13 #define _XTENSA_POLL_H 14 14 15 + #ifndef __KERNEL__ 15 16 #define POLLWRNORM POLLOUT 16 - #define POLLWRBAND 0x0100 17 - #define POLLREMOVE 0x0800 17 + #define POLLWRBAND (__force __poll_t)0x0100 18 + #define POLLREMOVE (__force __poll_t)0x0800 19 + #else 20 + #define __ARCH_HAS_MANGLED_POLL 21 + static inline __u16 mangle_poll(__poll_t val) 22 + { 23 + __u16 v = (__force __u16)val; 24 + /* bit 9 -> bit 8, bit 8 -> bit 2 */ 25 + return (v & ~0x300) | ((v & 0x200) >> 1) | ((v & 0x100) >> 6); 26 + } 27 + 28 + static inline __poll_t demangle_poll(__u16 v) 29 + { 30 + /* bit 8 -> bit 9, bit 2 -> bits 2 and 8 */ 31 + return (__force __poll_t)((v & ~0x100) | ((v & 0x100) << 1) | 32 + ((v & 4) << 6)); 33 + } 34 + #endif 18 35 19 36 #include <asm-generic/poll.h> 20 37
+2 -2
block/bsg.c
··· 839 839 return bsg_put_device(bd); 840 840 } 841 841 842 - static unsigned int bsg_poll(struct file *file, poll_table *wait) 842 + static __poll_t bsg_poll(struct file *file, poll_table *wait) 843 843 { 844 844 struct bsg_device *bd = file->private_data; 845 - unsigned int mask = 0; 845 + __poll_t mask = 0; 846 846 847 847 poll_wait(file, &bd->wq_done, wait); 848 848 poll_wait(file, &bd->wq_free, wait);
+2 -2
crypto/af_alg.c
··· 1062 1062 /** 1063 1063 * af_alg_poll - poll system call handler 1064 1064 */ 1065 - unsigned int af_alg_poll(struct file *file, struct socket *sock, 1065 + __poll_t af_alg_poll(struct file *file, struct socket *sock, 1066 1066 poll_table *wait) 1067 1067 { 1068 1068 struct sock *sk = sock->sk; 1069 1069 struct alg_sock *ask = alg_sk(sk); 1070 1070 struct af_alg_ctx *ctx = ask->private; 1071 - unsigned int mask; 1071 + __poll_t mask; 1072 1072 1073 1073 sock_poll_wait(file, sk_sleep(sk), wait); 1074 1074 mask = 0;
-1
crypto/algif_skcipher.c
··· 193 193 return ret; 194 194 } 195 195 196 - 197 196 static struct proto_ops algif_skcipher_ops = { 198 197 .family = PF_ALG, 199 198
+2 -2
drivers/acpi/acpi_dbg.c
··· 718 718 return size > 0 ? size : ret; 719 719 } 720 720 721 - static unsigned int acpi_aml_poll(struct file *file, poll_table *wait) 721 + static __poll_t acpi_aml_poll(struct file *file, poll_table *wait) 722 722 { 723 - int masks = 0; 723 + __poll_t masks = 0; 724 724 725 725 poll_wait(file, &acpi_aml_io.wait, wait); 726 726 if (acpi_aml_user_readable())
+1 -1
drivers/android/binder.c
··· 4311 4311 return active_transactions; 4312 4312 } 4313 4313 4314 - static unsigned int binder_poll(struct file *filp, 4314 + static __poll_t binder_poll(struct file *filp, 4315 4315 struct poll_table_struct *wait) 4316 4316 { 4317 4317 struct binder_proc *proc = filp->private_data;
+1 -1
drivers/bluetooth/hci_ldisc.c
··· 794 794 return 0; 795 795 } 796 796 797 - static unsigned int hci_uart_tty_poll(struct tty_struct *tty, 797 + static __poll_t hci_uart_tty_poll(struct tty_struct *tty, 798 798 struct file *filp, poll_table *wait) 799 799 { 800 800 return 0;
+1 -1
drivers/bluetooth/hci_vhci.c
··· 299 299 return vhci_get_user(data, from); 300 300 } 301 301 302 - static unsigned int vhci_poll(struct file *file, poll_table *wait) 302 + static __poll_t vhci_poll(struct file *file, poll_table *wait) 303 303 { 304 304 struct vhci_data *data = file->private_data; 305 305
+1 -1
drivers/char/apm-emulation.c
··· 236 236 return ret; 237 237 } 238 238 239 - static unsigned int apm_poll(struct file *fp, poll_table * wait) 239 + static __poll_t apm_poll(struct file *fp, poll_table * wait) 240 240 { 241 241 struct apm_user *as = fp->private_data; 242 242
+1 -1
drivers/char/dsp56k.c
··· 406 406 * Do I need this function at all??? 407 407 */ 408 408 #if 0 409 - static unsigned int dsp56k_poll(struct file *file, poll_table *wait) 409 + static __poll_t dsp56k_poll(struct file *file, poll_table *wait) 410 410 { 411 411 int dev = iminor(file_inode(file)) & 0x0f; 412 412
+3 -3
drivers/char/dtlk.c
··· 91 91 size_t nbytes, loff_t * ppos); 92 92 static ssize_t dtlk_write(struct file *, const char __user *, 93 93 size_t nbytes, loff_t * ppos); 94 - static unsigned int dtlk_poll(struct file *, poll_table *); 94 + static __poll_t dtlk_poll(struct file *, poll_table *); 95 95 static int dtlk_open(struct inode *, struct file *); 96 96 static int dtlk_release(struct inode *, struct file *); 97 97 static long dtlk_ioctl(struct file *file, ··· 228 228 return -EAGAIN; 229 229 } 230 230 231 - static unsigned int dtlk_poll(struct file *file, poll_table * wait) 231 + static __poll_t dtlk_poll(struct file *file, poll_table * wait) 232 232 { 233 - int mask = 0; 233 + __poll_t mask = 0; 234 234 unsigned long expires; 235 235 236 236 TRACE_TEXT(" dtlk_poll");
+1 -1
drivers/char/hpet.c
··· 342 342 return retval; 343 343 } 344 344 345 - static unsigned int hpet_poll(struct file *file, poll_table * wait) 345 + static __poll_t hpet_poll(struct file *file, poll_table * wait) 346 346 { 347 347 unsigned long v; 348 348 struct hpet_dev *devp;
+2 -2
drivers/char/ipmi/bt-bmc.c
··· 338 338 return 0; 339 339 } 340 340 341 - static unsigned int bt_bmc_poll(struct file *file, poll_table *wait) 341 + static __poll_t bt_bmc_poll(struct file *file, poll_table *wait) 342 342 { 343 343 struct bt_bmc *bt_bmc = file_bt_bmc(file); 344 - unsigned int mask = 0; 344 + __poll_t mask = 0; 345 345 u8 ctrl; 346 346 347 347 poll_wait(file, &bt_bmc->queue, wait);
+2 -2
drivers/char/ipmi/ipmi_devintf.c
··· 78 78 spin_unlock_irqrestore(&(priv->recv_msg_lock), flags); 79 79 } 80 80 81 - static unsigned int ipmi_poll(struct file *file, poll_table *wait) 81 + static __poll_t ipmi_poll(struct file *file, poll_table *wait) 82 82 { 83 83 struct ipmi_file_private *priv = file->private_data; 84 - unsigned int mask = 0; 84 + __poll_t mask = 0; 85 85 unsigned long flags; 86 86 87 87 poll_wait(file, &priv->wait, wait);
+2 -2
drivers/char/ipmi/ipmi_watchdog.c
··· 887 887 } 888 888 } 889 889 890 - static unsigned int ipmi_poll(struct file *file, poll_table *wait) 890 + static __poll_t ipmi_poll(struct file *file, poll_table *wait) 891 891 { 892 - unsigned int mask = 0; 892 + __poll_t mask = 0; 893 893 894 894 poll_wait(file, &read_q, wait); 895 895
+2 -2
drivers/char/pcmcia/cm4040_cs.c
··· 415 415 return count; 416 416 } 417 417 418 - static unsigned int cm4040_poll(struct file *filp, poll_table *wait) 418 + static __poll_t cm4040_poll(struct file *filp, poll_table *wait) 419 419 { 420 420 struct reader_dev *dev = filp->private_data; 421 - unsigned int mask = 0; 421 + __poll_t mask = 0; 422 422 423 423 poll_wait(filp, &dev->poll_wait, wait); 424 424
+2 -2
drivers/char/ppdev.c
··· 769 769 } 770 770 771 771 /* No kernel lock held - fine */ 772 - static unsigned int pp_poll(struct file *file, poll_table *wait) 772 + static __poll_t pp_poll(struct file *file, poll_table *wait) 773 773 { 774 774 struct pp_struct *pp = file->private_data; 775 - unsigned int mask = 0; 775 + __poll_t mask = 0; 776 776 777 777 poll_wait(file, &pp->irq_wait, wait); 778 778 if (atomic_read(&pp->irqc))
+2 -2
drivers/char/random.c
··· 1784 1784 return ret; 1785 1785 } 1786 1786 1787 - static unsigned int 1787 + static __poll_t 1788 1788 random_poll(struct file *file, poll_table * wait) 1789 1789 { 1790 - unsigned int mask; 1790 + __poll_t mask; 1791 1791 1792 1792 poll_wait(file, &random_read_wait, wait); 1793 1793 poll_wait(file, &random_write_wait, wait);
+2 -2
drivers/char/rtc.c
··· 147 147 static void rtc_get_rtc_time(struct rtc_time *rtc_tm); 148 148 149 149 #ifdef RTC_IRQ 150 - static unsigned int rtc_poll(struct file *file, poll_table *wait); 150 + static __poll_t rtc_poll(struct file *file, poll_table *wait); 151 151 #endif 152 152 153 153 static void get_rtc_alm_time(struct rtc_time *alm_tm); ··· 790 790 } 791 791 792 792 #ifdef RTC_IRQ 793 - static unsigned int rtc_poll(struct file *file, poll_table *wait) 793 + static __poll_t rtc_poll(struct file *file, poll_table *wait) 794 794 { 795 795 unsigned long l; 796 796
+2 -2
drivers/char/snsc.c
··· 321 321 return status; 322 322 } 323 323 324 - static unsigned int 324 + static __poll_t 325 325 scdrv_poll(struct file *file, struct poll_table_struct *wait) 326 326 { 327 - unsigned int mask = 0; 327 + __poll_t mask = 0; 328 328 int status = 0; 329 329 struct subch_data_s *sd = (struct subch_data_s *) file->private_data; 330 330 unsigned long flags;
+1 -1
drivers/char/sonypi.c
··· 940 940 return ret; 941 941 } 942 942 943 - static unsigned int sonypi_misc_poll(struct file *file, poll_table *wait) 943 + static __poll_t sonypi_misc_poll(struct file *file, poll_table *wait) 944 944 { 945 945 poll_wait(file, &sonypi_device.fifo_proc_list, wait); 946 946 if (kfifo_len(&sonypi_device.fifo))
+2 -2
drivers/char/tpm/tpm_vtpm_proxy.c
··· 173 173 * 174 174 * Return: Poll flags 175 175 */ 176 - static unsigned int vtpm_proxy_fops_poll(struct file *filp, poll_table *wait) 176 + static __poll_t vtpm_proxy_fops_poll(struct file *filp, poll_table *wait) 177 177 { 178 178 struct proxy_dev *proxy_dev = filp->private_data; 179 - unsigned ret; 179 + __poll_t ret; 180 180 181 181 poll_wait(filp, &proxy_dev->wq, wait); 182 182
+2 -2
drivers/char/virtio_console.c
··· 982 982 return ret; 983 983 } 984 984 985 - static unsigned int port_fops_poll(struct file *filp, poll_table *wait) 985 + static __poll_t port_fops_poll(struct file *filp, poll_table *wait) 986 986 { 987 987 struct port *port; 988 - unsigned int ret; 988 + __poll_t ret; 989 989 990 990 port = filp->private_data; 991 991 poll_wait(filp, &port->waitqueue, wait);
+2 -2
drivers/char/xillybus/xillybus_core.c
··· 1736 1736 return pos; 1737 1737 } 1738 1738 1739 - static unsigned int xillybus_poll(struct file *filp, poll_table *wait) 1739 + static __poll_t xillybus_poll(struct file *filp, poll_table *wait) 1740 1740 { 1741 1741 struct xilly_channel *channel = filp->private_data; 1742 - unsigned int mask = 0; 1742 + __poll_t mask = 0; 1743 1743 unsigned long flags; 1744 1744 1745 1745 poll_wait(filp, &channel->endpoint->ep_wait, wait);
+3 -3
drivers/dma-buf/dma-buf.c
··· 157 157 spin_unlock_irqrestore(&dcb->poll->lock, flags); 158 158 } 159 159 160 - static unsigned int dma_buf_poll(struct file *file, poll_table *poll) 160 + static __poll_t dma_buf_poll(struct file *file, poll_table *poll) 161 161 { 162 162 struct dma_buf *dmabuf; 163 163 struct reservation_object *resv; 164 164 struct reservation_object_list *fobj; 165 165 struct dma_fence *fence_excl; 166 - unsigned long events; 166 + __poll_t events; 167 167 unsigned shared_count, seq; 168 168 169 169 dmabuf = file->private_data; ··· 195 195 196 196 if (fence_excl && (!(events & POLLOUT) || shared_count == 0)) { 197 197 struct dma_buf_poll_cb_t *dcb = &dmabuf->cb_excl; 198 - unsigned long pevents = POLLIN; 198 + __poll_t pevents = POLLIN; 199 199 200 200 if (shared_count == 0) 201 201 pevents |= POLLOUT;
+1 -1
drivers/dma-buf/sync_file.c
··· 312 312 return 0; 313 313 } 314 314 315 - static unsigned int sync_file_poll(struct file *file, poll_table *wait) 315 + static __poll_t sync_file_poll(struct file *file, poll_table *wait) 316 316 { 317 317 struct sync_file *sync_file = file->private_data; 318 318
+2 -2
drivers/firewire/core-cdev.c
··· 1784 1784 return 0; 1785 1785 } 1786 1786 1787 - static unsigned int fw_device_op_poll(struct file *file, poll_table * pt) 1787 + static __poll_t fw_device_op_poll(struct file *file, poll_table * pt) 1788 1788 { 1789 1789 struct client *client = file->private_data; 1790 - unsigned int mask = 0; 1790 + __poll_t mask = 0; 1791 1791 1792 1792 poll_wait(file, &client->wait, pt); 1793 1793
+2 -2
drivers/firewire/nosy.c
··· 328 328 return 0; 329 329 } 330 330 331 - static unsigned int 331 + static __poll_t 332 332 nosy_poll(struct file *file, poll_table *pt) 333 333 { 334 334 struct client *client = file->private_data; 335 - unsigned int ret = 0; 335 + __poll_t ret = 0; 336 336 337 337 poll_wait(file, &client->buffer.wait, pt); 338 338
+2 -2
drivers/gpio/gpiolib.c
··· 604 604 (GPIOEVENT_REQUEST_RISING_EDGE | \ 605 605 GPIOEVENT_REQUEST_FALLING_EDGE) 606 606 607 - static unsigned int lineevent_poll(struct file *filep, 607 + static __poll_t lineevent_poll(struct file *filep, 608 608 struct poll_table_struct *wait) 609 609 { 610 610 struct lineevent_state *le = filep->private_data; 611 - unsigned int events = 0; 611 + __poll_t events = 0; 612 612 613 613 poll_wait(filep, &le->wait, wait); 614 614
+2 -2
drivers/gpu/drm/drm_file.c
··· 559 559 * 560 560 * Mask of POLL flags indicating the current status of the file. 561 561 */ 562 - unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait) 562 + __poll_t drm_poll(struct file *filp, struct poll_table_struct *wait) 563 563 { 564 564 struct drm_file *file_priv = filp->private_data; 565 - unsigned int mask = 0; 565 + __poll_t mask = 0; 566 566 567 567 poll_wait(filp, &file_priv->event_wait, wait); 568 568
+4 -4
drivers/gpu/drm/i915/i915_perf.c
··· 2331 2331 * 2332 2332 * Returns: any poll events that are ready without sleeping 2333 2333 */ 2334 - static unsigned int i915_perf_poll_locked(struct drm_i915_private *dev_priv, 2334 + static __poll_t i915_perf_poll_locked(struct drm_i915_private *dev_priv, 2335 2335 struct i915_perf_stream *stream, 2336 2336 struct file *file, 2337 2337 poll_table *wait) 2338 2338 { 2339 - unsigned int events = 0; 2339 + __poll_t events = 0; 2340 2340 2341 2341 stream->ops->poll_wait(stream, file, wait); 2342 2342 ··· 2365 2365 * 2366 2366 * Returns: any poll events that are ready without sleeping 2367 2367 */ 2368 - static unsigned int i915_perf_poll(struct file *file, poll_table *wait) 2368 + static __poll_t i915_perf_poll(struct file *file, poll_table *wait) 2369 2369 { 2370 2370 struct i915_perf_stream *stream = file->private_data; 2371 2371 struct drm_i915_private *dev_priv = stream->dev_priv; 2372 - int ret; 2372 + __poll_t ret; 2373 2373 2374 2374 mutex_lock(&dev_priv->perf.lock); 2375 2375 ret = i915_perf_poll_locked(dev_priv, stream, file, wait);
+1 -1
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
··· 713 713 struct drm_file *file_priv); 714 714 extern int vmw_present_readback_ioctl(struct drm_device *dev, void *data, 715 715 struct drm_file *file_priv); 716 - extern unsigned int vmw_fops_poll(struct file *filp, 716 + extern __poll_t vmw_fops_poll(struct file *filp, 717 717 struct poll_table_struct *wait); 718 718 extern ssize_t vmw_fops_read(struct file *filp, char __user *buffer, 719 719 size_t count, loff_t *offset);
+1 -1
drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
··· 412 412 * Wrapper around the drm_poll function that makes sure the device is 413 413 * processing the fifo if drm_poll decides to wait. 414 414 */ 415 - unsigned int vmw_fops_poll(struct file *filp, struct poll_table_struct *wait) 415 + __poll_t vmw_fops_poll(struct file *filp, struct poll_table_struct *wait) 416 416 { 417 417 struct drm_file *file_priv = filp->private_data; 418 418 struct vmw_private *dev_priv =
+1 -1
drivers/gpu/vga/vgaarb.c
··· 1266 1266 return ret_val; 1267 1267 } 1268 1268 1269 - static unsigned int vga_arb_fpoll(struct file *file, poll_table *wait) 1269 + static __poll_t vga_arb_fpoll(struct file *file, poll_table *wait) 1270 1270 { 1271 1271 pr_debug("%s\n", __func__); 1272 1272
+1 -1
drivers/hid/hid-debug.c
··· 1179 1179 return ret; 1180 1180 } 1181 1181 1182 - static unsigned int hid_debug_events_poll(struct file *file, poll_table *wait) 1182 + static __poll_t hid_debug_events_poll(struct file *file, poll_table *wait) 1183 1183 { 1184 1184 struct hid_debug_list *list = file->private_data; 1185 1185
+1 -1
drivers/hid/hid-roccat.c
··· 137 137 return retval; 138 138 } 139 139 140 - static unsigned int roccat_poll(struct file *file, poll_table *wait) 140 + static __poll_t roccat_poll(struct file *file, poll_table *wait) 141 141 { 142 142 struct roccat_reader *reader = file->private_data; 143 143 poll_wait(file, &reader->device->wait, wait);
+2 -2
drivers/hid/hid-sensor-custom.c
··· 702 702 return nonseekable_open(inode, file); 703 703 } 704 704 705 - static unsigned int hid_sensor_custom_poll(struct file *file, 705 + static __poll_t hid_sensor_custom_poll(struct file *file, 706 706 struct poll_table_struct *wait) 707 707 { 708 708 struct hid_sensor_custom *sensor_inst; 709 - unsigned int mask = 0; 709 + __poll_t mask = 0; 710 710 711 711 sensor_inst = container_of(file->private_data, 712 712 struct hid_sensor_custom, custom_dev);
+1 -1
drivers/hid/hidraw.c
··· 249 249 return ret; 250 250 } 251 251 252 - static unsigned int hidraw_poll(struct file *file, poll_table *wait) 252 + static __poll_t hidraw_poll(struct file *file, poll_table *wait) 253 253 { 254 254 struct hidraw_list *list = file->private_data; 255 255
+1 -1
drivers/hid/uhid.c
··· 753 753 return ret ? ret : count; 754 754 } 755 755 756 - static unsigned int uhid_char_poll(struct file *file, poll_table *wait) 756 + static __poll_t uhid_char_poll(struct file *file, poll_table *wait) 757 757 { 758 758 struct uhid_device *uhid = file->private_data; 759 759
+1 -1
drivers/hid/usbhid/hiddev.c
··· 422 422 * "poll" file op 423 423 * No kernel lock - fine 424 424 */ 425 - static unsigned int hiddev_poll(struct file *file, poll_table *wait) 425 + static __poll_t hiddev_poll(struct file *file, poll_table *wait) 426 426 { 427 427 struct hiddev_list *list = file->private_data; 428 428
+2 -2
drivers/hsi/clients/cmt_speech.c
··· 1124 1124 return 0; 1125 1125 } 1126 1126 1127 - static unsigned int cs_char_poll(struct file *file, poll_table *wait) 1127 + static __poll_t cs_char_poll(struct file *file, poll_table *wait) 1128 1128 { 1129 1129 struct cs_char *csdata = file->private_data; 1130 - unsigned int ret = 0; 1130 + __poll_t ret = 0; 1131 1131 1132 1132 poll_wait(file, &cs_char_data.wait, wait); 1133 1133 spin_lock_bh(&csdata->lock);
+1 -1
drivers/hv/hv_utils_transport.c
··· 104 104 return ret ? ret : count; 105 105 } 106 106 107 - static unsigned int hvt_op_poll(struct file *file, poll_table *wait) 107 + static __poll_t hvt_op_poll(struct file *file, poll_table *wait) 108 108 { 109 109 struct hvutil_transport *hvt; 110 110
+1 -1
drivers/iio/iio_core.h
··· 43 43 #ifdef CONFIG_IIO_BUFFER 44 44 struct poll_table_struct; 45 45 46 - unsigned int iio_buffer_poll(struct file *filp, 46 + __poll_t iio_buffer_poll(struct file *filp, 47 47 struct poll_table_struct *wait); 48 48 ssize_t iio_buffer_read_first_n_outer(struct file *filp, char __user *buf, 49 49 size_t n, loff_t *f_ps);
+1 -1
drivers/iio/industrialio-buffer.c
··· 169 169 * Return: (POLLIN | POLLRDNORM) if data is available for reading 170 170 * or 0 for other cases 171 171 */ 172 - unsigned int iio_buffer_poll(struct file *filp, 172 + __poll_t iio_buffer_poll(struct file *filp, 173 173 struct poll_table_struct *wait) 174 174 { 175 175 struct iio_dev *indio_dev = filp->private_data;
+2 -2
drivers/iio/industrialio-event.c
··· 95 95 * Return: (POLLIN | POLLRDNORM) if data is available for reading 96 96 * or a negative error code on failure 97 97 */ 98 - static unsigned int iio_event_poll(struct file *filep, 98 + static __poll_t iio_event_poll(struct file *filep, 99 99 struct poll_table_struct *wait) 100 100 { 101 101 struct iio_dev *indio_dev = filep->private_data; 102 102 struct iio_event_interface *ev_int = indio_dev->event_interface; 103 - unsigned int events = 0; 103 + __poll_t events = 0; 104 104 105 105 if (!indio_dev->info) 106 106 return events;
+2 -2
drivers/infiniband/core/ucm.c
··· 1130 1130 return result; 1131 1131 } 1132 1132 1133 - static unsigned int ib_ucm_poll(struct file *filp, 1133 + static __poll_t ib_ucm_poll(struct file *filp, 1134 1134 struct poll_table_struct *wait) 1135 1135 { 1136 1136 struct ib_ucm_file *file = filp->private_data; 1137 - unsigned int mask = 0; 1137 + __poll_t mask = 0; 1138 1138 1139 1139 poll_wait(filp, &file->poll_wait, wait); 1140 1140
+2 -2
drivers/infiniband/core/ucma.c
··· 1630 1630 return ret; 1631 1631 } 1632 1632 1633 - static unsigned int ucma_poll(struct file *filp, struct poll_table_struct *wait) 1633 + static __poll_t ucma_poll(struct file *filp, struct poll_table_struct *wait) 1634 1634 { 1635 1635 struct ucma_file *file = filp->private_data; 1636 - unsigned int mask = 0; 1636 + __poll_t mask = 0; 1637 1637 1638 1638 poll_wait(filp, &file->poll_wait, wait); 1639 1639
+2 -2
drivers/infiniband/core/user_mad.c
··· 617 617 return ret; 618 618 } 619 619 620 - static unsigned int ib_umad_poll(struct file *filp, struct poll_table_struct *wait) 620 + static __poll_t ib_umad_poll(struct file *filp, struct poll_table_struct *wait) 621 621 { 622 622 struct ib_umad_file *file = filp->private_data; 623 623 624 624 /* we will always be able to post a MAD send */ 625 - unsigned int mask = POLLOUT | POLLWRNORM; 625 + __poll_t mask = POLLOUT | POLLWRNORM; 626 626 627 627 poll_wait(filp, &file->recv_wait, wait); 628 628
+4 -4
drivers/infiniband/core/uverbs_main.c
··· 339 339 sizeof(struct ib_uverbs_comp_event_desc)); 340 340 } 341 341 342 - static unsigned int ib_uverbs_event_poll(struct ib_uverbs_event_queue *ev_queue, 342 + static __poll_t ib_uverbs_event_poll(struct ib_uverbs_event_queue *ev_queue, 343 343 struct file *filp, 344 344 struct poll_table_struct *wait) 345 345 { 346 - unsigned int pollflags = 0; 346 + __poll_t pollflags = 0; 347 347 348 348 poll_wait(filp, &ev_queue->poll_wait, wait); 349 349 ··· 355 355 return pollflags; 356 356 } 357 357 358 - static unsigned int ib_uverbs_async_event_poll(struct file *filp, 358 + static __poll_t ib_uverbs_async_event_poll(struct file *filp, 359 359 struct poll_table_struct *wait) 360 360 { 361 361 return ib_uverbs_event_poll(filp->private_data, filp, wait); 362 362 } 363 363 364 - static unsigned int ib_uverbs_comp_event_poll(struct file *filp, 364 + static __poll_t ib_uverbs_comp_event_poll(struct file *filp, 365 365 struct poll_table_struct *wait) 366 366 { 367 367 struct ib_uverbs_completion_event_file *comp_ev_file =
+9 -9
drivers/infiniband/hw/hfi1/file_ops.c
··· 74 74 static int hfi1_file_open(struct inode *inode, struct file *fp); 75 75 static int hfi1_file_close(struct inode *inode, struct file *fp); 76 76 static ssize_t hfi1_write_iter(struct kiocb *kiocb, struct iov_iter *from); 77 - static unsigned int hfi1_poll(struct file *fp, struct poll_table_struct *pt); 77 + static __poll_t hfi1_poll(struct file *fp, struct poll_table_struct *pt); 78 78 static int hfi1_file_mmap(struct file *fp, struct vm_area_struct *vma); 79 79 80 80 static u64 kvirt_to_phys(void *addr); ··· 102 102 struct hfi1_user_info *uinfo, 103 103 struct hfi1_ctxtdata **cd); 104 104 static void deallocate_ctxt(struct hfi1_ctxtdata *uctxt); 105 - static unsigned int poll_urgent(struct file *fp, struct poll_table_struct *pt); 106 - static unsigned int poll_next(struct file *fp, struct poll_table_struct *pt); 105 + static __poll_t poll_urgent(struct file *fp, struct poll_table_struct *pt); 106 + static __poll_t poll_next(struct file *fp, struct poll_table_struct *pt); 107 107 static int user_event_ack(struct hfi1_ctxtdata *uctxt, u16 subctxt, 108 108 unsigned long arg); 109 109 static int set_ctxt_pkey(struct hfi1_ctxtdata *uctxt, unsigned long arg); ··· 607 607 return 0; 608 608 } 609 609 610 - static unsigned int hfi1_poll(struct file *fp, struct poll_table_struct *pt) 610 + static __poll_t hfi1_poll(struct file *fp, struct poll_table_struct *pt) 611 611 { 612 612 struct hfi1_ctxtdata *uctxt; 613 - unsigned pollflag; 613 + __poll_t pollflag; 614 614 615 615 uctxt = ((struct hfi1_filedata *)fp->private_data)->uctxt; 616 616 if (!uctxt) ··· 1425 1425 return ret; 1426 1426 } 1427 1427 1428 - static unsigned int poll_urgent(struct file *fp, 1428 + static __poll_t poll_urgent(struct file *fp, 1429 1429 struct poll_table_struct *pt) 1430 1430 { 1431 1431 struct hfi1_filedata *fd = fp->private_data; 1432 1432 struct hfi1_ctxtdata *uctxt = fd->uctxt; 1433 1433 struct hfi1_devdata *dd = uctxt->dd; 1434 - unsigned pollflag; 1434 + __poll_t pollflag; 1435 1435 1436 1436 poll_wait(fp, &uctxt->wait, pt); 1437 1437 ··· 1448 1448 return pollflag; 1449 1449 } 1450 1450 1451 - static unsigned int poll_next(struct file *fp, 1451 + static __poll_t poll_next(struct file *fp, 1452 1452 struct poll_table_struct *pt) 1453 1453 { 1454 1454 struct hfi1_filedata *fd = fp->private_data; 1455 1455 struct hfi1_ctxtdata *uctxt = fd->uctxt; 1456 1456 struct hfi1_devdata *dd = uctxt->dd; 1457 - unsigned pollflag; 1457 + __poll_t pollflag; 1458 1458 1459 1459 poll_wait(fp, &uctxt->wait, pt); 1460 1460
+7 -7
drivers/infiniband/hw/qib/qib_file_ops.c
··· 58 58 static int qib_close(struct inode *, struct file *); 59 59 static ssize_t qib_write(struct file *, const char __user *, size_t, loff_t *); 60 60 static ssize_t qib_write_iter(struct kiocb *, struct iov_iter *); 61 - static unsigned int qib_poll(struct file *, struct poll_table_struct *); 61 + static __poll_t qib_poll(struct file *, struct poll_table_struct *); 62 62 static int qib_mmapf(struct file *, struct vm_area_struct *); 63 63 64 64 /* ··· 1092 1092 return ret; 1093 1093 } 1094 1094 1095 - static unsigned int qib_poll_urgent(struct qib_ctxtdata *rcd, 1095 + static __poll_t qib_poll_urgent(struct qib_ctxtdata *rcd, 1096 1096 struct file *fp, 1097 1097 struct poll_table_struct *pt) 1098 1098 { 1099 1099 struct qib_devdata *dd = rcd->dd; 1100 - unsigned pollflag; 1100 + __poll_t pollflag; 1101 1101 1102 1102 poll_wait(fp, &rcd->wait, pt); 1103 1103 ··· 1114 1114 return pollflag; 1115 1115 } 1116 1116 1117 - static unsigned int qib_poll_next(struct qib_ctxtdata *rcd, 1117 + static __poll_t qib_poll_next(struct qib_ctxtdata *rcd, 1118 1118 struct file *fp, 1119 1119 struct poll_table_struct *pt) 1120 1120 { 1121 1121 struct qib_devdata *dd = rcd->dd; 1122 - unsigned pollflag; 1122 + __poll_t pollflag; 1123 1123 1124 1124 poll_wait(fp, &rcd->wait, pt); 1125 1125 ··· 1135 1135 return pollflag; 1136 1136 } 1137 1137 1138 - static unsigned int qib_poll(struct file *fp, struct poll_table_struct *pt) 1138 + static __poll_t qib_poll(struct file *fp, struct poll_table_struct *pt) 1139 1139 { 1140 1140 struct qib_ctxtdata *rcd; 1141 - unsigned pollflag; 1141 + __poll_t pollflag; 1142 1142 1143 1143 rcd = ctxt_fp(fp); 1144 1144 if (!rcd)
+2 -2
drivers/input/evdev.c
··· 635 635 } 636 636 637 637 /* No kernel lock - fine */ 638 - static unsigned int evdev_poll(struct file *file, poll_table *wait) 638 + static __poll_t evdev_poll(struct file *file, poll_table *wait) 639 639 { 640 640 struct evdev_client *client = file->private_data; 641 641 struct evdev *evdev = client->evdev; 642 - unsigned int mask; 642 + __poll_t mask; 643 643 644 644 poll_wait(file, &evdev->wait, wait); 645 645
+1 -1
drivers/input/input.c
··· 1048 1048 wake_up(&input_devices_poll_wait); 1049 1049 } 1050 1050 1051 - static unsigned int input_proc_devices_poll(struct file *file, poll_table *wait) 1051 + static __poll_t input_proc_devices_poll(struct file *file, poll_table *wait) 1052 1052 { 1053 1053 poll_wait(file, &input_devices_poll_wait, wait); 1054 1054 if (file->f_version != input_devices_state) {
+1 -1
drivers/input/joydev.c
··· 436 436 } 437 437 438 438 /* No kernel lock - fine */ 439 - static unsigned int joydev_poll(struct file *file, poll_table *wait) 439 + static __poll_t joydev_poll(struct file *file, poll_table *wait) 440 440 { 441 441 struct joydev_client *client = file->private_data; 442 442 struct joydev *joydev = client->joydev;
+1 -1
drivers/input/misc/hp_sdc_rtc.c
··· 408 408 return retval; 409 409 } 410 410 411 - static unsigned int hp_sdc_rtc_poll(struct file *file, poll_table *wait) 411 + static __poll_t hp_sdc_rtc_poll(struct file *file, poll_table *wait) 412 412 { 413 413 unsigned long l; 414 414
+1 -1
drivers/input/misc/uinput.c
··· 694 694 return retval; 695 695 } 696 696 697 - static unsigned int uinput_poll(struct file *file, poll_table *wait) 697 + static __poll_t uinput_poll(struct file *file, poll_table *wait) 698 698 { 699 699 struct uinput_device *udev = file->private_data; 700 700
+2 -2
drivers/input/mousedev.c
··· 757 757 } 758 758 759 759 /* No kernel lock - fine */ 760 - static unsigned int mousedev_poll(struct file *file, poll_table *wait) 760 + static __poll_t mousedev_poll(struct file *file, poll_table *wait) 761 761 { 762 762 struct mousedev_client *client = file->private_data; 763 763 struct mousedev *mousedev = client->mousedev; 764 - unsigned int mask; 764 + __poll_t mask; 765 765 766 766 poll_wait(file, &mousedev->wait, wait); 767 767
+2 -2
drivers/input/serio/serio_raw.c
··· 239 239 return retval; 240 240 } 241 241 242 - static unsigned int serio_raw_poll(struct file *file, poll_table *wait) 242 + static __poll_t serio_raw_poll(struct file *file, poll_table *wait) 243 243 { 244 244 struct serio_raw_client *client = file->private_data; 245 245 struct serio_raw *serio_raw = client->serio_raw; 246 - unsigned int mask; 246 + __poll_t mask; 247 247 248 248 poll_wait(file, &serio_raw->wait, wait); 249 249
+1 -1
drivers/input/serio/userio.c
··· 248 248 return error ?: count; 249 249 } 250 250 251 - static unsigned int userio_char_poll(struct file *file, poll_table *wait) 251 + static __poll_t userio_char_poll(struct file *file, poll_table *wait) 252 252 { 253 253 struct userio_device *userio = file->private_data; 254 254
+2 -2
drivers/isdn/capi/capi.c
··· 724 724 return count; 725 725 } 726 726 727 - static unsigned int 727 + static __poll_t 728 728 capi_poll(struct file *file, poll_table *wait) 729 729 { 730 730 struct capidev *cdev = file->private_data; 731 - unsigned int mask = 0; 731 + __poll_t mask = 0; 732 732 733 733 if (!cdev->ap.applid) 734 734 return POLLERR;
+2 -2
drivers/isdn/divert/divert_procfs.c
··· 119 119 /***************************************/ 120 120 /* select routines for various kernels */ 121 121 /***************************************/ 122 - static unsigned int 122 + static __poll_t 123 123 isdn_divert_poll(struct file *file, poll_table *wait) 124 124 { 125 - unsigned int mask = 0; 125 + __poll_t mask = 0; 126 126 127 127 poll_wait(file, &(rd_queue), wait); 128 128 /* mask = POLLOUT | POLLWRNORM; */
+2 -2
drivers/isdn/hardware/eicon/divamnt.c
··· 98 98 /* 99 99 * device node operations 100 100 */ 101 - static unsigned int maint_poll(struct file *file, poll_table *wait) 101 + static __poll_t maint_poll(struct file *file, poll_table *wait) 102 102 { 103 - unsigned int mask = 0; 103 + __poll_t mask = 0; 104 104 105 105 poll_wait(file, &msgwaitq, wait); 106 106 mask = POLLOUT | POLLWRNORM;
+2 -2
drivers/isdn/hardware/eicon/divasi.c
··· 74 74 loff_t *offset); 75 75 static ssize_t um_idi_write(struct file *file, const char __user *buf, 76 76 size_t count, loff_t *offset); 77 - static unsigned int um_idi_poll(struct file *file, poll_table *wait); 77 + static __poll_t um_idi_poll(struct file *file, poll_table *wait); 78 78 static int um_idi_open(struct inode *inode, struct file *file); 79 79 static int um_idi_release(struct inode *inode, struct file *file); 80 80 static int remove_entity(void *entity); ··· 365 365 return (ret); 366 366 } 367 367 368 - static unsigned int um_idi_poll(struct file *file, poll_table *wait) 368 + static __poll_t um_idi_poll(struct file *file, poll_table *wait) 369 369 { 370 370 diva_um_idi_os_context_t *p_os; 371 371
+1 -1
drivers/isdn/hardware/eicon/divasmain.c
··· 650 650 return (ret); 651 651 } 652 652 653 - static unsigned int divas_poll(struct file *file, poll_table *wait) 653 + static __poll_t divas_poll(struct file *file, poll_table *wait) 654 654 { 655 655 if (!file->private_data) { 656 656 return (POLLERR);
+1 -1
drivers/isdn/hardware/eicon/divasproc.c
··· 99 99 return (-ENODEV); 100 100 } 101 101 102 - static unsigned int divas_poll(struct file *file, poll_table *wait) 102 + static __poll_t divas_poll(struct file *file, poll_table *wait) 103 103 { 104 104 return (POLLERR); 105 105 }
+2 -2
drivers/isdn/hysdn/hysdn_proclog.c
··· 281 281 /*************************************************/ 282 282 /* select/poll routine to be able using select() */ 283 283 /*************************************************/ 284 - static unsigned int 284 + static __poll_t 285 285 hysdn_log_poll(struct file *file, poll_table *wait) 286 286 { 287 - unsigned int mask = 0; 287 + __poll_t mask = 0; 288 288 hysdn_card *card = PDE_DATA(file_inode(file)); 289 289 struct procdata *pd = card->proclog; 290 290
+2 -2
drivers/isdn/i4l/isdn_common.c
··· 1227 1227 return retval; 1228 1228 } 1229 1229 1230 - static unsigned int 1230 + static __poll_t 1231 1231 isdn_poll(struct file *file, poll_table *wait) 1232 1232 { 1233 - unsigned int mask = 0; 1233 + __poll_t mask = 0; 1234 1234 unsigned int minor = iminor(file_inode(file)); 1235 1235 int drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL); 1236 1236
+2 -2
drivers/isdn/i4l/isdn_ppp.c
··· 685 685 return 0; 686 686 } 687 687 688 - unsigned int 688 + __poll_t 689 689 isdn_ppp_poll(struct file *file, poll_table *wait) 690 690 { 691 - u_int mask; 691 + __poll_t mask; 692 692 struct ippp_buf_queue *bf, *bl; 693 693 u_long flags; 694 694 struct ippp_struct *is;
+1 -1
drivers/isdn/i4l/isdn_ppp.h
··· 23 23 extern int isdn_ppp_xmit(struct sk_buff *, struct net_device *); 24 24 extern void isdn_ppp_receive(isdn_net_dev *, isdn_net_local *, struct sk_buff *); 25 25 extern int isdn_ppp_dev_ioctl(struct net_device *, struct ifreq *, int); 26 - extern unsigned int isdn_ppp_poll(struct file *, struct poll_table_struct *); 26 + extern __poll_t isdn_ppp_poll(struct file *, struct poll_table_struct *); 27 27 extern int isdn_ppp_ioctl(int, struct file *, unsigned int, unsigned long); 28 28 extern void isdn_ppp_release(int, struct file *); 29 29 extern int isdn_ppp_dial_slave(char *);
+2 -2
drivers/isdn/mISDN/timerdev.c
··· 141 141 return ret; 142 142 } 143 143 144 - static unsigned int 144 + static __poll_t 145 145 mISDN_poll(struct file *filep, poll_table *wait) 146 146 { 147 147 struct mISDNtimerdev *dev = filep->private_data; 148 - unsigned int mask = POLLERR; 148 + __poll_t mask = POLLERR; 149 149 150 150 if (*debug & DEBUG_TIMER) 151 151 printk(KERN_DEBUG "%s(%p, %p)\n", __func__, filep, wait);
+1 -1
drivers/leds/uleds.c
··· 176 176 return retval; 177 177 } 178 178 179 - static unsigned int uleds_poll(struct file *file, poll_table *wait) 179 + static __poll_t uleds_poll(struct file *file, poll_table *wait) 180 180 { 181 181 struct uleds_device *udev = file->private_data; 182 182
+2 -2
drivers/macintosh/smu.c
··· 1245 1245 return -EBADFD; 1246 1246 } 1247 1247 1248 - static unsigned int smu_fpoll(struct file *file, poll_table *wait) 1248 + static __poll_t smu_fpoll(struct file *file, poll_table *wait) 1249 1249 { 1250 1250 struct smu_private *pp = file->private_data; 1251 - unsigned int mask = 0; 1251 + __poll_t mask = 0; 1252 1252 unsigned long flags; 1253 1253 1254 1254 if (pp == 0)
+2 -2
drivers/macintosh/via-pmu.c
··· 2157 2157 return 0; 2158 2158 } 2159 2159 2160 - static unsigned int 2160 + static __poll_t 2161 2161 pmu_fpoll(struct file *filp, poll_table *wait) 2162 2162 { 2163 2163 struct pmu_private *pp = filp->private_data; 2164 - unsigned int mask = 0; 2164 + __poll_t mask = 0; 2165 2165 unsigned long flags; 2166 2166 2167 2167 if (pp == 0)
+1 -1
drivers/mailbox/mailbox-test.c
··· 235 235 return ret; 236 236 } 237 237 238 - static unsigned int 238 + static __poll_t 239 239 mbox_test_message_poll(struct file *filp, struct poll_table_struct *wait) 240 240 { 241 241 struct mbox_test_device *tdev = filp->private_data;
+2 -2
drivers/md/dm-ioctl.c
··· 1929 1929 return 0; 1930 1930 } 1931 1931 1932 - static unsigned dm_poll(struct file *filp, poll_table *wait) 1932 + static __poll_t dm_poll(struct file *filp, poll_table *wait) 1933 1933 { 1934 1934 struct dm_file *priv = filp->private_data; 1935 - unsigned mask = 0; 1935 + __poll_t mask = 0; 1936 1936 1937 1937 poll_wait(filp, &dm_global_eventq, wait); 1938 1938
+2 -2
drivers/md/md.c
··· 7871 7871 } 7872 7872 7873 7873 static int md_unloading; 7874 - static unsigned int mdstat_poll(struct file *filp, poll_table *wait) 7874 + static __poll_t mdstat_poll(struct file *filp, poll_table *wait) 7875 7875 { 7876 7876 struct seq_file *seq = filp->private_data; 7877 - int mask; 7877 + __poll_t mask; 7878 7878 7879 7879 if (md_unloading) 7880 7880 return POLLIN|POLLRDNORM|POLLERR|POLLPRI;
+2 -2
drivers/media/cec/cec-api.c
··· 43 43 44 44 /* CEC file operations */ 45 45 46 - static unsigned int cec_poll(struct file *filp, 46 + static __poll_t cec_poll(struct file *filp, 47 47 struct poll_table_struct *poll) 48 48 { 49 49 struct cec_devnode *devnode = cec_devnode_data(filp); 50 50 struct cec_fh *fh = filp->private_data; 51 51 struct cec_adapter *adap = fh->adap; 52 - unsigned int res = 0; 52 + __poll_t res = 0; 53 53 54 54 if (!devnode->registered) 55 55 return POLLERR | POLLHUP;
+4 -4
drivers/media/common/saa7146/saa7146_fops.c
··· 320 320 return res; 321 321 } 322 322 323 - static unsigned int __fops_poll(struct file *file, struct poll_table_struct *wait) 323 + static __poll_t __fops_poll(struct file *file, struct poll_table_struct *wait) 324 324 { 325 325 struct video_device *vdev = video_devdata(file); 326 326 struct saa7146_fh *fh = file->private_data; 327 327 struct videobuf_buffer *buf = NULL; 328 328 struct videobuf_queue *q; 329 - unsigned int res = v4l2_ctrl_poll(file, wait); 329 + __poll_t res = v4l2_ctrl_poll(file, wait); 330 330 331 331 DEB_EE("file:%p, poll:%p\n", file, wait); 332 332 ··· 359 359 return res; 360 360 } 361 361 362 - static unsigned int fops_poll(struct file *file, struct poll_table_struct *wait) 362 + static __poll_t fops_poll(struct file *file, struct poll_table_struct *wait) 363 363 { 364 364 struct video_device *vdev = video_devdata(file); 365 - unsigned int res; 365 + __poll_t res; 366 366 367 367 mutex_lock(vdev->lock); 368 368 res = __fops_poll(file, wait);
+2 -5
drivers/media/common/siano/smsdvb-debugfs.c
··· 374 374 return rc; 375 375 } 376 376 377 - static unsigned int smsdvb_stats_poll(struct file *file, poll_table *wait) 377 + static __poll_t smsdvb_stats_poll(struct file *file, poll_table *wait) 378 378 { 379 379 struct smsdvb_debugfs *debug_data = file->private_data; 380 380 int rc; ··· 384 384 poll_wait(file, &debug_data->stats_queue, wait); 385 385 386 386 rc = smsdvb_stats_wait_read(debug_data); 387 - if (rc > 0) 388 - rc = POLLIN | POLLRDNORM; 389 - 390 387 kref_put(&debug_data->refcount, smsdvb_debugfs_data_release); 391 388 392 - return rc; 389 + return rc > 0 ? POLLIN | POLLRDNORM : 0; 393 390 } 394 391 395 392 static ssize_t smsdvb_stats_read(struct file *file, char __user *user_buf,
+4 -4
drivers/media/dvb-core/dmxdev.c
··· 1066 1066 return dvb_usercopy(file, cmd, arg, dvb_demux_do_ioctl); 1067 1067 } 1068 1068 1069 - static unsigned int dvb_demux_poll(struct file *file, poll_table *wait) 1069 + static __poll_t dvb_demux_poll(struct file *file, poll_table *wait) 1070 1070 { 1071 1071 struct dmxdev_filter *dmxdevfilter = file->private_data; 1072 - unsigned int mask = 0; 1072 + __poll_t mask = 0; 1073 1073 1074 1074 if ((!dmxdevfilter) || dmxdevfilter->dev->exit) 1075 1075 return POLLERR; ··· 1160 1160 return dvb_usercopy(file, cmd, arg, dvb_dvr_do_ioctl); 1161 1161 } 1162 1162 1163 - static unsigned int dvb_dvr_poll(struct file *file, poll_table *wait) 1163 + static __poll_t dvb_dvr_poll(struct file *file, poll_table *wait) 1164 1164 { 1165 1165 struct dvb_device *dvbdev = file->private_data; 1166 1166 struct dmxdev *dmxdev = dvbdev->priv; 1167 - unsigned int mask = 0; 1167 + __poll_t mask = 0; 1168 1168 1169 1169 dprintk("%s\n", __func__); 1170 1170
+2 -2
drivers/media/dvb-core/dvb_ca_en50221.c
··· 1782 1782 * 1783 1783 * return: Standard poll mask. 1784 1784 */ 1785 - static unsigned int dvb_ca_en50221_io_poll(struct file *file, poll_table *wait) 1785 + static __poll_t dvb_ca_en50221_io_poll(struct file *file, poll_table *wait) 1786 1786 { 1787 1787 struct dvb_device *dvbdev = file->private_data; 1788 1788 struct dvb_ca_private *ca = dvbdev->priv; 1789 - unsigned int mask = 0; 1789 + __poll_t mask = 0; 1790 1790 int slot; 1791 1791 int result = 0; 1792 1792
+1 -1
drivers/media/dvb-core/dvb_frontend.c
··· 2470 2470 } 2471 2471 2472 2472 2473 - static unsigned int dvb_frontend_poll(struct file *file, struct poll_table_struct *wait) 2473 + static __poll_t dvb_frontend_poll(struct file *file, struct poll_table_struct *wait) 2474 2474 { 2475 2475 struct dvb_device *dvbdev = file->private_data; 2476 2476 struct dvb_frontend *fe = dvbdev->priv;
+1 -1
drivers/media/firewire/firedtv-ci.c
··· 207 207 return err; 208 208 } 209 209 210 - static unsigned int fdtv_ca_io_poll(struct file *file, poll_table *wait) 210 + static __poll_t fdtv_ca_io_poll(struct file *file, poll_table *wait) 211 211 { 212 212 return POLLIN; 213 213 }
+1 -1
drivers/media/media-devnode.c
··· 99 99 return devnode->fops->write(filp, buf, sz, off); 100 100 } 101 101 102 - static unsigned int media_poll(struct file *filp, 102 + static __poll_t media_poll(struct file *filp, 103 103 struct poll_table_struct *poll) 104 104 { 105 105 struct media_devnode *devnode = media_devnode_data(filp);
+6 -6
drivers/media/pci/bt8xx/bttv-driver.c
··· 2955 2955 return retval; 2956 2956 } 2957 2957 2958 - static unsigned int bttv_poll(struct file *file, poll_table *wait) 2958 + static __poll_t bttv_poll(struct file *file, poll_table *wait) 2959 2959 { 2960 2960 struct bttv_fh *fh = file->private_data; 2961 2961 struct bttv_buffer *buf; 2962 2962 enum v4l2_field field; 2963 - unsigned int rc = 0; 2964 - unsigned long req_events = poll_requested_events(wait); 2963 + __poll_t rc = 0; 2964 + __poll_t req_events = poll_requested_events(wait); 2965 2965 2966 2966 if (v4l2_event_pending(&fh->fh)) 2967 2967 rc = POLLPRI; ··· 3329 3329 return cmd.result; 3330 3330 } 3331 3331 3332 - static unsigned int radio_poll(struct file *file, poll_table *wait) 3332 + static __poll_t radio_poll(struct file *file, poll_table *wait) 3333 3333 { 3334 3334 struct bttv_fh *fh = file->private_data; 3335 3335 struct bttv *btv = fh->btv; 3336 - unsigned long req_events = poll_requested_events(wait); 3336 + __poll_t req_events = poll_requested_events(wait); 3337 3337 struct saa6588_command cmd; 3338 - unsigned int res = 0; 3338 + __poll_t res = 0; 3339 3339 3340 3340 if (v4l2_event_pending(&fh->fh)) 3341 3341 res = POLLPRI;
+4 -4
drivers/media/pci/cx18/cx18-fileops.c
··· 602 602 return cx18_read_pos(s, buf, count, pos, filp->f_flags & O_NONBLOCK); 603 603 } 604 604 605 - unsigned int cx18_v4l2_enc_poll(struct file *filp, poll_table *wait) 605 + __poll_t cx18_v4l2_enc_poll(struct file *filp, poll_table *wait) 606 606 { 607 - unsigned long req_events = poll_requested_events(wait); 607 + __poll_t req_events = poll_requested_events(wait); 608 608 struct cx18_open_id *id = file2id(filp); 609 609 struct cx18 *cx = id->cx; 610 610 struct cx18_stream *s = &cx->streams[id->type]; 611 611 int eof = test_bit(CX18_F_S_STREAMOFF, &s->s_flags); 612 - unsigned res = 0; 612 + __poll_t res = 0; 613 613 614 614 /* Start a capture if there is none */ 615 615 if (!eof && !test_bit(CX18_F_S_STREAMING, &s->s_flags) && ··· 629 629 630 630 if ((s->vb_type == V4L2_BUF_TYPE_VIDEO_CAPTURE) && 631 631 (id->type == CX18_ENC_STREAM_TYPE_YUV)) { 632 - int videobuf_poll = videobuf_poll_stream(filp, &s->vbuf_q, wait); 632 + __poll_t videobuf_poll = videobuf_poll_stream(filp, &s->vbuf_q, wait); 633 633 634 634 if (v4l2_event_pending(&id->fh)) 635 635 res |= POLLPRI;
+1 -1
drivers/media/pci/cx18/cx18-fileops.h
··· 23 23 ssize_t cx18_v4l2_write(struct file *filp, const char __user *buf, size_t count, 24 24 loff_t *pos); 25 25 int cx18_v4l2_close(struct file *filp); 26 - unsigned int cx18_v4l2_enc_poll(struct file *filp, poll_table *wait); 26 + __poll_t cx18_v4l2_enc_poll(struct file *filp, poll_table *wait); 27 27 int cx18_start_capture(struct cx18_open_id *id); 28 28 void cx18_stop_capture(struct cx18_open_id *id, int gop_end); 29 29 void cx18_mute(struct cx18 *cx);
+2 -2
drivers/media/pci/ddbridge/ddbridge-core.c
··· 732 732 return (count && (left == count)) ? -EAGAIN : (count - left); 733 733 } 734 734 735 - static unsigned int ts_poll(struct file *file, poll_table *wait) 735 + static __poll_t ts_poll(struct file *file, poll_table *wait) 736 736 { 737 737 struct dvb_device *dvbdev = file->private_data; 738 738 struct ddb_output *output = dvbdev->priv; 739 739 struct ddb_input *input = output->port->input[0]; 740 740 741 - unsigned int mask = 0; 741 + __poll_t mask = 0; 742 742 743 743 poll_wait(file, &input->dma->wq, wait); 744 744 poll_wait(file, &output->dma->wq, wait);
+5 -5
drivers/media/pci/ivtv/ivtv-fileops.c
··· 730 730 return res; 731 731 } 732 732 733 - unsigned int ivtv_v4l2_dec_poll(struct file *filp, poll_table *wait) 733 + __poll_t ivtv_v4l2_dec_poll(struct file *filp, poll_table *wait) 734 734 { 735 735 struct ivtv_open_id *id = fh2id(filp->private_data); 736 736 struct ivtv *itv = id->itv; 737 737 struct ivtv_stream *s = &itv->streams[id->type]; 738 - int res = 0; 738 + __poll_t res = 0; 739 739 740 740 /* add stream's waitq to the poll list */ 741 741 IVTV_DEBUG_HI_FILE("Decoder poll\n"); ··· 764 764 return res; 765 765 } 766 766 767 - unsigned int ivtv_v4l2_enc_poll(struct file *filp, poll_table *wait) 767 + __poll_t ivtv_v4l2_enc_poll(struct file *filp, poll_table *wait) 768 768 { 769 - unsigned long req_events = poll_requested_events(wait); 769 + __poll_t req_events = poll_requested_events(wait); 770 770 struct ivtv_open_id *id = fh2id(filp->private_data); 771 771 struct ivtv *itv = id->itv; 772 772 struct ivtv_stream *s = &itv->streams[id->type]; 773 773 int eof = test_bit(IVTV_F_S_STREAMOFF, &s->s_flags); 774 - unsigned res = 0; 774 + __poll_t res = 0; 775 775 776 776 /* Start a capture if there is none */ 777 777 if (!eof && !test_bit(IVTV_F_S_STREAMING, &s->s_flags) &&
+2 -2
drivers/media/pci/ivtv/ivtv-fileops.h
··· 28 28 ssize_t ivtv_v4l2_write(struct file *filp, const char __user *buf, size_t count, 29 29 loff_t * pos); 30 30 int ivtv_v4l2_close(struct file *filp); 31 - unsigned int ivtv_v4l2_enc_poll(struct file *filp, poll_table * wait); 32 - unsigned int ivtv_v4l2_dec_poll(struct file *filp, poll_table * wait); 31 + __poll_t ivtv_v4l2_enc_poll(struct file *filp, poll_table * wait); 32 + __poll_t ivtv_v4l2_dec_poll(struct file *filp, poll_table * wait); 33 33 int ivtv_start_capture(struct ivtv_open_id *id); 34 34 void ivtv_stop_capture(struct ivtv_open_id *id, int gop_end); 35 35 int ivtv_start_decoding(struct ivtv_open_id *id, int speed);
+2 -2
drivers/media/pci/meye/meye.c
··· 1423 1423 1424 1424 } 1425 1425 1426 - static unsigned int meye_poll(struct file *file, poll_table *wait) 1426 + static __poll_t meye_poll(struct file *file, poll_table *wait) 1427 1427 { 1428 - unsigned int res = v4l2_ctrl_poll(file, wait); 1428 + __poll_t res = v4l2_ctrl_poll(file, wait); 1429 1429 1430 1430 mutex_lock(&meye.lock); 1431 1431 poll_wait(file, &meye.proc_list, wait);
+2 -2
drivers/media/pci/saa7134/saa7134-video.c
··· 1227 1227 return cmd.result; 1228 1228 } 1229 1229 1230 - static unsigned int radio_poll(struct file *file, poll_table *wait) 1230 + static __poll_t radio_poll(struct file *file, poll_table *wait) 1231 1231 { 1232 1232 struct saa7134_dev *dev = video_drvdata(file); 1233 1233 struct saa6588_command cmd; 1234 - unsigned int rc = v4l2_ctrl_poll(file, wait); 1234 + __poll_t rc = v4l2_ctrl_poll(file, wait); 1235 1235 1236 1236 cmd.instance = file; 1237 1237 cmd.event_list = wait;
+3 -3
drivers/media/pci/saa7164/saa7164-encoder.c
··· 909 909 return ret; 910 910 } 911 911 912 - static unsigned int fops_poll(struct file *file, poll_table *wait) 912 + static __poll_t fops_poll(struct file *file, poll_table *wait) 913 913 { 914 - unsigned long req_events = poll_requested_events(wait); 914 + __poll_t req_events = poll_requested_events(wait); 915 915 struct saa7164_encoder_fh *fh = 916 916 (struct saa7164_encoder_fh *)file->private_data; 917 917 struct saa7164_port *port = fh->port; 918 - unsigned int mask = v4l2_ctrl_poll(file, wait); 918 + __poll_t mask = v4l2_ctrl_poll(file, wait); 919 919 920 920 port->last_poll_msecs_diff = port->last_poll_msecs; 921 921 port->last_poll_msecs = jiffies_to_msecs(jiffies);
+2 -2
drivers/media/pci/saa7164/saa7164-vbi.c
··· 614 614 return ret; 615 615 } 616 616 617 - static unsigned int fops_poll(struct file *file, poll_table *wait) 617 + static __poll_t fops_poll(struct file *file, poll_table *wait) 618 618 { 619 619 struct saa7164_vbi_fh *fh = (struct saa7164_vbi_fh *)file->private_data; 620 620 struct saa7164_port *port = fh->port; 621 - unsigned int mask = 0; 621 + __poll_t mask = 0; 622 622 623 623 port->last_poll_msecs_diff = port->last_poll_msecs; 624 624 port->last_poll_msecs = jiffies_to_msecs(jiffies);
+4 -4
drivers/media/pci/ttpci/av7110_av.c
··· 937 937 * DVB device file operations 938 938 ******************************************************************************/ 939 939 940 - static unsigned int dvb_video_poll(struct file *file, poll_table *wait) 940 + static __poll_t dvb_video_poll(struct file *file, poll_table *wait) 941 941 { 942 942 struct dvb_device *dvbdev = file->private_data; 943 943 struct av7110 *av7110 = dvbdev->priv; 944 - unsigned int mask = 0; 944 + __poll_t mask = 0; 945 945 946 946 dprintk(2, "av7110:%p, \n", av7110); 947 947 ··· 989 989 return dvb_play(av7110, buf, count, file->f_flags & O_NONBLOCK, 1); 990 990 } 991 991 992 - static unsigned int dvb_audio_poll(struct file *file, poll_table *wait) 992 + static __poll_t dvb_audio_poll(struct file *file, poll_table *wait) 993 993 { 994 994 struct dvb_device *dvbdev = file->private_data; 995 995 struct av7110 *av7110 = dvbdev->priv; 996 - unsigned int mask = 0; 996 + __poll_t mask = 0; 997 997 998 998 dprintk(2, "av7110:%p, \n", av7110); 999 999
+2 -2
drivers/media/pci/ttpci/av7110_ca.c
··· 223 223 return 0; 224 224 } 225 225 226 - static unsigned int dvb_ca_poll (struct file *file, poll_table *wait) 226 + static __poll_t dvb_ca_poll (struct file *file, poll_table *wait) 227 227 { 228 228 struct dvb_device *dvbdev = file->private_data; 229 229 struct av7110 *av7110 = dvbdev->priv; 230 230 struct dvb_ringbuffer *rbuf = &av7110->ci_rbuffer; 231 231 struct dvb_ringbuffer *wbuf = &av7110->ci_wbuffer; 232 - unsigned int mask = 0; 232 + __poll_t mask = 0; 233 233 234 234 dprintk(8, "av7110:%p\n",av7110); 235 235
+2 -2
drivers/media/pci/zoran/zoran_driver.c
··· 2501 2501 return res; 2502 2502 } 2503 2503 2504 - static unsigned int 2504 + static __poll_t 2505 2505 zoran_poll (struct file *file, 2506 2506 poll_table *wait) 2507 2507 { 2508 2508 struct zoran_fh *fh = file->private_data; 2509 2509 struct zoran *zr = fh->zr; 2510 - int res = v4l2_ctrl_poll(file, wait); 2510 + __poll_t res = v4l2_ctrl_poll(file, wait); 2511 2511 int frame; 2512 2512 unsigned long flags; 2513 2513
+1 -1
drivers/media/platform/davinci/vpfe_capture.c
··· 730 730 /* 731 731 * vpfe_poll: It is used for select/poll system call 732 732 */ 733 - static unsigned int vpfe_poll(struct file *file, poll_table *wait) 733 + static __poll_t vpfe_poll(struct file *file, poll_table *wait) 734 734 { 735 735 struct vpfe_device *vpfe_dev = video_drvdata(file); 736 736
+2 -2
drivers/media/platform/exynos-gsc/gsc-m2m.c
··· 707 707 return 0; 708 708 } 709 709 710 - static unsigned int gsc_m2m_poll(struct file *file, 710 + static __poll_t gsc_m2m_poll(struct file *file, 711 711 struct poll_table_struct *wait) 712 712 { 713 713 struct gsc_ctx *ctx = fh_to_ctx(file->private_data); 714 714 struct gsc_dev *gsc = ctx->gsc_dev; 715 - unsigned int ret; 715 + __poll_t ret; 716 716 717 717 if (mutex_lock_interruptible(&gsc->lock)) 718 718 return -ERESTARTSYS;
+3 -3
drivers/media/platform/fsl-viu.c
··· 1263 1263 return 0; 1264 1264 } 1265 1265 1266 - static unsigned int viu_poll(struct file *file, struct poll_table_struct *wait) 1266 + static __poll_t viu_poll(struct file *file, struct poll_table_struct *wait) 1267 1267 { 1268 1268 struct viu_fh *fh = file->private_data; 1269 1269 struct videobuf_queue *q = &fh->vb_vidq; 1270 1270 struct viu_dev *dev = fh->dev; 1271 - unsigned long req_events = poll_requested_events(wait); 1272 - unsigned int res = v4l2_ctrl_poll(file, wait); 1271 + __poll_t req_events = poll_requested_events(wait); 1272 + __poll_t res = v4l2_ctrl_poll(file, wait); 1273 1273 1274 1274 if (V4L2_BUF_TYPE_VIDEO_CAPTURE != fh->type) 1275 1275 return POLLERR;
+2 -2
drivers/media/platform/m2m-deinterlace.c
··· 950 950 return 0; 951 951 } 952 952 953 - static unsigned int deinterlace_poll(struct file *file, 953 + static __poll_t deinterlace_poll(struct file *file, 954 954 struct poll_table_struct *wait) 955 955 { 956 956 struct deinterlace_ctx *ctx = file->private_data; 957 - int ret; 957 + __poll_t ret; 958 958 959 959 deinterlace_lock(ctx); 960 960 ret = v4l2_m2m_poll(file, ctx->m2m_ctx, wait);
+2 -2
drivers/media/platform/mx2_emmaprp.c
··· 838 838 return 0; 839 839 } 840 840 841 - static unsigned int emmaprp_poll(struct file *file, 841 + static __poll_t emmaprp_poll(struct file *file, 842 842 struct poll_table_struct *wait) 843 843 { 844 844 struct emmaprp_dev *pcdev = video_drvdata(file); 845 845 struct emmaprp_ctx *ctx = file->private_data; 846 - unsigned int res; 846 + __poll_t res; 847 847 848 848 mutex_lock(&pcdev->dev_mutex); 849 849 res = v4l2_m2m_poll(file, ctx->m2m_ctx, wait);
+1 -1
drivers/media/platform/omap/omap_vout.c
··· 839 839 /* 840 840 * File operations 841 841 */ 842 - static unsigned int omap_vout_poll(struct file *file, 842 + static __poll_t omap_vout_poll(struct file *file, 843 843 struct poll_table_struct *wait) 844 844 { 845 845 struct omap_vout_device *vout = file->private_data;
+2 -2
drivers/media/platform/omap3isp/ispvideo.c
··· 1383 1383 return 0; 1384 1384 } 1385 1385 1386 - static unsigned int isp_video_poll(struct file *file, poll_table *wait) 1386 + static __poll_t isp_video_poll(struct file *file, poll_table *wait) 1387 1387 { 1388 1388 struct isp_video_fh *vfh = to_isp_video_fh(file->private_data); 1389 1389 struct isp_video *video = video_drvdata(file); 1390 - int ret; 1390 + __poll_t ret; 1391 1391 1392 1392 mutex_lock(&video->queue_lock); 1393 1393 ret = vb2_poll(&vfh->queue, file, wait);
+2 -2
drivers/media/platform/s3c-camif/camif-capture.c
··· 590 590 return ret; 591 591 } 592 592 593 - static unsigned int s3c_camif_poll(struct file *file, 593 + static __poll_t s3c_camif_poll(struct file *file, 594 594 struct poll_table_struct *wait) 595 595 { 596 596 struct camif_vp *vp = video_drvdata(file); 597 597 struct camif_dev *camif = vp->camif; 598 - int ret; 598 + __poll_t ret; 599 599 600 600 mutex_lock(&camif->lock); 601 601 if (vp->owner && vp->owner != file->private_data)
+2 -2
drivers/media/platform/s5p-mfc/s5p_mfc.c
··· 988 988 } 989 989 990 990 /* Poll */ 991 - static unsigned int s5p_mfc_poll(struct file *file, 991 + static __poll_t s5p_mfc_poll(struct file *file, 992 992 struct poll_table_struct *wait) 993 993 { 994 994 struct s5p_mfc_ctx *ctx = fh_to_ctx(file->private_data); 995 995 struct s5p_mfc_dev *dev = ctx->dev; 996 996 struct vb2_queue *src_q, *dst_q; 997 997 struct vb2_buffer *src_vb = NULL, *dst_vb = NULL; 998 - unsigned int rc = 0; 998 + __poll_t rc = 0; 999 999 unsigned long flags; 1000 1000 1001 1001 mutex_lock(&dev->mfc_mutex);
+1 -1
drivers/media/platform/sh_veu.c
··· 1016 1016 return 0; 1017 1017 } 1018 1018 1019 - static unsigned int sh_veu_poll(struct file *file, 1019 + static __poll_t sh_veu_poll(struct file *file, 1020 1020 struct poll_table_struct *wait) 1021 1021 { 1022 1022 struct sh_veu_file *veu_file = file->private_data;
+1 -1
drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
··· 1553 1553 return ret; 1554 1554 } 1555 1555 1556 - static unsigned int sh_mobile_ceu_poll(struct file *file, poll_table *pt) 1556 + static __poll_t sh_mobile_ceu_poll(struct file *file, poll_table *pt) 1557 1557 { 1558 1558 struct soc_camera_device *icd = file->private_data; 1559 1559
+2 -2
drivers/media/platform/soc_camera/soc_camera.c
··· 805 805 return err; 806 806 } 807 807 808 - static unsigned int soc_camera_poll(struct file *file, poll_table *pt) 808 + static __poll_t soc_camera_poll(struct file *file, poll_table *pt) 809 809 { 810 810 struct soc_camera_device *icd = file->private_data; 811 811 struct soc_camera_host *ici = to_soc_camera_host(icd->parent); 812 - unsigned res = POLLERR; 812 + __poll_t res = POLLERR; 813 813 814 814 if (icd->streamer != file) 815 815 return POLLERR;
+1 -1
drivers/media/platform/via-camera.c
··· 764 764 } 765 765 766 766 767 - static unsigned int viacam_poll(struct file *filp, struct poll_table_struct *pt) 767 + static __poll_t viacam_poll(struct file *filp, struct poll_table_struct *pt) 768 768 { 769 769 struct via_camera *cam = video_drvdata(filp); 770 770
+1 -1
drivers/media/platform/vivid/vivid-core.c
··· 416 416 return vivid_radio_tx_write(file, buf, size, offset); 417 417 } 418 418 419 - static unsigned int vivid_radio_poll(struct file *file, struct poll_table_struct *wait) 419 + static __poll_t vivid_radio_poll(struct file *file, struct poll_table_struct *wait) 420 420 { 421 421 struct video_device *vdev = video_devdata(file); 422 422
+1 -1
drivers/media/platform/vivid/vivid-radio-rx.c
··· 141 141 return i; 142 142 } 143 143 144 - unsigned int vivid_radio_rx_poll(struct file *file, struct poll_table_struct *wait) 144 + __poll_t vivid_radio_rx_poll(struct file *file, struct poll_table_struct *wait) 145 145 { 146 146 return POLLIN | POLLRDNORM | v4l2_ctrl_poll(file, wait); 147 147 }
+1 -1
drivers/media/platform/vivid/vivid-radio-rx.h
··· 21 21 #define _VIVID_RADIO_RX_H_ 22 22 23 23 ssize_t vivid_radio_rx_read(struct file *, char __user *, size_t, loff_t *); 24 - unsigned int vivid_radio_rx_poll(struct file *file, struct poll_table_struct *wait); 24 + __poll_t vivid_radio_rx_poll(struct file *file, struct poll_table_struct *wait); 25 25 26 26 int vivid_radio_rx_enum_freq_bands(struct file *file, void *fh, struct v4l2_frequency_band *band); 27 27 int vivid_radio_rx_s_hw_freq_seek(struct file *file, void *fh, const struct v4l2_hw_freq_seek *a);
+1 -1
drivers/media/platform/vivid/vivid-radio-tx.c
··· 105 105 return i; 106 106 } 107 107 108 - unsigned int vivid_radio_tx_poll(struct file *file, struct poll_table_struct *wait) 108 + __poll_t vivid_radio_tx_poll(struct file *file, struct poll_table_struct *wait) 109 109 { 110 110 return POLLOUT | POLLWRNORM | v4l2_ctrl_poll(file, wait); 111 111 }
+1 -1
drivers/media/platform/vivid/vivid-radio-tx.h
··· 21 21 #define _VIVID_RADIO_TX_H_ 22 22 23 23 ssize_t vivid_radio_tx_write(struct file *, const char __user *, size_t, loff_t *); 24 - unsigned int vivid_radio_tx_poll(struct file *file, struct poll_table_struct *wait); 24 + __poll_t vivid_radio_tx_poll(struct file *file, struct poll_table_struct *wait); 25 25 26 26 int vidioc_g_modulator(struct file *file, void *fh, struct v4l2_modulator *a); 27 27 int vidioc_s_modulator(struct file *file, void *fh, const struct v4l2_modulator *a);
+3 -3
drivers/media/radio/radio-cadet.c
··· 481 481 return 0; 482 482 } 483 483 484 - static unsigned int cadet_poll(struct file *file, struct poll_table_struct *wait) 484 + static __poll_t cadet_poll(struct file *file, struct poll_table_struct *wait) 485 485 { 486 486 struct cadet *dev = video_drvdata(file); 487 - unsigned long req_events = poll_requested_events(wait); 488 - unsigned int res = v4l2_ctrl_poll(file, wait); 487 + __poll_t req_events = poll_requested_events(wait); 488 + __poll_t res = v4l2_ctrl_poll(file, wait); 489 489 490 490 poll_wait(file, &dev->read_queue, wait); 491 491 if (dev->rdsstat == 0 && (req_events & (POLLIN | POLLRDNORM))) {
+3 -3
drivers/media/radio/radio-si476x.c
··· 1153 1153 return rval; 1154 1154 } 1155 1155 1156 - static unsigned int si476x_radio_fops_poll(struct file *file, 1156 + static __poll_t si476x_radio_fops_poll(struct file *file, 1157 1157 struct poll_table_struct *pts) 1158 1158 { 1159 1159 struct si476x_radio *radio = video_drvdata(file); 1160 - unsigned long req_events = poll_requested_events(pts); 1161 - unsigned int err = v4l2_ctrl_poll(file, pts); 1160 + __poll_t req_events = poll_requested_events(pts); 1161 + __poll_t err = v4l2_ctrl_poll(file, pts); 1162 1162 1163 1163 if (req_events & (POLLIN | POLLRDNORM)) { 1164 1164 if (atomic_read(&radio->core->is_alive))
+1 -1
drivers/media/radio/radio-wl1273.c
··· 1089 1089 return r; 1090 1090 } 1091 1091 1092 - static unsigned int wl1273_fm_fops_poll(struct file *file, 1092 + static __poll_t wl1273_fm_fops_poll(struct file *file, 1093 1093 struct poll_table_struct *pts) 1094 1094 { 1095 1095 struct wl1273_device *radio = video_get_drvdata(video_devdata(file));
+3 -3
drivers/media/radio/si470x/radio-si470x-common.c
··· 507 507 /* 508 508 * si470x_fops_poll - poll RDS data 509 509 */ 510 - static unsigned int si470x_fops_poll(struct file *file, 510 + static __poll_t si470x_fops_poll(struct file *file, 511 511 struct poll_table_struct *pts) 512 512 { 513 513 struct si470x_device *radio = video_drvdata(file); 514 - unsigned long req_events = poll_requested_events(pts); 515 - int retval = v4l2_ctrl_poll(file, pts); 514 + __poll_t req_events = poll_requested_events(pts); 515 + __poll_t retval = v4l2_ctrl_poll(file, pts); 516 516 517 517 if (req_events & (POLLIN | POLLRDNORM)) { 518 518 /* switch on rds reception */
+1 -1
drivers/media/radio/wl128x/fmdrv_v4l2.c
··· 102 102 return sizeof(rds); 103 103 } 104 104 105 - static u32 fm_v4l2_fops_poll(struct file *file, struct poll_table_struct *pts) 105 + static __poll_t fm_v4l2_fops_poll(struct file *file, struct poll_table_struct *pts) 106 106 { 107 107 int ret; 108 108 struct fmdev *fmdev;
+2 -2
drivers/media/rc/lirc_dev.c
··· 272 272 } 273 273 EXPORT_SYMBOL(lirc_dev_fop_close); 274 274 275 - unsigned int lirc_dev_fop_poll(struct file *file, poll_table *wait) 275 + __poll_t lirc_dev_fop_poll(struct file *file, poll_table *wait) 276 276 { 277 277 struct lirc_dev *d = file->private_data; 278 - unsigned int ret; 278 + __poll_t ret; 279 279 280 280 if (!d->attached) 281 281 return POLLHUP | POLLERR;
+1 -1
drivers/media/usb/cpia2/cpia2.h
··· 444 444 void cpia2_free_buffers(struct camera_data *cam); 445 445 long cpia2_read(struct camera_data *cam, 446 446 char __user *buf, unsigned long count, int noblock); 447 - unsigned int cpia2_poll(struct camera_data *cam, 447 + __poll_t cpia2_poll(struct camera_data *cam, 448 448 struct file *filp, poll_table *wait); 449 449 int cpia2_remap_buffer(struct camera_data *cam, struct vm_area_struct *vma); 450 450 void cpia2_set_property_flip(struct camera_data *cam, int prop_val);
+2 -2
drivers/media/usb/cpia2/cpia2_core.c
··· 2370 2370 * cpia2_poll 2371 2371 * 2372 2372 *****************************************************************************/ 2373 - unsigned int cpia2_poll(struct camera_data *cam, struct file *filp, 2373 + __poll_t cpia2_poll(struct camera_data *cam, struct file *filp, 2374 2374 poll_table *wait) 2375 2375 { 2376 - unsigned int status = v4l2_ctrl_poll(filp, wait); 2376 + __poll_t status = v4l2_ctrl_poll(filp, wait); 2377 2377 2378 2378 if ((poll_requested_events(wait) & (POLLIN | POLLRDNORM)) && 2379 2379 !cam->streaming) {
+2 -2
drivers/media/usb/cpia2/cpia2_v4l.c
··· 169 169 * cpia2_v4l_poll 170 170 * 171 171 *****************************************************************************/ 172 - static unsigned int cpia2_v4l_poll(struct file *filp, struct poll_table_struct *wait) 172 + static __poll_t cpia2_v4l_poll(struct file *filp, struct poll_table_struct *wait) 173 173 { 174 174 struct camera_data *cam = video_drvdata(filp); 175 - unsigned int res; 175 + __poll_t res; 176 176 177 177 mutex_lock(&cam->v4l2_lock); 178 178 res = cpia2_poll(cam, filp, wait);
+3 -3
drivers/media/usb/cx231xx/cx231xx-417.c
··· 1812 1812 file->f_flags & O_NONBLOCK); 1813 1813 } 1814 1814 1815 - static unsigned int mpeg_poll(struct file *file, 1815 + static __poll_t mpeg_poll(struct file *file, 1816 1816 struct poll_table_struct *wait) 1817 1817 { 1818 - unsigned long req_events = poll_requested_events(wait); 1818 + __poll_t req_events = poll_requested_events(wait); 1819 1819 struct cx231xx_fh *fh = file->private_data; 1820 1820 struct cx231xx *dev = fh->dev; 1821 - unsigned int res = 0; 1821 + __poll_t res = 0; 1822 1822 1823 1823 if (v4l2_event_pending(&fh->fh)) 1824 1824 res |= POLLPRI;
+3 -3
drivers/media/usb/cx231xx/cx231xx-video.c
··· 2006 2006 * cx231xx_v4l2_poll() 2007 2007 * will allocate buffers when called for the first time 2008 2008 */ 2009 - static unsigned int cx231xx_v4l2_poll(struct file *filp, poll_table *wait) 2009 + static __poll_t cx231xx_v4l2_poll(struct file *filp, poll_table *wait) 2010 2010 { 2011 - unsigned long req_events = poll_requested_events(wait); 2011 + __poll_t req_events = poll_requested_events(wait); 2012 2012 struct cx231xx_fh *fh = filp->private_data; 2013 2013 struct cx231xx *dev = fh->dev; 2014 - unsigned res = 0; 2014 + __poll_t res = 0; 2015 2015 int rc; 2016 2016 2017 2017 rc = check_dev(dev);
+3 -3
drivers/media/usb/gspca/gspca.c
··· 1862 1862 return ret; 1863 1863 } 1864 1864 1865 - static unsigned int dev_poll(struct file *file, poll_table *wait) 1865 + static __poll_t dev_poll(struct file *file, poll_table *wait) 1866 1866 { 1867 1867 struct gspca_dev *gspca_dev = video_drvdata(file); 1868 - unsigned long req_events = poll_requested_events(wait); 1869 - int ret = 0; 1868 + __poll_t req_events = poll_requested_events(wait); 1869 + __poll_t ret = 0; 1870 1870 1871 1871 PDEBUG(D_FRAM, "poll"); 1872 1872
+3 -3
drivers/media/usb/hdpvr/hdpvr-video.c
··· 521 521 return ret; 522 522 } 523 523 524 - static unsigned int hdpvr_poll(struct file *filp, poll_table *wait) 524 + static __poll_t hdpvr_poll(struct file *filp, poll_table *wait) 525 525 { 526 - unsigned long req_events = poll_requested_events(wait); 526 + __poll_t req_events = poll_requested_events(wait); 527 527 struct hdpvr_buffer *buf = NULL; 528 528 struct hdpvr_device *dev = video_drvdata(filp); 529 - unsigned int mask = v4l2_ctrl_poll(filp, wait); 529 + __poll_t mask = v4l2_ctrl_poll(filp, wait); 530 530 531 531 if (!(req_events & (POLLIN | POLLRDNORM))) 532 532 return mask;
+2 -2
drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
··· 1190 1190 } 1191 1191 1192 1192 1193 - static unsigned int pvr2_v4l2_poll(struct file *file, poll_table *wait) 1193 + static __poll_t pvr2_v4l2_poll(struct file *file, poll_table *wait) 1194 1194 { 1195 - unsigned int mask = 0; 1195 + __poll_t mask = 0; 1196 1196 struct pvr2_v4l2_fh *fh = file->private_data; 1197 1197 int ret; 1198 1198
+2 -2
drivers/media/usb/stkwebcam/stk-webcam.c
··· 721 721 return ret; 722 722 } 723 723 724 - static unsigned int v4l_stk_poll(struct file *fp, poll_table *wait) 724 + static __poll_t v4l_stk_poll(struct file *fp, poll_table *wait) 725 725 { 726 726 struct stk_camera *dev = video_drvdata(fp); 727 - unsigned res = v4l2_ctrl_poll(fp, wait); 727 + __poll_t res = v4l2_ctrl_poll(fp, wait); 728 728 729 729 poll_wait(fp, &dev->wait_frame, wait); 730 730
+5 -5
drivers/media/usb/tm6000/tm6000-video.c
··· 1423 1423 return 0; 1424 1424 } 1425 1425 1426 - static unsigned int 1426 + static __poll_t 1427 1427 __tm6000_poll(struct file *file, struct poll_table_struct *wait) 1428 1428 { 1429 - unsigned long req_events = poll_requested_events(wait); 1429 + __poll_t req_events = poll_requested_events(wait); 1430 1430 struct tm6000_fh *fh = file->private_data; 1431 1431 struct tm6000_buffer *buf; 1432 - int res = 0; 1432 + __poll_t res = 0; 1433 1433 1434 1434 if (v4l2_event_pending(&fh->fh)) 1435 1435 res = POLLPRI; ··· 1457 1457 return res; 1458 1458 } 1459 1459 1460 - static unsigned int tm6000_poll(struct file *file, struct poll_table_struct *wait) 1460 + static __poll_t tm6000_poll(struct file *file, struct poll_table_struct *wait) 1461 1461 { 1462 1462 struct tm6000_fh *fh = file->private_data; 1463 1463 struct tm6000_core *dev = fh->dev; 1464 - unsigned int res; 1464 + __poll_t res; 1465 1465 1466 1466 mutex_lock(&dev->lock); 1467 1467 res = __tm6000_poll(file, wait);
+2 -2
drivers/media/usb/uvc/uvc_queue.c
··· 340 340 } 341 341 #endif 342 342 343 - unsigned int uvc_queue_poll(struct uvc_video_queue *queue, struct file *file, 343 + __poll_t uvc_queue_poll(struct uvc_video_queue *queue, struct file *file, 344 344 poll_table *wait) 345 345 { 346 - unsigned int ret; 346 + __poll_t ret; 347 347 348 348 mutex_lock(&queue->mutex); 349 349 ret = vb2_poll(&queue->queue, file, wait);
+1 -1
drivers/media/usb/uvc/uvc_v4l2.c
··· 1423 1423 return uvc_queue_mmap(&stream->queue, vma); 1424 1424 } 1425 1425 1426 - static unsigned int uvc_v4l2_poll(struct file *file, poll_table *wait) 1426 + static __poll_t uvc_v4l2_poll(struct file *file, poll_table *wait) 1427 1427 { 1428 1428 struct uvc_fh *handle = file->private_data; 1429 1429 struct uvc_streaming *stream = handle->stream;
+1 -1
drivers/media/usb/uvc/uvcvideo.h
··· 678 678 struct uvc_buffer *buf); 679 679 extern int uvc_queue_mmap(struct uvc_video_queue *queue, 680 680 struct vm_area_struct *vma); 681 - extern unsigned int uvc_queue_poll(struct uvc_video_queue *queue, 681 + extern __poll_t uvc_queue_poll(struct uvc_video_queue *queue, 682 682 struct file *file, poll_table *wait); 683 683 #ifndef CONFIG_MMU 684 684 extern unsigned long uvc_queue_get_unmapped_area(struct uvc_video_queue *queue,
+2 -2
drivers/media/usb/zr364xx/zr364xx.c
··· 1287 1287 return ret; 1288 1288 } 1289 1289 1290 - static unsigned int zr364xx_poll(struct file *file, 1290 + static __poll_t zr364xx_poll(struct file *file, 1291 1291 struct poll_table_struct *wait) 1292 1292 { 1293 1293 struct zr364xx_camera *cam = video_drvdata(file); 1294 1294 struct videobuf_queue *q = &cam->vb_vidq; 1295 - unsigned res = v4l2_ctrl_poll(file, wait); 1295 + __poll_t res = v4l2_ctrl_poll(file, wait); 1296 1296 1297 1297 _DBG("%s\n", __func__); 1298 1298
+1 -1
drivers/media/v4l2-core/v4l2-ctrls.c
··· 3457 3457 } 3458 3458 EXPORT_SYMBOL(v4l2_ctrl_subdev_subscribe_event); 3459 3459 3460 - unsigned int v4l2_ctrl_poll(struct file *file, struct poll_table_struct *wait) 3460 + __poll_t v4l2_ctrl_poll(struct file *file, struct poll_table_struct *wait) 3461 3461 { 3462 3462 struct v4l2_fh *fh = file->private_data; 3463 3463
+2 -2
drivers/media/v4l2-core/v4l2-dev.c
··· 331 331 return ret; 332 332 } 333 333 334 - static unsigned int v4l2_poll(struct file *filp, struct poll_table_struct *poll) 334 + static __poll_t v4l2_poll(struct file *filp, struct poll_table_struct *poll) 335 335 { 336 336 struct video_device *vdev = video_devdata(filp); 337 - unsigned int res = POLLERR | POLLHUP; 337 + __poll_t res = POLLERR | POLLHUP; 338 338 339 339 if (!vdev->fops->poll) 340 340 return DEFAULT_POLLMASK;
+5 -5
drivers/media/v4l2-core/v4l2-mem2mem.c
··· 500 500 } 501 501 EXPORT_SYMBOL_GPL(v4l2_m2m_streamoff); 502 502 503 - unsigned int v4l2_m2m_poll(struct file *file, struct v4l2_m2m_ctx *m2m_ctx, 503 + __poll_t v4l2_m2m_poll(struct file *file, struct v4l2_m2m_ctx *m2m_ctx, 504 504 struct poll_table_struct *wait) 505 505 { 506 506 struct video_device *vfd = video_devdata(file); 507 - unsigned long req_events = poll_requested_events(wait); 507 + __poll_t req_events = poll_requested_events(wait); 508 508 struct vb2_queue *src_q, *dst_q; 509 509 struct vb2_buffer *src_vb = NULL, *dst_vb = NULL; 510 - unsigned int rc = 0; 510 + __poll_t rc = 0; 511 511 unsigned long flags; 512 512 513 513 if (test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags)) { ··· 794 794 } 795 795 EXPORT_SYMBOL_GPL(v4l2_m2m_fop_mmap); 796 796 797 - unsigned int v4l2_m2m_fop_poll(struct file *file, poll_table *wait) 797 + __poll_t v4l2_m2m_fop_poll(struct file *file, poll_table *wait) 798 798 { 799 799 struct v4l2_fh *fh = file->private_data; 800 800 struct v4l2_m2m_ctx *m2m_ctx = fh->m2m_ctx; 801 - unsigned int ret; 801 + __poll_t ret; 802 802 803 803 if (m2m_ctx->q_lock) 804 804 mutex_lock(m2m_ctx->q_lock);
+1 -1
drivers/media/v4l2-core/v4l2-subdev.c
··· 469 469 } 470 470 #endif 471 471 472 - static unsigned int subdev_poll(struct file *file, poll_table *wait) 472 + static __poll_t subdev_poll(struct file *file, poll_table *wait) 473 473 { 474 474 struct video_device *vdev = video_devdata(file); 475 475 struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev);
+3 -3
drivers/media/v4l2-core/videobuf-core.c
··· 1118 1118 } 1119 1119 EXPORT_SYMBOL_GPL(videobuf_read_stream); 1120 1120 1121 - unsigned int videobuf_poll_stream(struct file *file, 1121 + __poll_t videobuf_poll_stream(struct file *file, 1122 1122 struct videobuf_queue *q, 1123 1123 poll_table *wait) 1124 1124 { 1125 - unsigned long req_events = poll_requested_events(wait); 1125 + __poll_t req_events = poll_requested_events(wait); 1126 1126 struct videobuf_buffer *buf = NULL; 1127 - unsigned int rc = 0; 1127 + __poll_t rc = 0; 1128 1128 1129 1129 videobuf_queue_lock(q); 1130 1130 if (q->streaming) {
+2 -2
drivers/media/v4l2-core/videobuf2-core.c
··· 2018 2018 } 2019 2019 EXPORT_SYMBOL_GPL(vb2_core_queue_release); 2020 2020 2021 - unsigned int vb2_core_poll(struct vb2_queue *q, struct file *file, 2021 + __poll_t vb2_core_poll(struct vb2_queue *q, struct file *file, 2022 2022 poll_table *wait) 2023 2023 { 2024 - unsigned long req_events = poll_requested_events(wait); 2024 + __poll_t req_events = poll_requested_events(wait); 2025 2025 struct vb2_buffer *vb = NULL; 2026 2026 unsigned long flags; 2027 2027
+5 -5
drivers/media/v4l2-core/videobuf2-v4l2.c
··· 671 671 } 672 672 EXPORT_SYMBOL_GPL(vb2_queue_release); 673 673 674 - unsigned int vb2_poll(struct vb2_queue *q, struct file *file, poll_table *wait) 674 + __poll_t vb2_poll(struct vb2_queue *q, struct file *file, poll_table *wait) 675 675 { 676 676 struct video_device *vfd = video_devdata(file); 677 - unsigned long req_events = poll_requested_events(wait); 678 - unsigned int res = 0; 677 + __poll_t req_events = poll_requested_events(wait); 678 + __poll_t res = 0; 679 679 680 680 if (test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags)) { 681 681 struct v4l2_fh *fh = file->private_data; ··· 904 904 } 905 905 EXPORT_SYMBOL_GPL(vb2_fop_read); 906 906 907 - unsigned int vb2_fop_poll(struct file *file, poll_table *wait) 907 + __poll_t vb2_fop_poll(struct file *file, poll_table *wait) 908 908 { 909 909 struct video_device *vdev = video_devdata(file); 910 910 struct vb2_queue *q = vdev->queue; 911 911 struct mutex *lock = q->lock ? q->lock : vdev->lock; 912 - unsigned res; 912 + __poll_t res; 913 913 void *fileio; 914 914 915 915 /*
+1 -1
drivers/misc/cxl/api.c
··· 427 427 return afu_mmap(file, vm); 428 428 } 429 429 EXPORT_SYMBOL_GPL(cxl_fd_mmap); 430 - unsigned int cxl_fd_poll(struct file *file, struct poll_table_struct *poll) 430 + __poll_t cxl_fd_poll(struct file *file, struct poll_table_struct *poll) 431 431 { 432 432 return afu_poll(file, poll); 433 433 }
+1 -1
drivers/misc/cxl/cxl.h
··· 1081 1081 int afu_release(struct inode *inode, struct file *file); 1082 1082 long afu_ioctl(struct file *file, unsigned int cmd, unsigned long arg); 1083 1083 int afu_mmap(struct file *file, struct vm_area_struct *vm); 1084 - unsigned int afu_poll(struct file *file, struct poll_table_struct *poll); 1084 + __poll_t afu_poll(struct file *file, struct poll_table_struct *poll); 1085 1085 ssize_t afu_read(struct file *file, char __user *buf, size_t count, loff_t *off); 1086 1086 extern const struct file_operations afu_fops; 1087 1087
+2 -2
drivers/misc/cxl/file.c
··· 354 354 return false; 355 355 } 356 356 357 - unsigned int afu_poll(struct file *file, struct poll_table_struct *poll) 357 + __poll_t afu_poll(struct file *file, struct poll_table_struct *poll) 358 358 { 359 359 struct cxl_context *ctx = file->private_data; 360 - int mask = 0; 360 + __poll_t mask = 0; 361 361 unsigned long flags; 362 362 363 363
+1 -1
drivers/misc/hpilo.c
··· 514 514 return err ? -EFAULT : len; 515 515 } 516 516 517 - static unsigned int ilo_poll(struct file *fp, poll_table *wait) 517 + static __poll_t ilo_poll(struct file *fp, poll_table *wait) 518 518 { 519 519 struct ccb_data *data = fp->private_data; 520 520 struct ccb *driver_ccb = &data->driver_ccb;
+1 -1
drivers/misc/lis3lv02d/lis3lv02d.c
··· 651 651 return retval; 652 652 } 653 653 654 - static unsigned int lis3lv02d_misc_poll(struct file *file, poll_table *wait) 654 + static __poll_t lis3lv02d_misc_poll(struct file *file, poll_table *wait) 655 655 { 656 656 struct lis3lv02d *lis3 = container_of(file->private_data, 657 657 struct lis3lv02d, miscdev);
+3 -3
drivers/misc/mei/main.c
··· 542 542 * 543 543 * Return: poll mask 544 544 */ 545 - static unsigned int mei_poll(struct file *file, poll_table *wait) 545 + static __poll_t mei_poll(struct file *file, poll_table *wait) 546 546 { 547 - unsigned long req_events = poll_requested_events(wait); 547 + __poll_t req_events = poll_requested_events(wait); 548 548 struct mei_cl *cl = file->private_data; 549 549 struct mei_device *dev; 550 - unsigned int mask = 0; 550 + __poll_t mask = 0; 551 551 bool notify_en; 552 552 553 553 if (WARN_ON(!cl || !cl->dev))
+4 -3
drivers/misc/mic/scif/scif_api.c
··· 1311 1311 spin_lock(&ep->lock); 1312 1312 } 1313 1313 1314 - unsigned int 1314 + __poll_t 1315 1315 __scif_pollfd(struct file *f, poll_table *wait, struct scif_endpt *ep) 1316 1316 { 1317 - unsigned int mask = 0; 1317 + __poll_t mask = 0; 1318 1318 1319 1319 dev_dbg(scif_info.mdev.this_device, 1320 1320 "SCIFAPI pollfd: ep %p %s\n", ep, scif_ep_states[ep->state]); ··· 1389 1389 { 1390 1390 struct poll_wqueues table; 1391 1391 poll_table *pt; 1392 - int i, mask, count = 0, timed_out = timeout_msecs == 0; 1392 + int i, count = 0, timed_out = timeout_msecs == 0; 1393 + __poll_t mask; 1393 1394 u64 timeout = timeout_msecs < 0 ? MAX_SCHEDULE_TIMEOUT 1394 1395 : msecs_to_jiffies(timeout_msecs); 1395 1396
+1 -1
drivers/misc/mic/scif/scif_epd.h
··· 203 203 int __scif_connect(scif_epd_t epd, struct scif_port_id *dst, bool non_block); 204 204 int __scif_flush(scif_epd_t epd); 205 205 int scif_mmap(struct vm_area_struct *vma, scif_epd_t epd); 206 - unsigned int __scif_pollfd(struct file *f, poll_table *wait, 206 + __poll_t __scif_pollfd(struct file *f, poll_table *wait, 207 207 struct scif_endpt *ep); 208 208 int __scif_pin_pages(void *addr, size_t len, int *out_prot, 209 209 int map_flags, scif_pinned_pages_t *pages);
+1 -1
drivers/misc/mic/scif/scif_fd.c
··· 41 41 return scif_mmap(vma, priv); 42 42 } 43 43 44 - static unsigned int scif_fdpoll(struct file *f, poll_table *wait) 44 + static __poll_t scif_fdpoll(struct file *f, poll_table *wait) 45 45 { 46 46 struct scif_endpt *priv = f->private_data; 47 47
+2 -2
drivers/misc/mic/vop/vop_vringh.c
··· 1023 1023 * in the card->host (TX) path, when userspace is unblocked by poll it 1024 1024 * must drain all available descriptors or it can stall. 1025 1025 */ 1026 - static unsigned int vop_poll(struct file *f, poll_table *wait) 1026 + static __poll_t vop_poll(struct file *f, poll_table *wait) 1027 1027 { 1028 1028 struct vop_vdev *vdev = f->private_data; 1029 - int mask = 0; 1029 + __poll_t mask = 0; 1030 1030 1031 1031 mutex_lock(&vdev->vdev_mutex); 1032 1032 if (vop_vdev_inited(vdev)) {
+2 -2
drivers/misc/phantom.c
··· 256 256 return 0; 257 257 } 258 258 259 - static unsigned int phantom_poll(struct file *file, poll_table *wait) 259 + static __poll_t phantom_poll(struct file *file, poll_table *wait) 260 260 { 261 261 struct phantom_device *dev = file->private_data; 262 - unsigned int mask = 0; 262 + __poll_t mask = 0; 263 263 264 264 pr_debug("phantom_poll: %d\n", atomic_read(&dev->counter)); 265 265 poll_wait(file, &dev->wait, wait);
+2 -2
drivers/misc/vmw_vmci/vmci_host.c
··· 166 166 * This is used to wake up the VMX when a VMCI call arrives, or 167 167 * to wake up select() or poll() at the next clock tick. 168 168 */ 169 - static unsigned int vmci_host_poll(struct file *filp, poll_table *wait) 169 + static __poll_t vmci_host_poll(struct file *filp, poll_table *wait) 170 170 { 171 171 struct vmci_host_dev *vmci_host_dev = filp->private_data; 172 172 struct vmci_ctx *context = vmci_host_dev->context; 173 - unsigned int mask = 0; 173 + __poll_t mask = 0; 174 174 175 175 if (vmci_host_dev->ct_type == VMCIOBJ_CONTEXT) { 176 176 /* Check for VMCI calls to this VM context. */
+2 -2
drivers/net/ieee802154/ca8210.c
··· 2638 2638 * 2639 2639 * Return: set of poll return flags 2640 2640 */ 2641 - static unsigned int ca8210_test_int_poll( 2641 + static __poll_t ca8210_test_int_poll( 2642 2642 struct file *filp, 2643 2643 struct poll_table_struct *ptable 2644 2644 ) 2645 2645 { 2646 - unsigned int return_flags = 0; 2646 + __poll_t return_flags = 0; 2647 2647 struct ca8210_priv *priv = filp->private_data; 2648 2648 2649 2649 poll_wait(filp, &priv->test.readq, ptable);
+1 -1
drivers/net/ppp/ppp_async.c
··· 334 334 } 335 335 336 336 /* No kernel lock - fine */ 337 - static unsigned int 337 + static __poll_t 338 338 ppp_asynctty_poll(struct tty_struct *tty, struct file *file, poll_table *wait) 339 339 { 340 340 return 0;
+2 -2
drivers/net/ppp/ppp_generic.c
··· 531 531 } 532 532 533 533 /* No kernel lock - fine */ 534 - static unsigned int ppp_poll(struct file *file, poll_table *wait) 534 + static __poll_t ppp_poll(struct file *file, poll_table *wait) 535 535 { 536 536 struct ppp_file *pf = file->private_data; 537 - unsigned int mask; 537 + __poll_t mask; 538 538 539 539 if (!pf) 540 540 return 0;
+1 -1
drivers/net/ppp/ppp_synctty.c
··· 327 327 } 328 328 329 329 /* No kernel lock - fine */ 330 - static unsigned int 330 + static __poll_t 331 331 ppp_sync_poll(struct tty_struct *tty, struct file *file, poll_table *wait) 332 332 { 333 333 return 0;
+2 -2
drivers/net/tap.c
··· 572 572 return 0; 573 573 } 574 574 575 - static unsigned int tap_poll(struct file *file, poll_table *wait) 575 + static __poll_t tap_poll(struct file *file, poll_table *wait) 576 576 { 577 577 struct tap_queue *q = file->private_data; 578 - unsigned int mask = POLLERR; 578 + __poll_t mask = POLLERR; 579 579 580 580 if (!q) 581 581 goto out;
+2 -2
drivers/net/tun.c
··· 1257 1257 /* Character device part */ 1258 1258 1259 1259 /* Poll */ 1260 - static unsigned int tun_chr_poll(struct file *file, poll_table *wait) 1260 + static __poll_t tun_chr_poll(struct file *file, poll_table *wait) 1261 1261 { 1262 1262 struct tun_file *tfile = file->private_data; 1263 1263 struct tun_struct *tun = tun_get(tfile); 1264 1264 struct sock *sk; 1265 - unsigned int mask = 0; 1265 + __poll_t mask = 0; 1266 1266 1267 1267 if (!tun) 1268 1268 return POLLERR;
+1 -1
drivers/net/wan/cosa.c
··· 924 924 return 1; 925 925 } 926 926 927 - static unsigned int cosa_poll(struct file *file, poll_table *poll) 927 + static __poll_t cosa_poll(struct file *file, poll_table *poll) 928 928 { 929 929 pr_info("cosa_poll is here\n"); 930 930 return 0;
+1 -1
drivers/net/wireless/ralink/rt2x00/rt2x00debug.c
··· 301 301 return status; 302 302 } 303 303 304 - static unsigned int rt2x00debug_poll_queue_dump(struct file *file, 304 + static __poll_t rt2x00debug_poll_queue_dump(struct file *file, 305 305 poll_table *wait) 306 306 { 307 307 struct rt2x00debug_intf *intf = file->private_data;
+2 -2
drivers/pci/switch/switchtec.c
··· 510 510 return -EBADMSG; 511 511 } 512 512 513 - static unsigned int switchtec_dev_poll(struct file *filp, poll_table *wait) 513 + static __poll_t switchtec_dev_poll(struct file *filp, poll_table *wait) 514 514 { 515 515 struct switchtec_user *stuser = filp->private_data; 516 516 struct switchtec_dev *stdev = stuser->stdev; 517 - int ret = 0; 517 + __poll_t ret = 0; 518 518 519 519 poll_wait(filp, &stuser->comp.wait, wait); 520 520 poll_wait(filp, &stdev->event_wq, wait);
+2 -2
drivers/platform/chrome/cros_ec_debugfs.c
··· 188 188 return ret; 189 189 } 190 190 191 - static unsigned int cros_ec_console_log_poll(struct file *file, 191 + static __poll_t cros_ec_console_log_poll(struct file *file, 192 192 poll_table *wait) 193 193 { 194 194 struct cros_ec_debugfs *debug_info = file->private_data; 195 - unsigned int mask = 0; 195 + __poll_t mask = 0; 196 196 197 197 poll_wait(file, &debug_info->log_wq, wait); 198 198
+2 -2
drivers/platform/goldfish/goldfish_pipe.c
··· 536 536 /* is_write */ 1); 537 537 } 538 538 539 - static unsigned int goldfish_pipe_poll(struct file *filp, poll_table *wait) 539 + static __poll_t goldfish_pipe_poll(struct file *filp, poll_table *wait) 540 540 { 541 541 struct goldfish_pipe *pipe = filp->private_data; 542 - unsigned int mask = 0; 542 + __poll_t mask = 0; 543 543 int status; 544 544 545 545 poll_wait(filp, &pipe->wake_queue, wait);
+1 -1
drivers/platform/x86/sony-laptop.c
··· 4124 4124 return ret; 4125 4125 } 4126 4126 4127 - static unsigned int sonypi_misc_poll(struct file *file, poll_table *wait) 4127 + static __poll_t sonypi_misc_poll(struct file *file, poll_table *wait) 4128 4128 { 4129 4129 poll_wait(file, &sonypi_compat.fifo_proc_list, wait); 4130 4130 if (kfifo_len(&sonypi_compat.fifo))
+1 -1
drivers/pps/pps.c
··· 49 49 * Char device methods 50 50 */ 51 51 52 - static unsigned int pps_cdev_poll(struct file *file, poll_table *wait) 52 + static __poll_t pps_cdev_poll(struct file *file, poll_table *wait) 53 53 { 54 54 struct pps_device *pps = file->private_data; 55 55
+1 -1
drivers/ptp/ptp_chardev.c
··· 280 280 return err; 281 281 } 282 282 283 - unsigned int ptp_poll(struct posix_clock *pc, struct file *fp, poll_table *wait) 283 + __poll_t ptp_poll(struct posix_clock *pc, struct file *fp, poll_table *wait) 284 284 { 285 285 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); 286 286
+1 -1
drivers/ptp/ptp_private.h
··· 90 90 ssize_t ptp_read(struct posix_clock *pc, 91 91 uint flags, char __user *buf, size_t cnt); 92 92 93 - uint ptp_poll(struct posix_clock *pc, 93 + __poll_t ptp_poll(struct posix_clock *pc, 94 94 struct file *fp, poll_table *wait); 95 95 96 96 /*
+1 -1
drivers/rapidio/devices/rio_mport_cdev.c
··· 2319 2319 return ret; 2320 2320 } 2321 2321 2322 - static unsigned int mport_cdev_poll(struct file *filp, poll_table *wait) 2322 + static __poll_t mport_cdev_poll(struct file *filp, poll_table *wait) 2323 2323 { 2324 2324 struct mport_cdev_priv *priv = filp->private_data; 2325 2325
+2 -2
drivers/rpmsg/qcom_smd.c
··· 919 919 return __qcom_smd_send(qsept->qsch, data, len, false); 920 920 } 921 921 922 - static unsigned int qcom_smd_poll(struct rpmsg_endpoint *ept, 922 + static __poll_t qcom_smd_poll(struct rpmsg_endpoint *ept, 923 923 struct file *filp, poll_table *wait) 924 924 { 925 925 struct qcom_smd_endpoint *qsept = to_smd_endpoint(ept); 926 926 struct qcom_smd_channel *channel = qsept->qsch; 927 - unsigned int mask = 0; 927 + __poll_t mask = 0; 928 928 929 929 poll_wait(filp, &channel->fblockread_event, wait); 930 930
+2 -2
drivers/rpmsg/rpmsg_char.c
··· 256 256 return ret < 0 ? ret : len; 257 257 } 258 258 259 - static unsigned int rpmsg_eptdev_poll(struct file *filp, poll_table *wait) 259 + static __poll_t rpmsg_eptdev_poll(struct file *filp, poll_table *wait) 260 260 { 261 261 struct rpmsg_eptdev *eptdev = filp->private_data; 262 - unsigned int mask = 0; 262 + __poll_t mask = 0; 263 263 264 264 if (!eptdev->ept) 265 265 return POLLERR;
+1 -1
drivers/rpmsg/rpmsg_core.c
··· 247 247 * 248 248 * Returns mask representing the current state of the endpoint's send buffers 249 249 */ 250 - unsigned int rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp, 250 + __poll_t rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp, 251 251 poll_table *wait) 252 252 { 253 253 if (WARN_ON(!ept))
+1 -1
drivers/rpmsg/rpmsg_internal.h
··· 71 71 int (*trysendto)(struct rpmsg_endpoint *ept, void *data, int len, u32 dst); 72 72 int (*trysend_offchannel)(struct rpmsg_endpoint *ept, u32 src, u32 dst, 73 73 void *data, int len); 74 - unsigned int (*poll)(struct rpmsg_endpoint *ept, struct file *filp, 74 + __poll_t (*poll)(struct rpmsg_endpoint *ept, struct file *filp, 75 75 poll_table *wait); 76 76 }; 77 77
+1 -1
drivers/rtc/rtc-dev.c
··· 194 194 return ret; 195 195 } 196 196 197 - static unsigned int rtc_dev_poll(struct file *file, poll_table *wait) 197 + static __poll_t rtc_dev_poll(struct file *file, poll_table *wait) 198 198 { 199 199 struct rtc_device *rtc = file->private_data; 200 200 unsigned long data;
+2 -2
drivers/s390/block/dasd_eer.c
··· 661 661 return effective_count; 662 662 } 663 663 664 - static unsigned int dasd_eer_poll(struct file *filp, poll_table *ptable) 664 + static __poll_t dasd_eer_poll(struct file *filp, poll_table *ptable) 665 665 { 666 - unsigned int mask; 666 + __poll_t mask; 667 667 unsigned long flags; 668 668 struct eerbuffer *eerb; 669 669
+1 -1
drivers/s390/char/monreader.c
··· 429 429 return count; 430 430 } 431 431 432 - static unsigned int mon_poll(struct file *filp, struct poll_table_struct *p) 432 + static __poll_t mon_poll(struct file *filp, struct poll_table_struct *p) 433 433 { 434 434 struct mon_private *monpriv = filp->private_data; 435 435
+2 -2
drivers/scsi/megaraid/megaraid_sas_base.c
··· 7004 7004 /** 7005 7005 * megasas_mgmt_poll - char node "poll" entry point 7006 7006 * */ 7007 - static unsigned int megasas_mgmt_poll(struct file *file, poll_table *wait) 7007 + static __poll_t megasas_mgmt_poll(struct file *file, poll_table *wait) 7008 7008 { 7009 - unsigned int mask; 7009 + __poll_t mask; 7010 7010 unsigned long flags; 7011 7011 7012 7012 poll_wait(file, &megasas_poll_wait, wait);
+1 -1
drivers/scsi/mpt3sas/mpt3sas_ctl.c
··· 534 534 * @wait - 535 535 * 536 536 */ 537 - static unsigned int 537 + static __poll_t 538 538 _ctl_poll(struct file *filep, poll_table *wait) 539 539 { 540 540 struct MPT3SAS_ADAPTER *ioc;
+3 -3
drivers/scsi/sg.c
··· 1140 1140 } 1141 1141 #endif 1142 1142 1143 - static unsigned int 1143 + static __poll_t 1144 1144 sg_poll(struct file *filp, poll_table * wait) 1145 1145 { 1146 - unsigned int res = 0; 1146 + __poll_t res = 0; 1147 1147 Sg_device *sdp; 1148 1148 Sg_fd *sfp; 1149 1149 Sg_request *srp; ··· 1174 1174 } else if (count < SG_MAX_QUEUE) 1175 1175 res |= POLLOUT | POLLWRNORM; 1176 1176 SCSI_LOG_TIMEOUT(3, sg_printk(KERN_INFO, sdp, 1177 - "sg_poll: res=0x%x\n", (int) res)); 1177 + "sg_poll: res=0x%x\n", (__force u32) res)); 1178 1178 return res; 1179 1179 } 1180 1180
+2 -2
drivers/staging/comedi/comedi_fops.c
··· 2276 2276 return retval; 2277 2277 } 2278 2278 2279 - static unsigned int comedi_poll(struct file *file, poll_table *wait) 2279 + static __poll_t comedi_poll(struct file *file, poll_table *wait) 2280 2280 { 2281 - unsigned int mask = 0; 2281 + __poll_t mask = 0; 2282 2282 struct comedi_file *cfp = file->private_data; 2283 2283 struct comedi_device *dev = cfp->dev; 2284 2284 struct comedi_subdevice *s, *s_read;
+1 -1
drivers/staging/comedi/drivers/serial2002.c
··· 119 119 poll_initwait(&table); 120 120 while (1) { 121 121 long elapsed; 122 - int mask; 122 + __poll_t mask; 123 123 124 124 mask = f->f_op->poll(f, &table.pt); 125 125 if (mask & (POLLRDNORM | POLLRDBAND | POLLIN |
+2 -2
drivers/staging/irda/net/af_irda.c
··· 1737 1737 /* 1738 1738 * Function irda_poll (file, sock, wait) 1739 1739 */ 1740 - static unsigned int irda_poll(struct file * file, struct socket *sock, 1740 + static __poll_t irda_poll(struct file * file, struct socket *sock, 1741 1741 poll_table *wait) 1742 1742 { 1743 1743 struct sock *sk = sock->sk; 1744 1744 struct irda_sock *self = irda_sk(sk); 1745 - unsigned int mask; 1745 + __poll_t mask; 1746 1746 1747 1747 poll_wait(file, sk_sleep(sk), wait); 1748 1748 mask = 0;
+4 -4
drivers/staging/irda/net/irnet/irnet_ppp.c
··· 419 419 * Poll : called when someone do a select on /dev/irnet. 420 420 * Just check if there are new events... 421 421 */ 422 - static inline unsigned int 422 + static inline __poll_t 423 423 irnet_ctrl_poll(irnet_socket * ap, 424 424 struct file * file, 425 425 poll_table * wait) 426 426 { 427 - unsigned int mask; 427 + __poll_t mask; 428 428 429 429 DENTER(CTRL_TRACE, "(ap=0x%p)\n", ap); 430 430 ··· 608 608 /* 609 609 * Poll : called when someone do a select on /dev/irnet 610 610 */ 611 - static unsigned int 611 + static __poll_t 612 612 dev_irnet_poll(struct file * file, 613 613 poll_table * wait) 614 614 { 615 615 irnet_socket * ap = file->private_data; 616 - unsigned int mask; 616 + __poll_t mask; 617 617 618 618 DENTER(FS_TRACE, "(file=0x%p, ap=0x%p)\n", 619 619 file, ap);
+1 -1
drivers/staging/irda/net/irnet/irnet_ppp.h
··· 70 70 char __user *, 71 71 size_t, 72 72 loff_t *); 73 - static unsigned int 73 + static __poll_t 74 74 dev_irnet_poll(struct file *, 75 75 poll_table *); 76 76 static long
+1 -1
drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c
··· 1255 1255 return videobuf_mmap_mapper(&pipe->outq, vma); 1256 1256 } 1257 1257 1258 - static unsigned int atomisp_poll(struct file *file, 1258 + static __poll_t atomisp_poll(struct file *file, 1259 1259 struct poll_table_struct *pt) 1260 1260 { 1261 1261 struct video_device *vdev = video_devdata(file);
+2 -2
drivers/staging/media/bcm2048/radio-bcm2048.c
··· 2174 2174 return 0; 2175 2175 } 2176 2176 2177 - static unsigned int bcm2048_fops_poll(struct file *file, 2177 + static __poll_t bcm2048_fops_poll(struct file *file, 2178 2178 struct poll_table_struct *pts) 2179 2179 { 2180 2180 struct bcm2048_device *bdev = video_drvdata(file); 2181 - int retval = 0; 2181 + __poll_t retval = 0; 2182 2182 2183 2183 poll_wait(file, &bdev->read_queue, pts); 2184 2184
+1 -1
drivers/staging/media/davinci_vpfe/vpfe_video.c
··· 573 573 /* 574 574 * vpfe_poll() - It is used for select/poll system call 575 575 */ 576 - static unsigned int vpfe_poll(struct file *file, poll_table *wait) 576 + static __poll_t vpfe_poll(struct file *file, poll_table *wait) 577 577 { 578 578 struct vpfe_video_device *video = video_drvdata(file); 579 579 struct vpfe_device *vpfe_dev = video->vpfe_dev;
+2 -2
drivers/staging/media/lirc/lirc_zilog.c
··· 1197 1197 } 1198 1198 1199 1199 /* copied from lirc_dev */ 1200 - static unsigned int poll(struct file *filep, poll_table *wait) 1200 + static __poll_t poll(struct file *filep, poll_table *wait) 1201 1201 { 1202 1202 struct IR *ir = lirc_get_pdata(filep); 1203 1203 struct IR_rx *rx; 1204 1204 struct lirc_buffer *rbuf = ir->l->buf; 1205 - unsigned int ret; 1205 + __poll_t ret; 1206 1206 1207 1207 dev_dbg(ir->dev, "%s called\n", __func__); 1208 1208
+1 -1
drivers/staging/media/omap4iss/iss_video.c
··· 1185 1185 return 0; 1186 1186 } 1187 1187 1188 - static unsigned int iss_video_poll(struct file *file, poll_table *wait) 1188 + static __poll_t iss_video_poll(struct file *file, poll_table *wait) 1189 1189 { 1190 1190 struct iss_video_fh *vfh = to_iss_video_fh(file->private_data); 1191 1191
+2 -2
drivers/staging/most/aim-cdev/cdev.c
··· 287 287 return copied; 288 288 } 289 289 290 - static unsigned int aim_poll(struct file *filp, poll_table *wait) 290 + static __poll_t aim_poll(struct file *filp, poll_table *wait) 291 291 { 292 292 struct aim_channel *c = filp->private_data; 293 - unsigned int mask = 0; 293 + __poll_t mask = 0; 294 294 295 295 poll_wait(filp, &c->wq, wait); 296 296
+2 -2
drivers/staging/most/aim-v4l2/video.c
··· 209 209 return ret; 210 210 } 211 211 212 - static unsigned int aim_vdev_poll(struct file *filp, poll_table *wait) 212 + static __poll_t aim_vdev_poll(struct file *filp, poll_table *wait) 213 213 { 214 214 struct aim_fh *fh = filp->private_data; 215 215 struct most_video_dev *mdev = fh->mdev; 216 - unsigned int mask = 0; 216 + __poll_t mask = 0; 217 217 218 218 /* only wait if no data is available */ 219 219 if (!data_ready(mdev))
+2 -2
drivers/staging/speakup/speakup_soft.c
··· 326 326 return count; 327 327 } 328 328 329 - static unsigned int softsynth_poll(struct file *fp, struct poll_table_struct *wait) 329 + static __poll_t softsynth_poll(struct file *fp, struct poll_table_struct *wait) 330 330 { 331 331 unsigned long flags; 332 - int ret = 0; 332 + __poll_t ret = 0; 333 333 334 334 poll_wait(fp, &speakup_event, wait); 335 335
+2 -2
drivers/tty/n_gsm.c
··· 2457 2457 * Called without the kernel lock held - fine 2458 2458 */ 2459 2459 2460 - static unsigned int gsmld_poll(struct tty_struct *tty, struct file *file, 2460 + static __poll_t gsmld_poll(struct tty_struct *tty, struct file *file, 2461 2461 poll_table *wait) 2462 2462 { 2463 - unsigned int mask = 0; 2463 + __poll_t mask = 0; 2464 2464 struct gsm_mux *gsm = tty->disc_data; 2465 2465 2466 2466 poll_wait(file, &tty->read_wait, wait);
+3 -3
drivers/tty/n_hdlc.c
··· 180 180 const unsigned char *buf, size_t nr); 181 181 static int n_hdlc_tty_ioctl(struct tty_struct *tty, struct file *file, 182 182 unsigned int cmd, unsigned long arg); 183 - static unsigned int n_hdlc_tty_poll(struct tty_struct *tty, struct file *filp, 183 + static __poll_t n_hdlc_tty_poll(struct tty_struct *tty, struct file *filp, 184 184 poll_table *wait); 185 185 static int n_hdlc_tty_open(struct tty_struct *tty); 186 186 static void n_hdlc_tty_close(struct tty_struct *tty); ··· 796 796 * to caller. 797 797 * Returns a bit mask containing info on which ops will not block. 798 798 */ 799 - static unsigned int n_hdlc_tty_poll(struct tty_struct *tty, struct file *filp, 799 + static __poll_t n_hdlc_tty_poll(struct tty_struct *tty, struct file *filp, 800 800 poll_table *wait) 801 801 { 802 802 struct n_hdlc *n_hdlc = tty2n_hdlc (tty); 803 - unsigned int mask = 0; 803 + __poll_t mask = 0; 804 804 805 805 if (debuglevel >= DEBUG_LEVEL_INFO) 806 806 printk("%s(%d)n_hdlc_tty_poll() called\n",__FILE__,__LINE__);
+3 -3
drivers/tty/n_r3964.c
··· 135 135 static int r3964_ioctl(struct tty_struct *tty, struct file *file, 136 136 unsigned int cmd, unsigned long arg); 137 137 static void r3964_set_termios(struct tty_struct *tty, struct ktermios *old); 138 - static unsigned int r3964_poll(struct tty_struct *tty, struct file *file, 138 + static __poll_t r3964_poll(struct tty_struct *tty, struct file *file, 139 139 struct poll_table_struct *wait); 140 140 static void r3964_receive_buf(struct tty_struct *tty, const unsigned char *cp, 141 141 char *fp, int count); ··· 1216 1216 } 1217 1217 1218 1218 /* Called without the kernel lock held - fine */ 1219 - static unsigned int r3964_poll(struct tty_struct *tty, struct file *file, 1219 + static __poll_t r3964_poll(struct tty_struct *tty, struct file *file, 1220 1220 struct poll_table_struct *wait) 1221 1221 { 1222 1222 struct r3964_info *pInfo = tty->disc_data; 1223 1223 struct r3964_client_info *pClient; 1224 1224 struct r3964_message *pMsg = NULL; 1225 1225 unsigned long flags; 1226 - int result = POLLOUT; 1226 + __poll_t result = POLLOUT; 1227 1227 1228 1228 TRACE_L("POLL"); 1229 1229
+2 -2
drivers/tty/n_tty.c
··· 2368 2368 * Called without the kernel lock held - fine 2369 2369 */ 2370 2370 2371 - static unsigned int n_tty_poll(struct tty_struct *tty, struct file *file, 2371 + static __poll_t n_tty_poll(struct tty_struct *tty, struct file *file, 2372 2372 poll_table *wait) 2373 2373 { 2374 - unsigned int mask = 0; 2374 + __poll_t mask = 0; 2375 2375 2376 2376 poll_wait(file, &tty->read_wait, wait); 2377 2377 poll_wait(file, &tty->write_wait, wait);
+4 -4
drivers/tty/tty_io.c
··· 144 144 static ssize_t tty_write(struct file *, const char __user *, size_t, loff_t *); 145 145 ssize_t redirected_tty_write(struct file *, const char __user *, 146 146 size_t, loff_t *); 147 - static unsigned int tty_poll(struct file *, poll_table *); 147 + static __poll_t tty_poll(struct file *, poll_table *); 148 148 static int tty_open(struct inode *, struct file *); 149 149 long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg); 150 150 #ifdef CONFIG_COMPAT ··· 443 443 } 444 444 445 445 /* No kernel lock held - none needed ;) */ 446 - static unsigned int hung_up_tty_poll(struct file *filp, poll_table *wait) 446 + static __poll_t hung_up_tty_poll(struct file *filp, poll_table *wait) 447 447 { 448 448 return POLLIN | POLLOUT | POLLERR | POLLHUP | POLLRDNORM | POLLWRNORM; 449 449 } ··· 2055 2055 * may be re-entered freely by other callers. 2056 2056 */ 2057 2057 2058 - static unsigned int tty_poll(struct file *filp, poll_table *wait) 2058 + static __poll_t tty_poll(struct file *filp, poll_table *wait) 2059 2059 { 2060 2060 struct tty_struct *tty = file_tty(filp); 2061 2061 struct tty_ldisc *ld; 2062 - int ret = 0; 2062 + __poll_t ret = 0; 2063 2063 2064 2064 if (tty_paranoia_check(tty, file_inode(filp), "tty_poll")) 2065 2065 return 0;
+2 -2
drivers/tty/vt/vc_screen.c
··· 559 559 return ret; 560 560 } 561 561 562 - static unsigned int 562 + static __poll_t 563 563 vcs_poll(struct file *file, poll_table *wait) 564 564 { 565 565 struct vcs_poll_data *poll = vcs_poll_data_get(file); 566 - int ret = DEFAULT_POLLMASK|POLLERR|POLLPRI; 566 + __poll_t ret = DEFAULT_POLLMASK|POLLERR|POLLPRI; 567 567 568 568 if (poll) { 569 569 poll_wait(file, &poll->waitq, wait);
+1 -1
drivers/uio/uio.c
··· 496 496 return ret; 497 497 } 498 498 499 - static unsigned int uio_poll(struct file *filep, poll_table *wait) 499 + static __poll_t uio_poll(struct file *filep, poll_table *wait) 500 500 { 501 501 struct uio_listener *listener = filep->private_data; 502 502 struct uio_device *idev = listener->dev;
+2 -2
drivers/usb/class/cdc-wdm.c
··· 595 595 return usb_translate_errors(desc->werr); 596 596 } 597 597 598 - static unsigned int wdm_poll(struct file *file, struct poll_table_struct *wait) 598 + static __poll_t wdm_poll(struct file *file, struct poll_table_struct *wait) 599 599 { 600 600 struct wdm_device *desc = file->private_data; 601 601 unsigned long flags; 602 - unsigned int mask = 0; 602 + __poll_t mask = 0; 603 603 604 604 spin_lock_irqsave(&desc->iuspin, flags); 605 605 if (test_bit(WDM_DISCONNECTING, &desc->flags)) {
+2 -2
drivers/usb/class/usblp.c
··· 469 469 } 470 470 471 471 /* No kernel lock - fine */ 472 - static unsigned int usblp_poll(struct file *file, struct poll_table_struct *wait) 472 + static __poll_t usblp_poll(struct file *file, struct poll_table_struct *wait) 473 473 { 474 - int ret; 474 + __poll_t ret; 475 475 unsigned long flags; 476 476 477 477 struct usblp *usblp = file->private_data;
+2 -2
drivers/usb/class/usbtmc.c
··· 1257 1257 return fasync_helper(fd, file, on, &data->fasync); 1258 1258 } 1259 1259 1260 - static unsigned int usbtmc_poll(struct file *file, poll_table *wait) 1260 + static __poll_t usbtmc_poll(struct file *file, poll_table *wait) 1261 1261 { 1262 1262 struct usbtmc_device_data *data = file->private_data; 1263 - unsigned int mask; 1263 + __poll_t mask; 1264 1264 1265 1265 mutex_lock(&data->io_mutex); 1266 1266
+1 -1
drivers/usb/core/devices.c
··· 622 622 } 623 623 624 624 /* Kernel lock for "lastev" protection */ 625 - static unsigned int usb_device_poll(struct file *file, 625 + static __poll_t usb_device_poll(struct file *file, 626 626 struct poll_table_struct *wait) 627 627 { 628 628 unsigned int event_count;
+2 -2
drivers/usb/core/devio.c
··· 2572 2572 #endif 2573 2573 2574 2574 /* No kernel lock - fine */ 2575 - static unsigned int usbdev_poll(struct file *file, 2575 + static __poll_t usbdev_poll(struct file *file, 2576 2576 struct poll_table_struct *wait) 2577 2577 { 2578 2578 struct usb_dev_state *ps = file->private_data; 2579 - unsigned int mask = 0; 2579 + __poll_t mask = 0; 2580 2580 2581 2581 poll_wait(file, &ps->wait, wait); 2582 2582 if (file->f_mode & FMODE_WRITE && !list_empty(&ps->async_completed))
+2 -2
drivers/usb/gadget/function/f_fs.c
··· 638 638 return ret; 639 639 } 640 640 641 - static unsigned int ffs_ep0_poll(struct file *file, poll_table *wait) 641 + static __poll_t ffs_ep0_poll(struct file *file, poll_table *wait) 642 642 { 643 643 struct ffs_data *ffs = file->private_data; 644 - unsigned int mask = POLLWRNORM; 644 + __poll_t mask = POLLWRNORM; 645 645 int ret; 646 646 647 647 poll_wait(file, &ffs->ev.waitq, wait);
+2 -2
drivers/usb/gadget/function/f_hid.c
··· 413 413 return status; 414 414 } 415 415 416 - static unsigned int f_hidg_poll(struct file *file, poll_table *wait) 416 + static __poll_t f_hidg_poll(struct file *file, poll_table *wait) 417 417 { 418 418 struct f_hidg *hidg = file->private_data; 419 - unsigned int ret = 0; 419 + __poll_t ret = 0; 420 420 421 421 poll_wait(file, &hidg->read_queue, wait); 422 422 poll_wait(file, &hidg->write_queue, wait);
+2 -2
drivers/usb/gadget/function/f_printer.c
··· 680 680 return 0; 681 681 } 682 682 683 - static unsigned int 683 + static __poll_t 684 684 printer_poll(struct file *fd, poll_table *wait) 685 685 { 686 686 struct printer_dev *dev = fd->private_data; 687 687 unsigned long flags; 688 - int status = 0; 688 + __poll_t status = 0; 689 689 690 690 mutex_lock(&dev->lock_printer_io); 691 691 spin_lock_irqsave(&dev->lock, flags);
+1 -1
drivers/usb/gadget/function/uvc_queue.c
··· 193 193 * This function implements video queue polling and is intended to be used by 194 194 * the device poll handler. 195 195 */ 196 - unsigned int uvcg_queue_poll(struct uvc_video_queue *queue, struct file *file, 196 + __poll_t uvcg_queue_poll(struct uvc_video_queue *queue, struct file *file, 197 197 poll_table *wait) 198 198 { 199 199 return vb2_poll(&queue->queue, file, wait);
+1 -1
drivers/usb/gadget/function/uvc_queue.h
··· 72 72 int uvcg_dequeue_buffer(struct uvc_video_queue *queue, 73 73 struct v4l2_buffer *buf, int nonblocking); 74 74 75 - unsigned int uvcg_queue_poll(struct uvc_video_queue *queue, 75 + __poll_t uvcg_queue_poll(struct uvc_video_queue *queue, 76 76 struct file *file, poll_table *wait); 77 77 78 78 int uvcg_queue_mmap(struct uvc_video_queue *queue, struct vm_area_struct *vma);
+1 -1
drivers/usb/gadget/function/uvc_v4l2.c
··· 329 329 return uvcg_queue_mmap(&uvc->video.queue, vma); 330 330 } 331 331 332 - static unsigned int 332 + static __poll_t 333 333 uvc_v4l2_poll(struct file *file, poll_table *wait) 334 334 { 335 335 struct video_device *vdev = video_devdata(file);
+2 -2
drivers/usb/gadget/legacy/inode.c
··· 1209 1209 return 0; 1210 1210 } 1211 1211 1212 - static unsigned int 1212 + static __poll_t 1213 1213 ep0_poll (struct file *fd, poll_table *wait) 1214 1214 { 1215 1215 struct dev_data *dev = fd->private_data; 1216 - int mask = 0; 1216 + __poll_t mask = 0; 1217 1217 1218 1218 if (dev->state <= STATE_DEV_OPENED) 1219 1219 return DEFAULT_POLLMASK;
+2 -2
drivers/usb/misc/iowarrior.c
··· 677 677 return retval; 678 678 } 679 679 680 - static unsigned iowarrior_poll(struct file *file, poll_table * wait) 680 + static __poll_t iowarrior_poll(struct file *file, poll_table * wait) 681 681 { 682 682 struct iowarrior *dev = file->private_data; 683 - unsigned int mask = 0; 683 + __poll_t mask = 0; 684 684 685 685 if (!dev->present) 686 686 return POLLERR | POLLHUP;
+2 -2
drivers/usb/misc/ldusb.c
··· 409 409 /** 410 410 * ld_usb_poll 411 411 */ 412 - static unsigned int ld_usb_poll(struct file *file, poll_table *wait) 412 + static __poll_t ld_usb_poll(struct file *file, poll_table *wait) 413 413 { 414 414 struct ld_usb *dev; 415 - unsigned int mask = 0; 415 + __poll_t mask = 0; 416 416 417 417 dev = file->private_data; 418 418
+3 -3
drivers/usb/misc/legousbtower.c
··· 224 224 static inline void tower_delete (struct lego_usb_tower *dev); 225 225 static int tower_open (struct inode *inode, struct file *file); 226 226 static int tower_release (struct inode *inode, struct file *file); 227 - static unsigned int tower_poll (struct file *file, poll_table *wait); 227 + static __poll_t tower_poll (struct file *file, poll_table *wait); 228 228 static loff_t tower_llseek (struct file *file, loff_t off, int whence); 229 229 230 230 static void tower_abort_transfers (struct lego_usb_tower *dev); ··· 509 509 /** 510 510 * tower_poll 511 511 */ 512 - static unsigned int tower_poll (struct file *file, poll_table *wait) 512 + static __poll_t tower_poll (struct file *file, poll_table *wait) 513 513 { 514 514 struct lego_usb_tower *dev; 515 - unsigned int mask = 0; 515 + __poll_t mask = 0; 516 516 517 517 dev = file->private_data; 518 518
+2 -2
drivers/usb/mon/mon_bin.c
··· 1191 1191 } 1192 1192 #endif /* CONFIG_COMPAT */ 1193 1193 1194 - static unsigned int 1194 + static __poll_t 1195 1195 mon_bin_poll(struct file *file, struct poll_table_struct *wait) 1196 1196 { 1197 1197 struct mon_reader_bin *rp = file->private_data; 1198 - unsigned int mask = 0; 1198 + __poll_t mask = 0; 1199 1199 unsigned long flags; 1200 1200 1201 1201 if (file->f_mode & FMODE_READ)
+2 -2
drivers/vfio/virqfd.c
··· 46 46 static int virqfd_wakeup(wait_queue_entry_t *wait, unsigned mode, int sync, void *key) 47 47 { 48 48 struct virqfd *virqfd = container_of(wait, struct virqfd, wait); 49 - unsigned long flags = (unsigned long)key; 49 + __poll_t flags = key_to_poll(key); 50 50 51 51 if (flags & POLLIN) { 52 52 /* An event has been signaled, call function */ ··· 113 113 struct eventfd_ctx *ctx; 114 114 struct virqfd *virqfd; 115 115 int ret = 0; 116 - unsigned int events; 116 + __poll_t events; 117 117 118 118 virqfd = kzalloc(sizeof(*virqfd), GFP_KERNEL); 119 119 if (!virqfd)
+1 -1
drivers/vhost/net.c
··· 1353 1353 return vhost_chr_write_iter(dev, from); 1354 1354 } 1355 1355 1356 - static unsigned int vhost_net_chr_poll(struct file *file, poll_table *wait) 1356 + static __poll_t vhost_net_chr_poll(struct file *file, poll_table *wait) 1357 1357 { 1358 1358 struct vhost_net *n = file->private_data; 1359 1359 struct vhost_dev *dev = &n->dev;
+6 -6
drivers/vhost/vhost.c
··· 170 170 { 171 171 struct vhost_poll *poll = container_of(wait, struct vhost_poll, wait); 172 172 173 - if (!((unsigned long)key & poll->mask)) 173 + if (!(key_to_poll(key) & poll->mask)) 174 174 return 0; 175 175 176 176 vhost_poll_queue(poll); ··· 187 187 188 188 /* Init poll structure */ 189 189 void vhost_poll_init(struct vhost_poll *poll, vhost_work_fn_t fn, 190 - unsigned long mask, struct vhost_dev *dev) 190 + __poll_t mask, struct vhost_dev *dev) 191 191 { 192 192 init_waitqueue_func_entry(&poll->wait, vhost_poll_wakeup); 193 193 init_poll_funcptr(&poll->table, vhost_poll_func); ··· 203 203 * keep a reference to a file until after vhost_poll_stop is called. */ 204 204 int vhost_poll_start(struct vhost_poll *poll, struct file *file) 205 205 { 206 - unsigned long mask; 206 + __poll_t mask; 207 207 int ret = 0; 208 208 209 209 if (poll->wqh) ··· 211 211 212 212 mask = file->f_op->poll(file, &poll->table); 213 213 if (mask) 214 - vhost_poll_wakeup(&poll->wait, 0, 0, (void *)mask); 214 + vhost_poll_wakeup(&poll->wait, 0, 0, poll_to_key(mask)); 215 215 if (mask & POLLERR) { 216 216 if (poll->wqh) 217 217 remove_wait_queue(poll->wqh, &poll->wait); ··· 1061 1061 } 1062 1062 EXPORT_SYMBOL(vhost_chr_write_iter); 1063 1063 1064 - unsigned int vhost_chr_poll(struct file *file, struct vhost_dev *dev, 1064 + __poll_t vhost_chr_poll(struct file *file, struct vhost_dev *dev, 1065 1065 poll_table *wait) 1066 1066 { 1067 - unsigned int mask = 0; 1067 + __poll_t mask = 0; 1068 1068 1069 1069 poll_wait(file, &dev->wait, wait); 1070 1070
+3 -3
drivers/vhost/vhost.h
··· 34 34 wait_queue_head_t *wqh; 35 35 wait_queue_entry_t wait; 36 36 struct vhost_work work; 37 - unsigned long mask; 37 + __poll_t mask; 38 38 struct vhost_dev *dev; 39 39 }; 40 40 ··· 43 43 bool vhost_has_work(struct vhost_dev *dev); 44 44 45 45 void vhost_poll_init(struct vhost_poll *poll, vhost_work_fn_t fn, 46 - unsigned long mask, struct vhost_dev *dev); 46 + __poll_t mask, struct vhost_dev *dev); 47 47 int vhost_poll_start(struct vhost_poll *poll, struct file *file); 48 48 void vhost_poll_stop(struct vhost_poll *poll); 49 49 void vhost_poll_flush(struct vhost_poll *poll); ··· 217 217 struct vhost_msg_node *node); 218 218 struct vhost_msg_node *vhost_dequeue_msg(struct vhost_dev *dev, 219 219 struct list_head *head); 220 - unsigned int vhost_chr_poll(struct file *file, struct vhost_dev *dev, 220 + __poll_t vhost_chr_poll(struct file *file, struct vhost_dev *dev, 221 221 poll_table *wait); 222 222 ssize_t vhost_chr_read_iter(struct vhost_dev *dev, struct iov_iter *to, 223 223 int noblock);
+2 -2
drivers/virt/fsl_hypervisor.c
··· 565 565 /* 566 566 * Returns a bitmask indicating whether a read will block 567 567 */ 568 - static unsigned int fsl_hv_poll(struct file *filp, struct poll_table_struct *p) 568 + static __poll_t fsl_hv_poll(struct file *filp, struct poll_table_struct *p) 569 569 { 570 570 struct doorbell_queue *dbq = filp->private_data; 571 571 unsigned long flags; 572 - unsigned int mask; 572 + __poll_t mask; 573 573 574 574 spin_lock_irqsave(&dbq->lock, flags); 575 575
+2 -2
drivers/xen/evtchn.c
··· 621 621 return rc; 622 622 } 623 623 624 - static unsigned int evtchn_poll(struct file *file, poll_table *wait) 624 + static __poll_t evtchn_poll(struct file *file, poll_table *wait) 625 625 { 626 - unsigned int mask = POLLOUT | POLLWRNORM; 626 + __poll_t mask = POLLOUT | POLLWRNORM; 627 627 struct per_user_data *u = file->private_data; 628 628 629 629 poll_wait(file, &u->evtchn_wait, wait);
+1 -1
drivers/xen/mcelog.c
··· 139 139 return err ? err : buf - ubuf; 140 140 } 141 141 142 - static unsigned int xen_mce_chrdev_poll(struct file *file, poll_table *wait) 142 + static __poll_t xen_mce_chrdev_poll(struct file *file, poll_table *wait) 143 143 { 144 144 poll_wait(file, &xen_mce_chrdev_wait, wait); 145 145
+5 -5
drivers/xen/pvcalls-front.c
··· 878 878 return ret; 879 879 } 880 880 881 - static unsigned int pvcalls_front_poll_passive(struct file *file, 881 + static __poll_t pvcalls_front_poll_passive(struct file *file, 882 882 struct pvcalls_bedata *bedata, 883 883 struct sock_mapping *map, 884 884 poll_table *wait) ··· 935 935 return 0; 936 936 } 937 937 938 - static unsigned int pvcalls_front_poll_active(struct file *file, 938 + static __poll_t pvcalls_front_poll_active(struct file *file, 939 939 struct pvcalls_bedata *bedata, 940 940 struct sock_mapping *map, 941 941 poll_table *wait) 942 942 { 943 - unsigned int mask = 0; 943 + __poll_t mask = 0; 944 944 int32_t in_error, out_error; 945 945 struct pvcalls_data_intf *intf = map->active.ring; 946 946 ··· 958 958 return mask; 959 959 } 960 960 961 - unsigned int pvcalls_front_poll(struct file *file, struct socket *sock, 961 + __poll_t pvcalls_front_poll(struct file *file, struct socket *sock, 962 962 poll_table *wait) 963 963 { 964 964 struct pvcalls_bedata *bedata; 965 965 struct sock_mapping *map; 966 - int ret; 966 + __poll_t ret; 967 967 968 968 pvcalls_enter(); 969 969 if (!pvcalls_front_dev) {
+1 -1
drivers/xen/xenbus/xenbus_dev_frontend.c
··· 645 645 return 0; 646 646 } 647 647 648 - static unsigned int xenbus_file_poll(struct file *file, poll_table *wait) 648 + static __poll_t xenbus_file_poll(struct file *file, poll_table *wait) 649 649 { 650 650 struct xenbus_file_priv *u = file->private_data; 651 651
+3 -3
fs/cachefiles/daemon.c
··· 31 31 loff_t *); 32 32 static ssize_t cachefiles_daemon_write(struct file *, const char __user *, 33 33 size_t, loff_t *); 34 - static unsigned int cachefiles_daemon_poll(struct file *, 34 + static __poll_t cachefiles_daemon_poll(struct file *, 35 35 struct poll_table_struct *); 36 36 static int cachefiles_daemon_frun(struct cachefiles_cache *, char *); 37 37 static int cachefiles_daemon_fcull(struct cachefiles_cache *, char *); ··· 291 291 * poll for culling state 292 292 * - use POLLOUT to indicate culling state 293 293 */ 294 - static unsigned int cachefiles_daemon_poll(struct file *file, 294 + static __poll_t cachefiles_daemon_poll(struct file *file, 295 295 struct poll_table_struct *poll) 296 296 { 297 297 struct cachefiles_cache *cache = file->private_data; 298 - unsigned int mask; 298 + __poll_t mask; 299 299 300 300 poll_wait(file, &cache->daemon_pollwq, poll); 301 301 mask = 0;
+2 -2
fs/coda/psdev.c
··· 61 61 * Device operations 62 62 */ 63 63 64 - static unsigned int coda_psdev_poll(struct file *file, poll_table * wait) 64 + static __poll_t coda_psdev_poll(struct file *file, poll_table * wait) 65 65 { 66 66 struct venus_comm *vcp = (struct venus_comm *) file->private_data; 67 - unsigned int mask = POLLOUT | POLLWRNORM; 67 + __poll_t mask = POLLOUT | POLLWRNORM; 68 68 69 69 poll_wait(file, &vcp->vc_waitq, wait); 70 70 mutex_lock(&vcp->vc_mutex);
+2 -2
fs/debugfs/file.c
··· 206 206 PROTO(struct file *filp, unsigned int cmd, unsigned long arg), 207 207 ARGS(filp, cmd, arg)); 208 208 209 - static unsigned int full_proxy_poll(struct file *filp, 209 + static __poll_t full_proxy_poll(struct file *filp, 210 210 struct poll_table_struct *wait) 211 211 { 212 212 struct dentry *dentry = F_DENTRY(filp); 213 - unsigned int r = 0; 213 + __poll_t r = 0; 214 214 const struct file_operations *real_fops; 215 215 216 216 if (debugfs_file_get(dentry))
+2 -2
fs/dlm/plock.c
··· 463 463 return count; 464 464 } 465 465 466 - static unsigned int dev_poll(struct file *file, poll_table *wait) 466 + static __poll_t dev_poll(struct file *file, poll_table *wait) 467 467 { 468 - unsigned int mask = 0; 468 + __poll_t mask = 0; 469 469 470 470 poll_wait(file, &send_wq, wait); 471 471
+1 -1
fs/dlm/user.c
··· 887 887 return rv; 888 888 } 889 889 890 - static unsigned int device_poll(struct file *file, poll_table *wait) 890 + static __poll_t device_poll(struct file *file, poll_table *wait) 891 891 { 892 892 struct dlm_user_proc *proc = file->private_data; 893 893
+2 -2
fs/ecryptfs/miscdev.c
··· 38 38 * 39 39 * Returns the poll mask 40 40 */ 41 - static unsigned int 41 + static __poll_t 42 42 ecryptfs_miscdev_poll(struct file *file, poll_table *pt) 43 43 { 44 44 struct ecryptfs_daemon *daemon = file->private_data; 45 - unsigned int mask = 0; 45 + __poll_t mask = 0; 46 46 47 47 mutex_lock(&daemon->mux); 48 48 if (daemon->flags & ECRYPTFS_DAEMON_ZOMBIE) {
+2 -2
fs/eventfd.c
··· 114 114 return 0; 115 115 } 116 116 117 - static unsigned int eventfd_poll(struct file *file, poll_table *wait) 117 + static __poll_t eventfd_poll(struct file *file, poll_table *wait) 118 118 { 119 119 struct eventfd_ctx *ctx = file->private_data; 120 - unsigned int events = 0; 120 + __poll_t events = 0; 121 121 u64 count; 122 122 123 123 poll_wait(file, &ctx->wqh, wait);
+13 -15
fs/eventpoll.c
··· 874 874 * the ep->mtx so we need to start from depth=1, such that mutex_lock_nested() 875 875 * is correctly annotated. 876 876 */ 877 - static unsigned int ep_item_poll(struct epitem *epi, poll_table *pt, int depth) 877 + static unsigned int ep_item_poll(const struct epitem *epi, poll_table *pt, 878 + int depth) 878 879 { 879 880 struct eventpoll *ep; 880 881 bool locked; ··· 921 920 return 0; 922 921 } 923 922 924 - static unsigned int ep_eventpoll_poll(struct file *file, poll_table *wait) 923 + static __poll_t ep_eventpoll_poll(struct file *file, poll_table *wait) 925 924 { 926 925 struct eventpoll *ep = file->private_data; 927 926 int depth = 0; ··· 1118 1117 unsigned long flags; 1119 1118 struct epitem *epi = ep_item_from_wait(wait); 1120 1119 struct eventpoll *ep = epi->ep; 1120 + __poll_t pollflags = key_to_poll(key); 1121 1121 int ewake = 0; 1122 1122 1123 1123 spin_lock_irqsave(&ep->lock, flags); ··· 1140 1138 * callback. We need to be able to handle both cases here, hence the 1141 1139 * test for "key" != NULL before the event match test. 1142 1140 */ 1143 - if (key && !((unsigned long) key & epi->event.events)) 1141 + if (pollflags && !(pollflags & epi->event.events)) 1144 1142 goto out_unlock; 1145 1143 1146 1144 /* ··· 1177 1175 */ 1178 1176 if (waitqueue_active(&ep->wq)) { 1179 1177 if ((epi->event.events & EPOLLEXCLUSIVE) && 1180 - !((unsigned long)key & POLLFREE)) { 1181 - switch ((unsigned long)key & EPOLLINOUT_BITS) { 1178 + !(pollflags & POLLFREE)) { 1179 + switch (pollflags & EPOLLINOUT_BITS) { 1182 1180 case POLLIN: 1183 1181 if (epi->event.events & POLLIN) 1184 1182 ewake = 1; ··· 1207 1205 if (!(epi->event.events & EPOLLEXCLUSIVE)) 1208 1206 ewake = 1; 1209 1207 1210 - if ((unsigned long)key & POLLFREE) { 1208 + if (pollflags & POLLFREE) { 1211 1209 /* 1212 1210 * If we race with ep_remove_wait_queue() it can miss 1213 1211 * ->whead = NULL and do another remove_wait_queue() after ··· 1411 1409 /* 1412 1410 * Must be called with "mtx" held. 1413 1411 */ 1414 - static int ep_insert(struct eventpoll *ep, struct epoll_event *event, 1412 + static int ep_insert(struct eventpoll *ep, const struct epoll_event *event, 1415 1413 struct file *tfile, int fd, int full_check) 1416 1414 { 1417 1415 int error, revents, pwake = 0; ··· 1488 1486 ep_set_busy_poll_napi_id(epi); 1489 1487 1490 1488 /* If the file is already "ready" we drop it inside the ready list */ 1491 - if ((revents & event->events) && !ep_is_linked(&epi->rdllink)) { 1489 + if (revents && !ep_is_linked(&epi->rdllink)) { 1492 1490 list_add_tail(&epi->rdllink, &ep->rdllist); 1493 1491 ep_pm_stay_awake(epi); 1494 1492 ··· 1542 1540 * Modify the interest event mask by dropping an event if the new mask 1543 1541 * has a match in the current file status. Must be called with "mtx" held. 1544 1542 */ 1545 - static int ep_modify(struct eventpoll *ep, struct epitem *epi, struct epoll_event *event) 1543 + static int ep_modify(struct eventpoll *ep, struct epitem *epi, 1544 + const struct epoll_event *event) 1546 1545 { 1547 1546 int pwake = 0; 1548 - unsigned int revents; 1549 1547 poll_table pt; 1550 1548 1551 1549 init_poll_funcptr(&pt, NULL); ··· 1587 1585 /* 1588 1586 * Get current event bits. We can safely use the file* here because 1589 1587 * its usage count has been increased by the caller of this function. 1590 - */ 1591 - revents = ep_item_poll(epi, &pt, 1); 1592 - 1593 - /* 1594 1588 * If the item is "hot" and it is not registered inside the ready 1595 1589 * list, push it inside. 1596 1590 */ 1597 - if (revents & event->events) { 1591 + if (ep_item_poll(epi, &pt, 1)) { 1598 1592 spin_lock_irq(&ep->lock); 1599 1593 if (!ep_is_linked(&epi->rdllink)) { 1600 1594 list_add_tail(&epi->rdllink, &ep->rdllist);
+2 -2
fs/fcntl.c
··· 690 690 691 691 /* Table to convert sigio signal codes into poll band bitmaps */ 692 692 693 - static const long band_table[NSIGPOLL] = { 693 + static const __poll_t band_table[NSIGPOLL] = { 694 694 POLLIN | POLLRDNORM, /* POLL_IN */ 695 695 POLLOUT | POLLWRNORM | POLLWRBAND, /* POLL_OUT */ 696 696 POLLIN | POLLRDNORM | POLLMSG, /* POLL_MSG */ ··· 759 759 if (reason - POLL_IN >= NSIGPOLL) 760 760 si.si_band = ~0L; 761 761 else 762 - si.si_band = band_table[reason - POLL_IN]; 762 + si.si_band = mangle_poll(band_table[reason - POLL_IN]); 763 763 si.si_fd = fd; 764 764 if (!do_send_sig_info(signum, &si, p, group)) 765 765 break;
+2 -2
fs/fuse/dev.c
··· 2004 2004 return ret; 2005 2005 } 2006 2006 2007 - static unsigned fuse_dev_poll(struct file *file, poll_table *wait) 2007 + static __poll_t fuse_dev_poll(struct file *file, poll_table *wait) 2008 2008 { 2009 - unsigned mask = POLLOUT | POLLWRNORM; 2009 + __poll_t mask = POLLOUT | POLLWRNORM; 2010 2010 struct fuse_iqueue *fiq; 2011 2011 struct fuse_dev *fud = fuse_get_dev(file); 2012 2012
+3 -3
fs/fuse/file.c
··· 2751 2751 spin_unlock(&fc->lock); 2752 2752 } 2753 2753 2754 - unsigned fuse_file_poll(struct file *file, poll_table *wait) 2754 + __poll_t fuse_file_poll(struct file *file, poll_table *wait) 2755 2755 { 2756 2756 struct fuse_file *ff = file->private_data; 2757 2757 struct fuse_conn *fc = ff->fc; ··· 2764 2764 return DEFAULT_POLLMASK; 2765 2765 2766 2766 poll_wait(file, &ff->poll_wait, wait); 2767 - inarg.events = (__u32)poll_requested_events(wait); 2767 + inarg.events = mangle_poll(poll_requested_events(wait)); 2768 2768 2769 2769 /* 2770 2770 * Ask for notification iff there's someone waiting for it. ··· 2786 2786 err = fuse_simple_request(fc, &args); 2787 2787 2788 2788 if (!err) 2789 - return outarg.revents; 2789 + return demangle_poll(outarg.revents); 2790 2790 if (err == -ENOSYS) { 2791 2791 fc->no_poll = 1; 2792 2792 return DEFAULT_POLLMASK;
+1 -1
fs/fuse/fuse_i.h
··· 951 951 unsigned int flags); 952 952 long fuse_ioctl_common(struct file *file, unsigned int cmd, 953 953 unsigned long arg, unsigned int flags); 954 - unsigned fuse_file_poll(struct file *file, poll_table *wait); 954 + __poll_t fuse_file_poll(struct file *file, poll_table *wait); 955 955 int fuse_dev_release(struct inode *inode, struct file *file); 956 956 957 957 bool fuse_write_update_size(struct inode *inode, loff_t pos);
+1 -1
fs/kernfs/file.c
··· 832 832 * to see if it supports poll (Neither 'poll' nor 'select' return 833 833 * an appropriate error code). When in doubt, set a suitable timeout value. 834 834 */ 835 - static unsigned int kernfs_fop_poll(struct file *filp, poll_table *wait) 835 + static __poll_t kernfs_fop_poll(struct file *filp, poll_table *wait) 836 836 { 837 837 struct kernfs_open_file *of = kernfs_of(filp); 838 838 struct kernfs_node *kn = kernfs_dentry_node(filp->f_path.dentry);
+2 -2
fs/notify/fanotify/fanotify_user.c
··· 239 239 } 240 240 241 241 /* intofiy userspace file descriptor functions */ 242 - static unsigned int fanotify_poll(struct file *file, poll_table *wait) 242 + static __poll_t fanotify_poll(struct file *file, poll_table *wait) 243 243 { 244 244 struct fsnotify_group *group = file->private_data; 245 - int ret = 0; 245 + __poll_t ret = 0; 246 246 247 247 poll_wait(file, &group->notification_waitq, wait); 248 248 spin_lock(&group->notification_lock);
+2 -2
fs/notify/inotify/inotify_user.c
··· 107 107 } 108 108 109 109 /* intofiy userspace file descriptor functions */ 110 - static unsigned int inotify_poll(struct file *file, poll_table *wait) 110 + static __poll_t inotify_poll(struct file *file, poll_table *wait) 111 111 { 112 112 struct fsnotify_group *group = file->private_data; 113 - int ret = 0; 113 + __poll_t ret = 0; 114 114 115 115 poll_wait(file, &group->notification_waitq, wait); 116 116 spin_lock(&group->notification_lock);
+2 -2
fs/ocfs2/dlmfs/dlmfs.c
··· 220 220 return 0; 221 221 } 222 222 223 - static unsigned int dlmfs_file_poll(struct file *file, poll_table *wait) 223 + static __poll_t dlmfs_file_poll(struct file *file, poll_table *wait) 224 224 { 225 - int event = 0; 225 + __poll_t event = 0; 226 226 struct inode *inode = file_inode(file); 227 227 struct dlmfs_inode_private *ip = DLMFS_I(inode); 228 228
+3 -3
fs/orangefs/devorangefs-req.c
··· 815 815 ORANGEFS_REQDEVICE_NAME); 816 816 } 817 817 818 - static unsigned int orangefs_devreq_poll(struct file *file, 818 + static __poll_t orangefs_devreq_poll(struct file *file, 819 819 struct poll_table_struct *poll_table) 820 820 { 821 - int poll_revent_mask = 0; 821 + __poll_t poll_revent_mask = 0; 822 822 823 823 poll_wait(file, &orangefs_request_list_waitq, poll_table); 824 824 825 825 if (!list_empty(&orangefs_request_list)) 826 - poll_revent_mask |= POLL_IN; 826 + poll_revent_mask |= POLLIN; 827 827 return poll_revent_mask; 828 828 } 829 829
+2 -2
fs/pipe.c
··· 515 515 } 516 516 517 517 /* No kernel lock held - fine */ 518 - static unsigned int 518 + static __poll_t 519 519 pipe_poll(struct file *filp, poll_table *wait) 520 520 { 521 - unsigned int mask; 521 + __poll_t mask; 522 522 struct pipe_inode_info *pipe = filp->private_data; 523 523 int nrbufs; 524 524
+3 -3
fs/proc/inode.c
··· 234 234 return rv; 235 235 } 236 236 237 - static unsigned int proc_reg_poll(struct file *file, struct poll_table_struct *pts) 237 + static __poll_t proc_reg_poll(struct file *file, struct poll_table_struct *pts) 238 238 { 239 239 struct proc_dir_entry *pde = PDE(file_inode(file)); 240 - unsigned int rv = DEFAULT_POLLMASK; 241 - unsigned int (*poll)(struct file *, struct poll_table_struct *); 240 + __poll_t rv = DEFAULT_POLLMASK; 241 + __poll_t (*poll)(struct file *, struct poll_table_struct *); 242 242 if (use_pde(pde)) { 243 243 poll = pde->proc_fops->poll; 244 244 if (poll)
+1 -1
fs/proc/kmsg.c
··· 40 40 return do_syslog(SYSLOG_ACTION_READ, buf, count, SYSLOG_FROM_PROC); 41 41 } 42 42 43 - static unsigned int kmsg_poll(struct file *file, poll_table *wait) 43 + static __poll_t kmsg_poll(struct file *file, poll_table *wait) 44 44 { 45 45 poll_wait(file, &log_wait, wait); 46 46 if (do_syslog(SYSLOG_ACTION_SIZE_UNREAD, NULL, 0, SYSLOG_FROM_PROC))
+2 -2
fs/proc/proc_sysctl.c
··· 630 630 return 0; 631 631 } 632 632 633 - static unsigned int proc_sys_poll(struct file *filp, poll_table *wait) 633 + static __poll_t proc_sys_poll(struct file *filp, poll_table *wait) 634 634 { 635 635 struct inode *inode = file_inode(filp); 636 636 struct ctl_table_header *head = grab_header(inode); 637 637 struct ctl_table *table = PROC_I(inode)->sysctl_entry; 638 - unsigned int ret = DEFAULT_POLLMASK; 638 + __poll_t ret = DEFAULT_POLLMASK; 639 639 unsigned long event; 640 640 641 641 /* sysctl was unregistered */
+2 -2
fs/proc_namespace.c
··· 18 18 #include "pnode.h" 19 19 #include "internal.h" 20 20 21 - static unsigned mounts_poll(struct file *file, poll_table *wait) 21 + static __poll_t mounts_poll(struct file *file, poll_table *wait) 22 22 { 23 23 struct seq_file *m = file->private_data; 24 24 struct proc_mounts *p = m->private; 25 25 struct mnt_namespace *ns = p->ns; 26 - unsigned res = POLLIN | POLLRDNORM; 26 + __poll_t res = POLLIN | POLLRDNORM; 27 27 int event; 28 28 29 29 poll_wait(file, &p->ns->poll, wait);
+16 -11
fs/select.c
··· 212 212 struct poll_table_entry *entry; 213 213 214 214 entry = container_of(wait, struct poll_table_entry, wait); 215 - if (key && !((unsigned long)key & entry->key)) 215 + if (key && !(key_to_poll(key) & entry->key)) 216 216 return 0; 217 217 return __pollwake(wait, mode, sync, key); 218 218 } ··· 438 438 439 439 static inline void wait_key_set(poll_table *wait, unsigned long in, 440 440 unsigned long out, unsigned long bit, 441 - unsigned int ll_flag) 441 + __poll_t ll_flag) 442 442 { 443 443 wait->_key = POLLEX_SET | ll_flag; 444 444 if (in & bit) ··· 454 454 poll_table *wait; 455 455 int retval, i, timed_out = 0; 456 456 u64 slack = 0; 457 - unsigned int busy_flag = net_busy_loop_on() ? POLL_BUSY_LOOP : 0; 457 + __poll_t busy_flag = net_busy_loop_on() ? POLL_BUSY_LOOP : 0; 458 458 unsigned long busy_start = 0; 459 459 460 460 rcu_read_lock(); ··· 484 484 rinp = fds->res_in; routp = fds->res_out; rexp = fds->res_ex; 485 485 486 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 488 unsigned long res_in = 0, res_out = 0, res_ex = 0; 489 + __poll_t mask; 489 490 490 491 in = *inp++; out = *outp++; ex = *exp++; 491 492 all_bits = in | out | ex; ··· 803 802 * pwait poll_table will be used by the fd-provided poll handler for waiting, 804 803 * if pwait->_qproc is non-NULL. 805 804 */ 806 - static inline unsigned int do_pollfd(struct pollfd *pollfd, poll_table *pwait, 805 + static inline __poll_t do_pollfd(struct pollfd *pollfd, poll_table *pwait, 807 806 bool *can_busy_poll, 808 - unsigned int busy_flag) 807 + __poll_t busy_flag) 809 808 { 810 - unsigned int mask; 809 + __poll_t mask; 811 810 int fd; 812 811 813 812 mask = 0; ··· 816 815 struct fd f = fdget(fd); 817 816 mask = POLLNVAL; 818 817 if (f.file) { 818 + /* userland u16 ->events contains POLL... bitmap */ 819 + __poll_t filter = demangle_poll(pollfd->events) | 820 + POLLERR | POLLHUP; 819 821 mask = DEFAULT_POLLMASK; 820 822 if (f.file->f_op->poll) { 821 - pwait->_key = pollfd->events|POLLERR|POLLHUP; 823 + pwait->_key = filter; 822 824 pwait->_key |= busy_flag; 823 825 mask = f.file->f_op->poll(f.file, pwait); 824 826 if (mask & busy_flag) 825 827 *can_busy_poll = true; 826 828 } 827 829 /* Mask out unneeded events. */ 828 - mask &= pollfd->events | POLLERR | POLLHUP; 830 + mask &= filter; 829 831 fdput(f); 830 832 } 831 833 } 832 - pollfd->revents = mask; 834 + /* ... and so does ->revents */ 835 + pollfd->revents = mangle_poll(mask); 833 836 834 837 return mask; 835 838 } ··· 845 840 ktime_t expire, *to = NULL; 846 841 int timed_out = 0, count = 0; 847 842 u64 slack = 0; 848 - unsigned int busy_flag = net_busy_loop_on() ? POLL_BUSY_LOOP : 0; 843 + __poll_t busy_flag = net_busy_loop_on() ? POLL_BUSY_LOOP : 0; 849 844 unsigned long busy_start = 0; 850 845 851 846 /* Optimise the no-wait case */
+2 -2
fs/signalfd.c
··· 58 58 return 0; 59 59 } 60 60 61 - static unsigned int signalfd_poll(struct file *file, poll_table *wait) 61 + static __poll_t signalfd_poll(struct file *file, poll_table *wait) 62 62 { 63 63 struct signalfd_ctx *ctx = file->private_data; 64 - unsigned int events = 0; 64 + __poll_t events = 0; 65 65 66 66 poll_wait(file, &current->sighand->signalfd_wqh, wait); 67 67
+2 -2
fs/timerfd.c
··· 227 227 return 0; 228 228 } 229 229 230 - static unsigned int timerfd_poll(struct file *file, poll_table *wait) 230 + static __poll_t timerfd_poll(struct file *file, poll_table *wait) 231 231 { 232 232 struct timerfd_ctx *ctx = file->private_data; 233 - unsigned int events = 0; 233 + __poll_t events = 0; 234 234 unsigned long flags; 235 235 236 236 poll_wait(file, &ctx->wqh, wait);
+2 -2
fs/userfaultfd.c
··· 937 937 return find_userfault_in(&ctx->event_wqh); 938 938 } 939 939 940 - static unsigned int userfaultfd_poll(struct file *file, poll_table *wait) 940 + static __poll_t userfaultfd_poll(struct file *file, poll_table *wait) 941 941 { 942 942 struct userfaultfd_ctx *ctx = file->private_data; 943 - unsigned int ret; 943 + __poll_t ret; 944 944 945 945 poll_wait(file, &ctx->fd_wqh, wait); 946 946
+1 -1
include/crypto/if_alg.h
··· 245 245 int offset, size_t size, int flags); 246 246 void af_alg_free_resources(struct af_alg_async_req *areq); 247 247 void af_alg_async_cb(struct crypto_async_request *_req, int err); 248 - unsigned int af_alg_poll(struct file *file, struct socket *sock, 248 + __poll_t af_alg_poll(struct file *file, struct socket *sock, 249 249 poll_table *wait); 250 250 struct af_alg_async_req *af_alg_alloc_areq(struct sock *sk, 251 251 unsigned int areqlen);
+1 -1
include/drm/drm_file.h
··· 364 364 ssize_t drm_read(struct file *filp, char __user *buffer, 365 365 size_t count, loff_t *offset); 366 366 int drm_release(struct inode *inode, struct file *filp); 367 - unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait); 367 + __poll_t drm_poll(struct file *filp, struct poll_table_struct *wait); 368 368 int drm_event_reserve_init_locked(struct drm_device *dev, 369 369 struct drm_file *file_priv, 370 370 struct drm_pending_event *p,
+1 -1
include/linux/dma-buf.h
··· 301 301 struct dma_fence_cb cb; 302 302 wait_queue_head_t *poll; 303 303 304 - unsigned long active; 304 + __poll_t active; 305 305 } cb_excl, cb_shared; 306 306 }; 307 307
+1 -1
include/linux/fs.h
··· 1698 1698 ssize_t (*write_iter) (struct kiocb *, struct iov_iter *); 1699 1699 int (*iterate) (struct file *, struct dir_context *); 1700 1700 int (*iterate_shared) (struct file *, struct dir_context *); 1701 - unsigned int (*poll) (struct file *, struct poll_table_struct *); 1701 + __poll_t (*poll) (struct file *, struct poll_table_struct *); 1702 1702 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); 1703 1703 long (*compat_ioctl) (struct file *, unsigned int, unsigned long); 1704 1704 int (*mmap) (struct file *, struct vm_area_struct *);
+1 -1
include/linux/net.h
··· 147 147 int (*getname) (struct socket *sock, 148 148 struct sockaddr *addr, 149 149 int *sockaddr_len, int peer); 150 - unsigned int (*poll) (struct file *file, struct socket *sock, 150 + __poll_t (*poll) (struct file *file, struct socket *sock, 151 151 struct poll_table_struct *wait); 152 152 int (*ioctl) (struct socket *sock, unsigned int cmd, 153 153 unsigned long arg);
+5 -5
include/linux/poll.h
··· 37 37 */ 38 38 typedef struct poll_table_struct { 39 39 poll_queue_proc _qproc; 40 - unsigned long _key; 40 + __poll_t _key; 41 41 } poll_table; 42 42 43 43 static inline void poll_wait(struct file * filp, wait_queue_head_t * wait_address, poll_table *p) ··· 62 62 * to be started implicitly on poll(). You typically only want to do that 63 63 * if the application is actually polling for POLLIN and/or POLLOUT. 64 64 */ 65 - static inline unsigned long poll_requested_events(const poll_table *p) 65 + static inline __poll_t poll_requested_events(const poll_table *p) 66 66 { 67 - return p ? p->_key : ~0UL; 67 + return p ? p->_key : ~(__poll_t)0; 68 68 } 69 69 70 70 static inline void init_poll_funcptr(poll_table *pt, poll_queue_proc qproc) 71 71 { 72 72 pt->_qproc = qproc; 73 - pt->_key = ~0UL; /* all events enabled */ 73 + pt->_key = ~(__poll_t)0; /* all events enabled */ 74 74 } 75 75 76 76 struct poll_table_entry { 77 77 struct file *filp; 78 - unsigned long key; 78 + __poll_t key; 79 79 wait_queue_entry_t wait; 80 80 wait_queue_head_t *wait_address; 81 81 };
+1 -1
include/linux/posix-clock.h
··· 68 68 69 69 int (*open) (struct posix_clock *pc, fmode_t f_mode); 70 70 71 - uint (*poll) (struct posix_clock *pc, 71 + __poll_t (*poll) (struct posix_clock *pc, 72 72 struct file *file, poll_table *wait); 73 73 74 74 int (*release) (struct posix_clock *pc);
+1 -1
include/linux/ring_buffer.h
··· 96 96 }) 97 97 98 98 int ring_buffer_wait(struct ring_buffer *buffer, int cpu, bool full); 99 - int ring_buffer_poll_wait(struct ring_buffer *buffer, int cpu, 99 + __poll_t ring_buffer_poll_wait(struct ring_buffer *buffer, int cpu, 100 100 struct file *filp, poll_table *poll_table); 101 101 102 102
+2 -2
include/linux/rpmsg.h
··· 157 157 int rpmsg_trysend_offchannel(struct rpmsg_endpoint *ept, u32 src, u32 dst, 158 158 void *data, int len); 159 159 160 - unsigned int rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp, 160 + __poll_t rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp, 161 161 poll_table *wait); 162 162 163 163 #else ··· 258 258 return -ENXIO; 259 259 } 260 260 261 - static inline unsigned int rpmsg_poll(struct rpmsg_endpoint *ept, 261 + static inline __poll_t rpmsg_poll(struct rpmsg_endpoint *ept, 262 262 struct file *filp, poll_table *wait) 263 263 { 264 264 /* This shouldn't be possible */
+2 -2
include/linux/scif.h
··· 123 123 */ 124 124 struct scif_pollepd { 125 125 scif_epd_t epd; 126 - short events; 127 - short revents; 126 + __poll_t events; 127 + __poll_t revents; 128 128 }; 129 129 130 130 /**
+1 -1
include/linux/skbuff.h
··· 3241 3241 int *peeked, int *off, int *err); 3242 3242 struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock, 3243 3243 int *err); 3244 - unsigned int datagram_poll(struct file *file, struct socket *sock, 3244 + __poll_t datagram_poll(struct file *file, struct socket *sock, 3245 3245 struct poll_table_struct *wait); 3246 3246 int skb_copy_datagram_iter(const struct sk_buff *from, int offset, 3247 3247 struct iov_iter *to, int size);
+1 -1
include/linux/tty_ldisc.h
··· 187 187 long (*compat_ioctl)(struct tty_struct *tty, struct file *file, 188 188 unsigned int cmd, unsigned long arg); 189 189 void (*set_termios)(struct tty_struct *tty, struct ktermios *old); 190 - unsigned int (*poll)(struct tty_struct *, struct file *, 190 + __poll_t (*poll)(struct tty_struct *, struct file *, 191 191 struct poll_table_struct *); 192 192 int (*hangup)(struct tty_struct *tty); 193 193
+6 -4
include/linux/wait.h
··· 206 206 /* 207 207 * Wakeup macros to be used to report events to the targets. 208 208 */ 209 + #define poll_to_key(m) ((void *)(__force uintptr_t)(__poll_t)(m)) 210 + #define key_to_poll(m) ((__force __poll_t)(uintptr_t)(void *)(m)) 209 211 #define wake_up_poll(x, m) \ 210 - __wake_up(x, TASK_NORMAL, 1, (void *) (m)) 212 + __wake_up(x, TASK_NORMAL, 1, poll_to_key(m)) 211 213 #define wake_up_locked_poll(x, m) \ 212 - __wake_up_locked_key((x), TASK_NORMAL, (void *) (m)) 214 + __wake_up_locked_key((x), TASK_NORMAL, poll_to_key(m)) 213 215 #define wake_up_interruptible_poll(x, m) \ 214 - __wake_up(x, TASK_INTERRUPTIBLE, 1, (void *) (m)) 216 + __wake_up(x, TASK_INTERRUPTIBLE, 1, poll_to_key(m)) 215 217 #define wake_up_interruptible_sync_poll(x, m) \ 216 - __wake_up_sync_key((x), TASK_INTERRUPTIBLE, 1, (void *) (m)) 218 + __wake_up_sync_key((x), TASK_INTERRUPTIBLE, 1, poll_to_key(m)) 217 219 218 220 #define ___wait_cond_timeout(condition) \ 219 221 ({ \
+1 -1
include/media/lirc_dev.h
··· 185 185 */ 186 186 int lirc_dev_fop_open(struct inode *inode, struct file *file); 187 187 int lirc_dev_fop_close(struct inode *inode, struct file *file); 188 - unsigned int lirc_dev_fop_poll(struct file *file, poll_table *wait); 188 + __poll_t lirc_dev_fop_poll(struct file *file, poll_table *wait); 189 189 long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg); 190 190 ssize_t lirc_dev_fop_read(struct file *file, char __user *buffer, size_t length, 191 191 loff_t *ppos);
+1 -1
include/media/media-devnode.h
··· 56 56 struct module *owner; 57 57 ssize_t (*read) (struct file *, char __user *, size_t, loff_t *); 58 58 ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); 59 - unsigned int (*poll) (struct file *, struct poll_table_struct *); 59 + __poll_t (*poll) (struct file *, struct poll_table_struct *); 60 60 long (*ioctl) (struct file *, unsigned int, unsigned long); 61 61 long (*compat_ioctl) (struct file *, unsigned int, unsigned long); 62 62 int (*open) (struct file *);
+1 -1
include/media/soc_camera.h
··· 117 117 int (*get_parm)(struct soc_camera_device *, struct v4l2_streamparm *); 118 118 int (*set_parm)(struct soc_camera_device *, struct v4l2_streamparm *); 119 119 int (*enum_framesizes)(struct soc_camera_device *, struct v4l2_frmsizeenum *); 120 - unsigned int (*poll)(struct file *, poll_table *); 120 + __poll_t (*poll)(struct file *, poll_table *); 121 121 }; 122 122 123 123 #define SOCAM_SENSOR_INVERT_PCLK (1 << 0)
+1 -1
include/media/v4l2-ctrls.h
··· 1037 1037 * @file: pointer to struct file 1038 1038 * @wait: pointer to struct poll_table_struct 1039 1039 */ 1040 - unsigned int v4l2_ctrl_poll(struct file *file, struct poll_table_struct *wait); 1040 + __poll_t v4l2_ctrl_poll(struct file *file, struct poll_table_struct *wait); 1041 1041 1042 1042 /* Helpers for ioctl_ops */ 1043 1043
+1 -1
include/media/v4l2-dev.h
··· 152 152 struct module *owner; 153 153 ssize_t (*read) (struct file *, char __user *, size_t, loff_t *); 154 154 ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); 155 - unsigned int (*poll) (struct file *, struct poll_table_struct *); 155 + __poll_t (*poll) (struct file *, struct poll_table_struct *); 156 156 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); 157 157 #ifdef CONFIG_COMPAT 158 158 long (*compat_ioctl32) (struct file *, unsigned int, unsigned long);
+2 -2
include/media/v4l2-mem2mem.h
··· 297 297 * indicate that a non-blocking write can be performed, while read will be 298 298 * returned in case of the destination queue. 299 299 */ 300 - unsigned int v4l2_m2m_poll(struct file *file, struct v4l2_m2m_ctx *m2m_ctx, 300 + __poll_t v4l2_m2m_poll(struct file *file, struct v4l2_m2m_ctx *m2m_ctx, 301 301 struct poll_table_struct *wait); 302 302 303 303 /** ··· 601 601 int v4l2_m2m_ioctl_streamoff(struct file *file, void *fh, 602 602 enum v4l2_buf_type type); 603 603 int v4l2_m2m_fop_mmap(struct file *file, struct vm_area_struct *vma); 604 - unsigned int v4l2_m2m_fop_poll(struct file *file, poll_table *wait); 604 + __poll_t v4l2_m2m_fop_poll(struct file *file, poll_table *wait); 605 605 606 606 #endif /* _MEDIA_V4L2_MEM2MEM_H */ 607 607
+1 -1
include/media/videobuf-core.h
··· 219 219 ssize_t videobuf_read_one(struct videobuf_queue *q, 220 220 char __user *data, size_t count, loff_t *ppos, 221 221 int nonblocking); 222 - unsigned int videobuf_poll_stream(struct file *file, 222 + __poll_t videobuf_poll_stream(struct file *file, 223 223 struct videobuf_queue *q, 224 224 poll_table *wait); 225 225
+1 -1
include/media/videobuf2-core.h
··· 871 871 * The return values from this function are intended to be directly returned 872 872 * from poll handler in driver. 873 873 */ 874 - unsigned int vb2_core_poll(struct vb2_queue *q, struct file *file, 874 + __poll_t vb2_core_poll(struct vb2_queue *q, struct file *file, 875 875 poll_table *wait); 876 876 877 877 size_t vb2_read(struct vb2_queue *q, char __user *data, size_t count,
+2 -3
include/media/videobuf2-v4l2.h
··· 226 226 * The return values from this function are intended to be directly returned 227 227 * from poll handler in driver. 228 228 */ 229 - unsigned int vb2_poll(struct vb2_queue *q, struct file *file, 230 - poll_table *wait); 229 + __poll_t vb2_poll(struct vb2_queue *q, struct file *file, poll_table *wait); 231 230 232 231 /* 233 232 * The following functions are not part of the vb2 core API, but are simple ··· 261 262 size_t count, loff_t *ppos); 262 263 ssize_t vb2_fop_read(struct file *file, char __user *buf, 263 264 size_t count, loff_t *ppos); 264 - unsigned int vb2_fop_poll(struct file *file, poll_table *wait); 265 + __poll_t vb2_fop_poll(struct file *file, poll_table *wait); 265 266 #ifndef CONFIG_MMU 266 267 unsigned long vb2_fop_get_unmapped_area(struct file *file, unsigned long addr, 267 268 unsigned long len, unsigned long pgoff, unsigned long flags);
+1 -1
include/misc/cxl.h
··· 267 267 int cxl_fd_release(struct inode *inode, struct file *file); 268 268 long cxl_fd_ioctl(struct file *file, unsigned int cmd, unsigned long arg); 269 269 int cxl_fd_mmap(struct file *file, struct vm_area_struct *vm); 270 - unsigned int cxl_fd_poll(struct file *file, struct poll_table_struct *poll); 270 + __poll_t cxl_fd_poll(struct file *file, struct poll_table_struct *poll); 271 271 ssize_t cxl_fd_read(struct file *file, char __user *buf, size_t count, 272 272 loff_t *off); 273 273
+1 -1
include/net/bluetooth/bluetooth.h
··· 271 271 int flags); 272 272 int bt_sock_stream_recvmsg(struct socket *sock, struct msghdr *msg, 273 273 size_t len, int flags); 274 - uint bt_sock_poll(struct file *file, struct socket *sock, poll_table *wait); 274 + __poll_t bt_sock_poll(struct file *file, struct socket *sock, poll_table *wait); 275 275 int bt_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); 276 276 int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo); 277 277 int bt_sock_wait_ready(struct sock *sk, unsigned long flags);
+1 -1
include/net/inet_connection_sock.h
··· 305 305 /* 306 306 * LISTEN is a special case for poll.. 307 307 */ 308 - static inline unsigned int inet_csk_listen_poll(const struct sock *sk) 308 + static inline __poll_t inet_csk_listen_poll(const struct sock *sk) 309 309 { 310 310 return !reqsk_queue_empty(&inet_csk(sk)->icsk_accept_queue) ? 311 311 (POLLIN | POLLRDNORM) : 0;
+1 -1
include/net/iucv/af_iucv.h
··· 153 153 atomic_t autobind_name; 154 154 }; 155 155 156 - unsigned int iucv_sock_poll(struct file *file, struct socket *sock, 156 + __poll_t iucv_sock_poll(struct file *file, struct socket *sock, 157 157 poll_table *wait); 158 158 void iucv_sock_link(struct iucv_sock_list *l, struct sock *s); 159 159 void iucv_sock_unlink(struct iucv_sock_list *l, struct sock *s);
+1 -1
include/net/sctp/sctp.h
··· 107 107 int sctp_inet_listen(struct socket *sock, int backlog); 108 108 void sctp_write_space(struct sock *sk); 109 109 void sctp_data_ready(struct sock *sk); 110 - unsigned int sctp_poll(struct file *file, struct socket *sock, 110 + __poll_t sctp_poll(struct file *file, struct socket *sock, 111 111 poll_table *wait); 112 112 void sctp_sock_rfree(struct sk_buff *skb); 113 113 void sctp_copy_sock(struct sock *newsk, struct sock *sk,
+1 -1
include/net/sock.h
··· 1581 1581 int sock_no_socketpair(struct socket *, struct socket *); 1582 1582 int sock_no_accept(struct socket *, struct socket *, int, bool); 1583 1583 int sock_no_getname(struct socket *, struct sockaddr *, int *, int); 1584 - unsigned int sock_no_poll(struct file *, struct socket *, 1584 + __poll_t sock_no_poll(struct file *, struct socket *, 1585 1585 struct poll_table_struct *); 1586 1586 int sock_no_ioctl(struct socket *, unsigned int, unsigned long); 1587 1587 int sock_no_listen(struct socket *, int);
+1 -1
include/net/tcp.h
··· 387 387 void tcp_close(struct sock *sk, long timeout); 388 388 void tcp_init_sock(struct sock *sk); 389 389 void tcp_init_transfer(struct sock *sk, int bpf_op); 390 - unsigned int tcp_poll(struct file *file, struct socket *sock, 390 + __poll_t tcp_poll(struct file *file, struct socket *sock, 391 391 struct poll_table_struct *wait); 392 392 int tcp_getsockopt(struct sock *sk, int level, int optname, 393 393 char __user *optval, int __user *optlen);
+1 -1
include/net/udp.h
··· 275 275 int udp_init_sock(struct sock *sk); 276 276 int __udp_disconnect(struct sock *sk, int flags); 277 277 int udp_disconnect(struct sock *sk, int flags); 278 - unsigned int udp_poll(struct file *file, struct socket *sock, poll_table *wait); 278 + __poll_t udp_poll(struct file *file, struct socket *sock, poll_table *wait); 279 279 struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb, 280 280 netdev_features_t features, 281 281 bool is_ipv6);
+1 -1
include/sound/hwdep.h
··· 37 37 long count, loff_t *offset); 38 38 int (*open)(struct snd_hwdep *hw, struct file * file); 39 39 int (*release)(struct snd_hwdep *hw, struct file * file); 40 - unsigned int (*poll)(struct snd_hwdep *hw, struct file *file, 40 + __poll_t (*poll)(struct snd_hwdep *hw, struct file *file, 41 41 poll_table *wait); 42 42 int (*ioctl)(struct snd_hwdep *hw, struct file *file, 43 43 unsigned int cmd, unsigned long arg);
+1 -1
include/sound/info.h
··· 62 62 loff_t (*llseek)(struct snd_info_entry *entry, 63 63 void *file_private_data, struct file *file, 64 64 loff_t offset, int orig); 65 - unsigned int (*poll)(struct snd_info_entry *entry, 65 + __poll_t (*poll)(struct snd_info_entry *entry, 66 66 void *file_private_data, struct file *file, 67 67 poll_table *wait); 68 68 int (*ioctl)(struct snd_info_entry *entry, void *file_private_data,
+29 -15
include/uapi/asm-generic/poll.h
··· 3 3 #define __ASM_GENERIC_POLL_H 4 4 5 5 /* These are specified by iBCS2 */ 6 - #define POLLIN 0x0001 7 - #define POLLPRI 0x0002 8 - #define POLLOUT 0x0004 9 - #define POLLERR 0x0008 10 - #define POLLHUP 0x0010 11 - #define POLLNVAL 0x0020 6 + #define POLLIN (__force __poll_t)0x0001 7 + #define POLLPRI (__force __poll_t)0x0002 8 + #define POLLOUT (__force __poll_t)0x0004 9 + #define POLLERR (__force __poll_t)0x0008 10 + #define POLLHUP (__force __poll_t)0x0010 11 + #define POLLNVAL (__force __poll_t)0x0020 12 12 13 13 /* The rest seem to be more-or-less nonstandard. Check them! */ 14 - #define POLLRDNORM 0x0040 15 - #define POLLRDBAND 0x0080 14 + #define POLLRDNORM (__force __poll_t)0x0040 15 + #define POLLRDBAND (__force __poll_t)0x0080 16 16 #ifndef POLLWRNORM 17 - #define POLLWRNORM 0x0100 17 + #define POLLWRNORM (__force __poll_t)0x0100 18 18 #endif 19 19 #ifndef POLLWRBAND 20 - #define POLLWRBAND 0x0200 20 + #define POLLWRBAND (__force __poll_t)0x0200 21 21 #endif 22 22 #ifndef POLLMSG 23 - #define POLLMSG 0x0400 23 + #define POLLMSG (__force __poll_t)0x0400 24 24 #endif 25 25 #ifndef POLLREMOVE 26 - #define POLLREMOVE 0x1000 26 + #define POLLREMOVE (__force __poll_t)0x1000 27 27 #endif 28 28 #ifndef POLLRDHUP 29 - #define POLLRDHUP 0x2000 29 + #define POLLRDHUP (__force __poll_t)0x2000 30 30 #endif 31 31 32 - #define POLLFREE 0x4000 /* currently only for epoll */ 32 + #define POLLFREE (__force __poll_t)0x4000 /* currently only for epoll */ 33 33 34 - #define POLL_BUSY_LOOP 0x8000 34 + #define POLL_BUSY_LOOP (__force __poll_t)0x8000 35 + 36 + #ifdef __KERNEL__ 37 + #ifndef __ARCH_HAS_MANGLED_POLL 38 + static inline __u16 mangle_poll(__poll_t val) 39 + { 40 + return (__force __u16)val; 41 + } 42 + 43 + static inline __poll_t demangle_poll(__u16 v) 44 + { 45 + return (__force __poll_t)v; 46 + } 47 + #endif 48 + #endif 35 49 36 50 struct pollfd { 37 51 int fd;
+6
include/uapi/linux/types.h
··· 49 49 #define __aligned_be64 __be64 __attribute__((aligned(8))) 50 50 #define __aligned_le64 __le64 __attribute__((aligned(8))) 51 51 52 + #ifdef __CHECK_POLL 53 + typedef unsigned __bitwise __poll_t; 54 + #else 55 + typedef unsigned __poll_t; 56 + #endif 57 + 52 58 #endif /* __ASSEMBLY__ */ 53 59 #endif /* _UAPI_LINUX_TYPES_H */
+2 -2
ipc/mqueue.c
··· 519 519 return 0; 520 520 } 521 521 522 - static unsigned int mqueue_poll_file(struct file *filp, struct poll_table_struct *poll_tab) 522 + static __poll_t mqueue_poll_file(struct file *filp, struct poll_table_struct *poll_tab) 523 523 { 524 524 struct mqueue_inode_info *info = MQUEUE_I(file_inode(filp)); 525 - int retval = 0; 525 + __poll_t retval = 0; 526 526 527 527 poll_wait(filp, &info->wait_q, poll_tab); 528 528
+2 -2
kernel/events/core.c
··· 4520 4520 return ret; 4521 4521 } 4522 4522 4523 - static unsigned int perf_poll(struct file *file, poll_table *wait) 4523 + static __poll_t perf_poll(struct file *file, poll_table *wait) 4524 4524 { 4525 4525 struct perf_event *event = file->private_data; 4526 4526 struct ring_buffer *rb; 4527 - unsigned int events = POLLHUP; 4527 + __poll_t events = POLLHUP; 4528 4528 4529 4529 poll_wait(file, &event->waitq, wait); 4530 4530
+2 -2
kernel/printk/printk.c
··· 920 920 return ret; 921 921 } 922 922 923 - static unsigned int devkmsg_poll(struct file *file, poll_table *wait) 923 + static __poll_t devkmsg_poll(struct file *file, poll_table *wait) 924 924 { 925 925 struct devkmsg_user *user = file->private_data; 926 - int ret = 0; 926 + __poll_t ret = 0; 927 927 928 928 if (!user) 929 929 return POLLERR|POLLNVAL;
+2 -2
kernel/relay.c
··· 919 919 * 920 920 * Poll implemention. 921 921 */ 922 - static unsigned int relay_file_poll(struct file *filp, poll_table *wait) 922 + static __poll_t relay_file_poll(struct file *filp, poll_table *wait) 923 923 { 924 - unsigned int mask = 0; 924 + __poll_t mask = 0; 925 925 struct rchan_buf *buf = filp->private_data; 926 926 927 927 if (buf->finalized)
+2 -2
kernel/time/posix-clock.c
··· 68 68 return err; 69 69 } 70 70 71 - static unsigned int posix_clock_poll(struct file *fp, poll_table *wait) 71 + static __poll_t posix_clock_poll(struct file *fp, poll_table *wait) 72 72 { 73 73 struct posix_clock *clk = get_posix_clock(fp); 74 - unsigned int result = 0; 74 + __poll_t result = 0; 75 75 76 76 if (!clk) 77 77 return POLLERR;
+1 -1
kernel/trace/ring_buffer.c
··· 630 630 * Returns POLLIN | POLLRDNORM if data exists in the buffers, 631 631 * zero otherwise. 632 632 */ 633 - int ring_buffer_poll_wait(struct ring_buffer *buffer, int cpu, 633 + __poll_t ring_buffer_poll_wait(struct ring_buffer *buffer, int cpu, 634 634 struct file *filp, poll_table *poll_table) 635 635 { 636 636 struct ring_buffer_per_cpu *cpu_buffer;
+3 -3
kernel/trace/trace.c
··· 5616 5616 return 0; 5617 5617 } 5618 5618 5619 - static unsigned int 5619 + static __poll_t 5620 5620 trace_poll(struct trace_iterator *iter, struct file *filp, poll_table *poll_table) 5621 5621 { 5622 5622 struct trace_array *tr = iter->tr; ··· 5635 5635 filp, poll_table); 5636 5636 } 5637 5637 5638 - static unsigned int 5638 + static __poll_t 5639 5639 tracing_poll_pipe(struct file *filp, poll_table *poll_table) 5640 5640 { 5641 5641 struct trace_iterator *iter = filp->private_data; ··· 6589 6589 return ret; 6590 6590 } 6591 6591 6592 - static unsigned int 6592 + static __poll_t 6593 6593 tracing_buffers_poll(struct file *filp, poll_table *poll_table) 6594 6594 { 6595 6595 struct ftrace_buffer_info *info = filp->private_data;
+1 -1
mm/memcontrol.c
··· 3777 3777 struct mem_cgroup_event *event = 3778 3778 container_of(wait, struct mem_cgroup_event, wait); 3779 3779 struct mem_cgroup *memcg = event->memcg; 3780 - unsigned long flags = (unsigned long)key; 3780 + __poll_t flags = key_to_poll(key); 3781 3781 3782 3782 if (flags & POLLHUP) { 3783 3783 /*
+1 -1
mm/swapfile.c
··· 2697 2697 } 2698 2698 2699 2699 #ifdef CONFIG_PROC_FS 2700 - static unsigned swaps_poll(struct file *file, poll_table *wait) 2700 + static __poll_t swaps_poll(struct file *file, poll_table *wait) 2701 2701 { 2702 2702 struct seq_file *seq = file->private_data; 2703 2703
+30 -30
net/9p/trans_fd.c
··· 228 228 } 229 229 } 230 230 231 - static int 232 - p9_fd_poll(struct p9_client *client, struct poll_table_struct *pt) 231 + static __poll_t 232 + p9_fd_poll(struct p9_client *client, struct poll_table_struct *pt, int *err) 233 233 { 234 - int ret, n; 234 + __poll_t ret, n; 235 235 struct p9_trans_fd *ts = NULL; 236 236 237 237 if (client && client->status == Connected) 238 238 ts = client->trans; 239 239 240 - if (!ts) 241 - return -EREMOTEIO; 240 + if (!ts) { 241 + if (err) 242 + *err = -EREMOTEIO; 243 + return POLLERR; 244 + } 242 245 243 246 if (!ts->rd->f_op->poll) 244 - return -EIO; 245 - 246 - if (!ts->wr->f_op->poll) 247 - return -EIO; 248 - 249 - ret = ts->rd->f_op->poll(ts->rd, pt); 250 - if (ret < 0) 251 - return ret; 247 + ret = DEFAULT_POLLMASK; 248 + else 249 + ret = ts->rd->f_op->poll(ts->rd, pt); 252 250 253 251 if (ts->rd != ts->wr) { 254 - n = ts->wr->f_op->poll(ts->wr, pt); 255 - if (n < 0) 256 - return n; 252 + if (!ts->wr->f_op->poll) 253 + n = DEFAULT_POLLMASK; 254 + else 255 + n = ts->wr->f_op->poll(ts->wr, pt); 257 256 ret = (ret & ~POLLOUT) | (n & ~POLLIN); 258 257 } 259 258 ··· 297 298 298 299 static void p9_read_work(struct work_struct *work) 299 300 { 300 - int n, err; 301 + __poll_t n; 302 + int err; 301 303 struct p9_conn *m; 302 304 int status = REQ_STATUS_ERROR; 303 305 ··· 398 398 if (test_and_clear_bit(Rpending, &m->wsched)) 399 399 n = POLLIN; 400 400 else 401 - n = p9_fd_poll(m->client, NULL); 401 + n = p9_fd_poll(m->client, NULL, NULL); 402 402 403 403 if ((n & POLLIN) && !test_and_set_bit(Rworksched, &m->wsched)) { 404 404 p9_debug(P9_DEBUG_TRANS, "sched read work %p\n", m); ··· 448 448 449 449 static void p9_write_work(struct work_struct *work) 450 450 { 451 - int n, err; 451 + __poll_t n; 452 + int err; 452 453 struct p9_conn *m; 453 454 struct p9_req_t *req; 454 455 ··· 507 506 if (test_and_clear_bit(Wpending, &m->wsched)) 508 507 n = POLLOUT; 509 508 else 510 - n = p9_fd_poll(m->client, NULL); 509 + n = p9_fd_poll(m->client, NULL, NULL); 511 510 512 511 if ((n & POLLOUT) && 513 512 !test_and_set_bit(Wworksched, &m->wsched)) { ··· 582 581 583 582 static void p9_conn_create(struct p9_client *client) 584 583 { 585 - int n; 584 + __poll_t n; 586 585 struct p9_trans_fd *ts = client->trans; 587 586 struct p9_conn *m = &ts->conn; 588 587 ··· 598 597 INIT_LIST_HEAD(&m->poll_pending_link); 599 598 init_poll_funcptr(&m->pt, p9_pollwait); 600 599 601 - n = p9_fd_poll(client, &m->pt); 600 + n = p9_fd_poll(client, &m->pt, NULL); 602 601 if (n & POLLIN) { 603 602 p9_debug(P9_DEBUG_TRANS, "mux %p can read\n", m); 604 603 set_bit(Rpending, &m->wsched); ··· 618 617 619 618 static void p9_poll_mux(struct p9_conn *m) 620 619 { 621 - int n; 620 + __poll_t n; 621 + int err = -ECONNRESET; 622 622 623 623 if (m->err < 0) 624 624 return; 625 625 626 - n = p9_fd_poll(m->client, NULL); 627 - if (n < 0 || n & (POLLERR | POLLHUP | POLLNVAL)) { 626 + n = p9_fd_poll(m->client, NULL, &err); 627 + if (n & (POLLERR | POLLHUP | POLLNVAL)) { 628 628 p9_debug(P9_DEBUG_TRANS, "error mux %p err %d\n", m, n); 629 - if (n >= 0) 630 - n = -ECONNRESET; 631 - p9_conn_cancel(m, n); 629 + p9_conn_cancel(m, err); 632 630 } 633 631 634 632 if (n & POLLIN) { ··· 663 663 664 664 static int p9_fd_request(struct p9_client *client, struct p9_req_t *req) 665 665 { 666 - int n; 666 + __poll_t n; 667 667 struct p9_trans_fd *ts = client->trans; 668 668 struct p9_conn *m = &ts->conn; 669 669 ··· 680 680 if (test_and_clear_bit(Wpending, &m->wsched)) 681 681 n = POLLOUT; 682 682 else 683 - n = p9_fd_poll(m->client, NULL); 683 + n = p9_fd_poll(m->client, NULL, NULL); 684 684 685 685 if (n & POLLOUT && !test_and_set_bit(Wworksched, &m->wsched)) 686 686 schedule_work(&m->wq);
+2 -2
net/atm/common.c
··· 648 648 return error; 649 649 } 650 650 651 - unsigned int vcc_poll(struct file *file, struct socket *sock, poll_table *wait) 651 + __poll_t vcc_poll(struct file *file, struct socket *sock, poll_table *wait) 652 652 { 653 653 struct sock *sk = sock->sk; 654 654 struct atm_vcc *vcc; 655 - unsigned int mask; 655 + __poll_t mask; 656 656 657 657 sock_poll_wait(file, sk_sleep(sk), wait); 658 658 mask = 0;
+1 -1
net/atm/common.h
··· 17 17 int vcc_recvmsg(struct socket *sock, struct msghdr *msg, size_t size, 18 18 int flags); 19 19 int vcc_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len); 20 - unsigned int vcc_poll(struct file *file, struct socket *sock, poll_table *wait); 20 + __poll_t vcc_poll(struct file *file, struct socket *sock, poll_table *wait); 21 21 int vcc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); 22 22 int vcc_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); 23 23 int vcc_setsockopt(struct socket *sock, int level, int optname,
+1 -1
net/batman-adv/icmp_socket.c
··· 292 292 return len; 293 293 } 294 294 295 - static unsigned int batadv_socket_poll(struct file *file, poll_table *wait) 295 + static __poll_t batadv_socket_poll(struct file *file, poll_table *wait) 296 296 { 297 297 struct batadv_socket_client *socket_client = file->private_data; 298 298
+1 -1
net/batman-adv/log.c
··· 176 176 return error; 177 177 } 178 178 179 - static unsigned int batadv_log_poll(struct file *file, poll_table *wait) 179 + static __poll_t batadv_log_poll(struct file *file, poll_table *wait) 180 180 { 181 181 struct batadv_priv *bat_priv = file->private_data; 182 182 struct batadv_priv_debug_log *debug_log = bat_priv->debug_log;
+3 -3
net/bluetooth/af_bluetooth.c
··· 421 421 } 422 422 EXPORT_SYMBOL(bt_sock_stream_recvmsg); 423 423 424 - static inline unsigned int bt_accept_poll(struct sock *parent) 424 + static inline __poll_t bt_accept_poll(struct sock *parent) 425 425 { 426 426 struct bt_sock *s, *n; 427 427 struct sock *sk; ··· 437 437 return 0; 438 438 } 439 439 440 - unsigned int bt_sock_poll(struct file *file, struct socket *sock, 440 + __poll_t bt_sock_poll(struct file *file, struct socket *sock, 441 441 poll_table *wait) 442 442 { 443 443 struct sock *sk = sock->sk; 444 - unsigned int mask = 0; 444 + __poll_t mask = 0; 445 445 446 446 BT_DBG("sock %p, sk %p", sock, sk); 447 447
+2 -2
net/caif/caif_socket.c
··· 934 934 } 935 935 936 936 /* Copied from af_unix.c:unix_poll(), added CAIF tx_flow handling */ 937 - static unsigned int caif_poll(struct file *file, 937 + static __poll_t caif_poll(struct file *file, 938 938 struct socket *sock, poll_table *wait) 939 939 { 940 940 struct sock *sk = sock->sk; 941 - unsigned int mask; 941 + __poll_t mask; 942 942 struct caifsock *cf_sk = container_of(sk, struct caifsock, sk); 943 943 944 944 sock_poll_wait(file, sk_sleep(sk), wait);
+3 -5
net/core/datagram.c
··· 72 72 static int receiver_wake_function(wait_queue_entry_t *wait, unsigned int mode, int sync, 73 73 void *key) 74 74 { 75 - unsigned long bits = (unsigned long)key; 76 - 77 75 /* 78 76 * Avoid a wakeup if event not interesting for us 79 77 */ 80 - if (bits && !(bits & (POLLIN | POLLERR))) 78 + if (key && !(key_to_poll(key) & (POLLIN | POLLERR))) 81 79 return 0; 82 80 return autoremove_wake_function(wait, mode, sync, key); 83 81 } ··· 831 833 * and you use a different write policy from sock_writeable() 832 834 * then please supply your own write_space callback. 833 835 */ 834 - unsigned int datagram_poll(struct file *file, struct socket *sock, 836 + __poll_t datagram_poll(struct file *file, struct socket *sock, 835 837 poll_table *wait) 836 838 { 837 839 struct sock *sk = sock->sk; 838 - unsigned int mask; 840 + __poll_t mask; 839 841 840 842 sock_poll_wait(file, sk_sleep(sk), wait); 841 843 mask = 0;
+1 -1
net/core/sock.c
··· 2496 2496 } 2497 2497 EXPORT_SYMBOL(sock_no_getname); 2498 2498 2499 - unsigned int sock_no_poll(struct file *file, struct socket *sock, poll_table *pt) 2499 + __poll_t sock_no_poll(struct file *file, struct socket *sock, poll_table *pt) 2500 2500 { 2501 2501 return 0; 2502 2502 }
+1 -1
net/dccp/dccp.h
··· 316 316 int flags, int *addr_len); 317 317 void dccp_shutdown(struct sock *sk, int how); 318 318 int inet_dccp_listen(struct socket *sock, int backlog); 319 - unsigned int dccp_poll(struct file *file, struct socket *sock, 319 + __poll_t dccp_poll(struct file *file, struct socket *sock, 320 320 poll_table *wait); 321 321 int dccp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len); 322 322 void dccp_req_err(struct sock *sk, u64 seq);
+2 -2
net/dccp/proto.c
··· 318 318 * take care of normal races (between the test and the event) and we don't 319 319 * go look at any of the socket buffers directly. 320 320 */ 321 - unsigned int dccp_poll(struct file *file, struct socket *sock, 321 + __poll_t dccp_poll(struct file *file, struct socket *sock, 322 322 poll_table *wait) 323 323 { 324 - unsigned int mask; 324 + __poll_t mask; 325 325 struct sock *sk = sock->sk; 326 326 327 327 sock_poll_wait(file, sk_sleep(sk), wait);
+2 -2
net/decnet/af_decnet.c
··· 1209 1209 } 1210 1210 1211 1211 1212 - static unsigned int dn_poll(struct file *file, struct socket *sock, poll_table *wait) 1212 + static __poll_t dn_poll(struct file *file, struct socket *sock, poll_table *wait) 1213 1213 { 1214 1214 struct sock *sk = sock->sk; 1215 1215 struct dn_scp *scp = DN_SK(sk); 1216 - int mask = datagram_poll(file, sock, wait); 1216 + __poll_t mask = datagram_poll(file, sock, wait); 1217 1217 1218 1218 if (!skb_queue_empty(&scp->other_receive_queue)) 1219 1219 mask |= POLLRDBAND;
+2 -2
net/ipv4/tcp.c
··· 493 493 * take care of normal races (between the test and the event) and we don't 494 494 * go look at any of the socket buffers directly. 495 495 */ 496 - unsigned int tcp_poll(struct file *file, struct socket *sock, poll_table *wait) 496 + __poll_t tcp_poll(struct file *file, struct socket *sock, poll_table *wait) 497 497 { 498 - unsigned int mask; 498 + __poll_t mask; 499 499 struct sock *sk = sock->sk; 500 500 const struct tcp_sock *tp = tcp_sk(sk); 501 501 int state;
+2 -2
net/ipv4/udp.c
··· 2502 2502 * but then block when reading it. Add special case code 2503 2503 * to work around these arguably broken applications. 2504 2504 */ 2505 - unsigned int udp_poll(struct file *file, struct socket *sock, poll_table *wait) 2505 + __poll_t udp_poll(struct file *file, struct socket *sock, poll_table *wait) 2506 2506 { 2507 - unsigned int mask = datagram_poll(file, sock, wait); 2507 + __poll_t mask = datagram_poll(file, sock, wait); 2508 2508 struct sock *sk = sock->sk; 2509 2509 2510 2510 if (!skb_queue_empty(&udp_sk(sk)->reader_queue))
+3 -3
net/iucv/af_iucv.c
··· 1474 1474 return copied; 1475 1475 } 1476 1476 1477 - static inline unsigned int iucv_accept_poll(struct sock *parent) 1477 + static inline __poll_t iucv_accept_poll(struct sock *parent) 1478 1478 { 1479 1479 struct iucv_sock *isk, *n; 1480 1480 struct sock *sk; ··· 1489 1489 return 0; 1490 1490 } 1491 1491 1492 - unsigned int iucv_sock_poll(struct file *file, struct socket *sock, 1492 + __poll_t iucv_sock_poll(struct file *file, struct socket *sock, 1493 1493 poll_table *wait) 1494 1494 { 1495 1495 struct sock *sk = sock->sk; 1496 - unsigned int mask = 0; 1496 + __poll_t mask = 0; 1497 1497 1498 1498 sock_poll_wait(file, sk_sleep(sk), wait); 1499 1499
+3 -3
net/nfc/llcp_sock.c
··· 531 531 return 0; 532 532 } 533 533 534 - static inline unsigned int llcp_accept_poll(struct sock *parent) 534 + static inline __poll_t llcp_accept_poll(struct sock *parent) 535 535 { 536 536 struct nfc_llcp_sock *llcp_sock, *parent_sock; 537 537 struct sock *sk; ··· 549 549 return 0; 550 550 } 551 551 552 - static unsigned int llcp_sock_poll(struct file *file, struct socket *sock, 552 + static __poll_t llcp_sock_poll(struct file *file, struct socket *sock, 553 553 poll_table *wait) 554 554 { 555 555 struct sock *sk = sock->sk; 556 - unsigned int mask = 0; 556 + __poll_t mask = 0; 557 557 558 558 pr_debug("%p\n", sk); 559 559
+1 -1
net/nfc/nci/uart.c
··· 305 305 return 0; 306 306 } 307 307 308 - static unsigned int nci_uart_tty_poll(struct tty_struct *tty, 308 + static __poll_t nci_uart_tty_poll(struct tty_struct *tty, 309 309 struct file *filp, poll_table *wait) 310 310 { 311 311 return 0;
+2 -2
net/packet/af_packet.c
··· 4073 4073 return 0; 4074 4074 } 4075 4075 4076 - static unsigned int packet_poll(struct file *file, struct socket *sock, 4076 + static __poll_t packet_poll(struct file *file, struct socket *sock, 4077 4077 poll_table *wait) 4078 4078 { 4079 4079 struct sock *sk = sock->sk; 4080 4080 struct packet_sock *po = pkt_sk(sk); 4081 - unsigned int mask = datagram_poll(file, sock, wait); 4081 + __poll_t mask = datagram_poll(file, sock, wait); 4082 4082 4083 4083 spin_lock_bh(&sk->sk_receive_queue.lock); 4084 4084 if (po->rx_ring.pg_vec) {
+2 -2
net/phonet/socket.c
··· 341 341 return 0; 342 342 } 343 343 344 - static unsigned int pn_socket_poll(struct file *file, struct socket *sock, 344 + static __poll_t pn_socket_poll(struct file *file, struct socket *sock, 345 345 poll_table *wait) 346 346 { 347 347 struct sock *sk = sock->sk; 348 348 struct pep_sock *pn = pep_sk(sk); 349 - unsigned int mask = 0; 349 + __poll_t mask = 0; 350 350 351 351 poll_wait(file, sk_sleep(sk), wait); 352 352
+2 -2
net/rds/af_rds.c
··· 152 152 * to send to a congested destination, the system call may still fail (and 153 153 * return ENOBUFS). 154 154 */ 155 - static unsigned int rds_poll(struct file *file, struct socket *sock, 155 + static __poll_t rds_poll(struct file *file, struct socket *sock, 156 156 poll_table *wait) 157 157 { 158 158 struct sock *sk = sock->sk; 159 159 struct rds_sock *rs = rds_sk_to_rs(sk); 160 - unsigned int mask = 0; 160 + __poll_t mask = 0; 161 161 unsigned long flags; 162 162 163 163 poll_wait(file, sk_sleep(sk), wait);
+2 -2
net/rfkill/core.c
··· 1139 1139 return -ENOMEM; 1140 1140 } 1141 1141 1142 - static unsigned int rfkill_fop_poll(struct file *file, poll_table *wait) 1142 + static __poll_t rfkill_fop_poll(struct file *file, poll_table *wait) 1143 1143 { 1144 1144 struct rfkill_data *data = file->private_data; 1145 - unsigned int res = POLLOUT | POLLWRNORM; 1145 + __poll_t res = POLLOUT | POLLWRNORM; 1146 1146 1147 1147 poll_wait(file, &data->read_wait, wait); 1148 1148
+2 -2
net/rxrpc/af_rxrpc.c
··· 729 729 /* 730 730 * permit an RxRPC socket to be polled 731 731 */ 732 - static unsigned int rxrpc_poll(struct file *file, struct socket *sock, 732 + static __poll_t rxrpc_poll(struct file *file, struct socket *sock, 733 733 poll_table *wait) 734 734 { 735 735 struct sock *sk = sock->sk; 736 736 struct rxrpc_sock *rx = rxrpc_sk(sk); 737 - unsigned int mask; 737 + __poll_t mask; 738 738 739 739 sock_poll_wait(file, sk_sleep(sk), wait); 740 740 mask = 0;
+2 -2
net/sctp/socket.c
··· 7518 7518 * here, again, by modeling the current TCP/UDP code. We don't have 7519 7519 * a good way to test with it yet. 7520 7520 */ 7521 - unsigned int sctp_poll(struct file *file, struct socket *sock, poll_table *wait) 7521 + __poll_t sctp_poll(struct file *file, struct socket *sock, poll_table *wait) 7522 7522 { 7523 7523 struct sock *sk = sock->sk; 7524 7524 struct sctp_sock *sp = sctp_sk(sk); 7525 - unsigned int mask; 7525 + __poll_t mask; 7526 7526 7527 7527 poll_wait(file, sk_sleep(sk), wait); 7528 7528
+3 -3
net/smc/af_smc.c
··· 1107 1107 return rc; 1108 1108 } 1109 1109 1110 - static unsigned int smc_accept_poll(struct sock *parent) 1110 + static __poll_t smc_accept_poll(struct sock *parent) 1111 1111 { 1112 1112 struct smc_sock *isk; 1113 1113 struct sock *sk; ··· 1126 1126 return 0; 1127 1127 } 1128 1128 1129 - static unsigned int smc_poll(struct file *file, struct socket *sock, 1129 + static __poll_t smc_poll(struct file *file, struct socket *sock, 1130 1130 poll_table *wait) 1131 1131 { 1132 1132 struct sock *sk = sock->sk; 1133 - unsigned int mask = 0; 1133 + __poll_t mask = 0; 1134 1134 struct smc_sock *smc; 1135 1135 int rc; 1136 1136
+3 -3
net/socket.c
··· 118 118 static int sock_mmap(struct file *file, struct vm_area_struct *vma); 119 119 120 120 static int sock_close(struct inode *inode, struct file *file); 121 - static unsigned int sock_poll(struct file *file, 121 + static __poll_t sock_poll(struct file *file, 122 122 struct poll_table_struct *wait); 123 123 static long sock_ioctl(struct file *file, unsigned int cmd, unsigned long arg); 124 124 #ifdef CONFIG_COMPAT ··· 1097 1097 EXPORT_SYMBOL(sock_create_lite); 1098 1098 1099 1099 /* No kernel lock held - perfect */ 1100 - static unsigned int sock_poll(struct file *file, poll_table *wait) 1100 + static __poll_t sock_poll(struct file *file, poll_table *wait) 1101 1101 { 1102 - unsigned int busy_flag = 0; 1102 + __poll_t busy_flag = 0; 1103 1103 struct socket *sock; 1104 1104 1105 1105 /*
+4 -4
net/sunrpc/cache.c
··· 930 930 931 931 static DECLARE_WAIT_QUEUE_HEAD(queue_wait); 932 932 933 - static unsigned int cache_poll(struct file *filp, poll_table *wait, 933 + static __poll_t cache_poll(struct file *filp, poll_table *wait, 934 934 struct cache_detail *cd) 935 935 { 936 - unsigned int mask; 936 + __poll_t mask; 937 937 struct cache_reader *rp = filp->private_data; 938 938 struct cache_queue *cq; 939 939 ··· 1501 1501 return cache_write(filp, buf, count, ppos, cd); 1502 1502 } 1503 1503 1504 - static unsigned int cache_poll_procfs(struct file *filp, poll_table *wait) 1504 + static __poll_t cache_poll_procfs(struct file *filp, poll_table *wait) 1505 1505 { 1506 1506 struct cache_detail *cd = PDE_DATA(file_inode(filp)); 1507 1507 ··· 1720 1720 return cache_write(filp, buf, count, ppos, cd); 1721 1721 } 1722 1722 1723 - static unsigned int cache_poll_pipefs(struct file *filp, poll_table *wait) 1723 + static __poll_t cache_poll_pipefs(struct file *filp, poll_table *wait) 1724 1724 { 1725 1725 struct cache_detail *cd = RPC_I(file_inode(filp))->private; 1726 1726
+2 -2
net/sunrpc/rpc_pipe.c
··· 340 340 return res; 341 341 } 342 342 343 - static unsigned int 343 + static __poll_t 344 344 rpc_pipe_poll(struct file *filp, struct poll_table_struct *wait) 345 345 { 346 346 struct inode *inode = file_inode(filp); 347 347 struct rpc_inode *rpci = RPC_I(inode); 348 - unsigned int mask = POLLOUT | POLLWRNORM; 348 + __poll_t mask = POLLOUT | POLLWRNORM; 349 349 350 350 poll_wait(filp, &rpci->waitq, wait); 351 351
+2 -2
net/tipc/socket.c
··· 710 710 * imply that the operation will succeed, merely that it should be performed 711 711 * and will not block. 712 712 */ 713 - static unsigned int tipc_poll(struct file *file, struct socket *sock, 713 + static __poll_t tipc_poll(struct file *file, struct socket *sock, 714 714 poll_table *wait) 715 715 { 716 716 struct sock *sk = sock->sk; 717 717 struct tipc_sock *tsk = tipc_sk(sk); 718 718 struct tipc_group *grp = tsk->group; 719 - u32 revents = 0; 719 + __poll_t revents = 0; 720 720 721 721 sock_poll_wait(file, sk_sleep(sk), wait); 722 722
+8 -7
net/unix/af_unix.c
··· 367 367 /* relaying can only happen while the wq still exists */ 368 368 u_sleep = sk_sleep(&u->sk); 369 369 if (u_sleep) 370 - wake_up_interruptible_poll(u_sleep, key); 370 + wake_up_interruptible_poll(u_sleep, key_to_poll(key)); 371 371 372 372 return 0; 373 373 } ··· 638 638 static int unix_socketpair(struct socket *, struct socket *); 639 639 static int unix_accept(struct socket *, struct socket *, int, bool); 640 640 static int unix_getname(struct socket *, struct sockaddr *, int *, int); 641 - static unsigned int unix_poll(struct file *, struct socket *, poll_table *); 642 - static unsigned int unix_dgram_poll(struct file *, struct socket *, 641 + static __poll_t unix_poll(struct file *, struct socket *, poll_table *); 642 + static __poll_t unix_dgram_poll(struct file *, struct socket *, 643 643 poll_table *); 644 644 static int unix_ioctl(struct socket *, unsigned int, unsigned long); 645 645 static int unix_shutdown(struct socket *, int); ··· 2640 2640 return err; 2641 2641 } 2642 2642 2643 - static unsigned int unix_poll(struct file *file, struct socket *sock, poll_table *wait) 2643 + static __poll_t unix_poll(struct file *file, struct socket *sock, poll_table *wait) 2644 2644 { 2645 2645 struct sock *sk = sock->sk; 2646 - unsigned int mask; 2646 + __poll_t mask; 2647 2647 2648 2648 sock_poll_wait(file, sk_sleep(sk), wait); 2649 2649 mask = 0; ··· 2675 2675 return mask; 2676 2676 } 2677 2677 2678 - static unsigned int unix_dgram_poll(struct file *file, struct socket *sock, 2678 + static __poll_t unix_dgram_poll(struct file *file, struct socket *sock, 2679 2679 poll_table *wait) 2680 2680 { 2681 2681 struct sock *sk = sock->sk, *other; 2682 - unsigned int mask, writable; 2682 + unsigned int writable; 2683 + __poll_t mask; 2683 2684 2684 2685 sock_poll_wait(file, sk_sleep(sk), wait); 2685 2686 mask = 0;
+2 -2
net/vmw_vsock/af_vsock.c
··· 850 850 return err; 851 851 } 852 852 853 - static unsigned int vsock_poll(struct file *file, struct socket *sock, 853 + static __poll_t vsock_poll(struct file *file, struct socket *sock, 854 854 poll_table *wait) 855 855 { 856 856 struct sock *sk; 857 - unsigned int mask; 857 + __poll_t mask; 858 858 struct vsock_sock *vsk; 859 859 860 860 sk = sock->sk;
+2 -2
security/apparmor/apparmorfs.c
··· 571 571 return 0; 572 572 } 573 573 574 - static unsigned int ns_revision_poll(struct file *file, poll_table *pt) 574 + static __poll_t ns_revision_poll(struct file *file, poll_table *pt) 575 575 { 576 576 struct aa_revision *rev = file->private_data; 577 - unsigned int mask = 0; 577 + __poll_t mask = 0; 578 578 579 579 if (rev) { 580 580 mutex_lock_nested(&rev->ns->lock, rev->ns->level);
+1 -1
security/tomoyo/audit.c
··· 458 458 * 459 459 * Returns POLLIN | POLLRDNORM when ready to read an audit log. 460 460 */ 461 - unsigned int tomoyo_poll_log(struct file *file, poll_table *wait) 461 + __poll_t tomoyo_poll_log(struct file *file, poll_table *wait) 462 462 { 463 463 if (tomoyo_log_count) 464 464 return POLLIN | POLLRDNORM;
+2 -2
security/tomoyo/common.c
··· 2120 2120 * 2121 2121 * Waits for access requests which violated policy in enforcing mode. 2122 2122 */ 2123 - static unsigned int tomoyo_poll_query(struct file *file, poll_table *wait) 2123 + static __poll_t tomoyo_poll_query(struct file *file, poll_table *wait) 2124 2124 { 2125 2125 if (!list_empty(&tomoyo_query_list)) 2126 2126 return POLLIN | POLLRDNORM; ··· 2453 2453 * Returns POLLIN | POLLRDNORM | POLLOUT | POLLWRNORM if ready to read/write, 2454 2454 * POLLOUT | POLLWRNORM otherwise. 2455 2455 */ 2456 - unsigned int tomoyo_poll_control(struct file *file, poll_table *wait) 2456 + __poll_t tomoyo_poll_control(struct file *file, poll_table *wait) 2457 2457 { 2458 2458 struct tomoyo_io_buffer *head = file->private_data; 2459 2459 if (head->poll)
+3 -3
security/tomoyo/common.h
··· 789 789 struct tomoyo_io_buffer { 790 790 void (*read) (struct tomoyo_io_buffer *); 791 791 int (*write) (struct tomoyo_io_buffer *); 792 - unsigned int (*poll) (struct file *file, poll_table *wait); 792 + __poll_t (*poll) (struct file *file, poll_table *wait); 793 793 /* Exclusive lock for this structure. */ 794 794 struct mutex io_sem; 795 795 char __user *read_user_buf; ··· 981 981 unsigned long number); 982 982 int tomoyo_path_perm(const u8 operation, const struct path *path, 983 983 const char *target); 984 - unsigned int tomoyo_poll_control(struct file *file, poll_table *wait); 985 - unsigned int tomoyo_poll_log(struct file *file, poll_table *wait); 984 + __poll_t tomoyo_poll_control(struct file *file, poll_table *wait); 985 + __poll_t tomoyo_poll_log(struct file *file, poll_table *wait); 986 986 int tomoyo_socket_bind_permission(struct socket *sock, struct sockaddr *addr, 987 987 int addr_len); 988 988 int tomoyo_socket_connect_permission(struct socket *sock,
+1 -1
security/tomoyo/securityfs_if.c
··· 157 157 * Returns POLLIN | POLLRDNORM | POLLOUT | POLLWRNORM if ready to read/write, 158 158 * POLLOUT | POLLWRNORM otherwise. 159 159 */ 160 - static unsigned int tomoyo_poll(struct file *file, poll_table *wait) 160 + static __poll_t tomoyo_poll(struct file *file, poll_table *wait) 161 161 { 162 162 return tomoyo_poll_control(file, wait); 163 163 }
+3 -3
sound/core/compress_offload.c
··· 396 396 return -ENXIO; 397 397 } 398 398 399 - static inline int snd_compr_get_poll(struct snd_compr_stream *stream) 399 + static __poll_t snd_compr_get_poll(struct snd_compr_stream *stream) 400 400 { 401 401 if (stream->direction == SND_COMPRESS_PLAYBACK) 402 402 return POLLOUT | POLLWRNORM; ··· 404 404 return POLLIN | POLLRDNORM; 405 405 } 406 406 407 - static unsigned int snd_compr_poll(struct file *f, poll_table *wait) 407 + static __poll_t snd_compr_poll(struct file *f, poll_table *wait) 408 408 { 409 409 struct snd_compr_file *data = f->private_data; 410 410 struct snd_compr_stream *stream; 411 411 size_t avail; 412 - int retval = 0; 412 + __poll_t retval = 0; 413 413 414 414 if (snd_BUG_ON(!data)) 415 415 return POLLERR;
+2 -2
sound/core/control.c
··· 1666 1666 return result > 0 ? result : err; 1667 1667 } 1668 1668 1669 - static unsigned int snd_ctl_poll(struct file *file, poll_table * wait) 1669 + static __poll_t snd_ctl_poll(struct file *file, poll_table * wait) 1670 1670 { 1671 - unsigned int mask; 1671 + __poll_t mask; 1672 1672 struct snd_ctl_file *ctl; 1673 1673 1674 1674 ctl = file->private_data;
+1 -1
sound/core/hwdep.c
··· 177 177 return err; 178 178 } 179 179 180 - static unsigned int snd_hwdep_poll(struct file * file, poll_table * wait) 180 + static __poll_t snd_hwdep_poll(struct file * file, poll_table * wait) 181 181 { 182 182 struct snd_hwdep *hw = file->private_data; 183 183 if (hw->ops.poll)
+2 -2
sound/core/info.c
··· 203 203 return size; 204 204 } 205 205 206 - static unsigned int snd_info_entry_poll(struct file *file, poll_table *wait) 206 + static __poll_t snd_info_entry_poll(struct file *file, poll_table *wait) 207 207 { 208 208 struct snd_info_private_data *data = file->private_data; 209 209 struct snd_info_entry *entry = data->entry; 210 - unsigned int mask = 0; 210 + __poll_t mask = 0; 211 211 212 212 if (entry->c.ops->poll) 213 213 return entry->c.ops->poll(entry,
+1 -1
sound/core/init.c
··· 344 344 panic("%s(%p, %p) failed!", __func__, inode, file); 345 345 } 346 346 347 - static unsigned int snd_disconnect_poll(struct file * file, poll_table * wait) 347 + static __poll_t snd_disconnect_poll(struct file * file, poll_table * wait) 348 348 { 349 349 return POLLERR | POLLNVAL; 350 350 }
+2 -2
sound/core/oss/pcm_oss.c
··· 2686 2686 runtime->oss.period_frames; 2687 2687 } 2688 2688 2689 - static unsigned int snd_pcm_oss_poll(struct file *file, poll_table * wait) 2689 + static __poll_t snd_pcm_oss_poll(struct file *file, poll_table * wait) 2690 2690 { 2691 2691 struct snd_pcm_oss_file *pcm_oss_file; 2692 - unsigned int mask; 2692 + __poll_t mask; 2693 2693 struct snd_pcm_substream *psubstream = NULL, *csubstream = NULL; 2694 2694 2695 2695 pcm_oss_file = file->private_data;
+4 -4
sound/core/pcm_native.c
··· 3135 3135 return result; 3136 3136 } 3137 3137 3138 - static unsigned int snd_pcm_playback_poll(struct file *file, poll_table * wait) 3138 + static __poll_t snd_pcm_playback_poll(struct file *file, poll_table * wait) 3139 3139 { 3140 3140 struct snd_pcm_file *pcm_file; 3141 3141 struct snd_pcm_substream *substream; 3142 3142 struct snd_pcm_runtime *runtime; 3143 - unsigned int mask; 3143 + __poll_t mask; 3144 3144 snd_pcm_uframes_t avail; 3145 3145 3146 3146 pcm_file = file->private_data; ··· 3174 3174 return mask; 3175 3175 } 3176 3176 3177 - static unsigned int snd_pcm_capture_poll(struct file *file, poll_table * wait) 3177 + static __poll_t snd_pcm_capture_poll(struct file *file, poll_table * wait) 3178 3178 { 3179 3179 struct snd_pcm_file *pcm_file; 3180 3180 struct snd_pcm_substream *substream; 3181 3181 struct snd_pcm_runtime *runtime; 3182 - unsigned int mask; 3182 + __poll_t mask; 3183 3183 snd_pcm_uframes_t avail; 3184 3184 3185 3185 pcm_file = file->private_data;
+2 -2
sound/core/rawmidi.c
··· 1366 1366 return result; 1367 1367 } 1368 1368 1369 - static unsigned int snd_rawmidi_poll(struct file *file, poll_table * wait) 1369 + static __poll_t snd_rawmidi_poll(struct file *file, poll_table * wait) 1370 1370 { 1371 1371 struct snd_rawmidi_file *rfile; 1372 1372 struct snd_rawmidi_runtime *runtime; 1373 - unsigned int mask; 1373 + __poll_t mask; 1374 1374 1375 1375 rfile = file->private_data; 1376 1376 if (rfile->input != NULL) {
+2 -2
sound/core/seq/oss/seq_oss.c
··· 59 59 static ssize_t odev_read(struct file *file, char __user *buf, size_t count, loff_t *offset); 60 60 static ssize_t odev_write(struct file *file, const char __user *buf, size_t count, loff_t *offset); 61 61 static long odev_ioctl(struct file *file, unsigned int cmd, unsigned long arg); 62 - static unsigned int odev_poll(struct file *file, poll_table * wait); 62 + static __poll_t odev_poll(struct file *file, poll_table * wait); 63 63 64 64 65 65 /* ··· 197 197 #define odev_ioctl_compat NULL 198 198 #endif 199 199 200 - static unsigned int 200 + static __poll_t 201 201 odev_poll(struct file *file, poll_table * wait) 202 202 { 203 203 struct seq_oss_devinfo *dp;
+1 -1
sound/core/seq/oss/seq_oss_device.h
··· 124 124 int snd_seq_oss_ioctl(struct seq_oss_devinfo *dp, unsigned int cmd, unsigned long arg); 125 125 int snd_seq_oss_read(struct seq_oss_devinfo *dev, char __user *buf, int count); 126 126 int snd_seq_oss_write(struct seq_oss_devinfo *dp, const char __user *buf, int count, struct file *opt); 127 - unsigned int snd_seq_oss_poll(struct seq_oss_devinfo *dp, struct file *file, poll_table * wait); 127 + __poll_t snd_seq_oss_poll(struct seq_oss_devinfo *dp, struct file *file, poll_table * wait); 128 128 129 129 void snd_seq_oss_reset(struct seq_oss_devinfo *dp); 130 130
+2 -2
sound/core/seq/oss/seq_oss_rw.c
··· 196 196 * select / poll 197 197 */ 198 198 199 - unsigned int 199 + __poll_t 200 200 snd_seq_oss_poll(struct seq_oss_devinfo *dp, struct file *file, poll_table * wait) 201 201 { 202 - unsigned int mask = 0; 202 + __poll_t mask = 0; 203 203 204 204 /* input */ 205 205 if (dp->readq && is_read_mode(dp->file_mode)) {
+2 -2
sound/core/seq/seq_clientmgr.c
··· 1087 1087 /* 1088 1088 * handle polling 1089 1089 */ 1090 - static unsigned int snd_seq_poll(struct file *file, poll_table * wait) 1090 + static __poll_t snd_seq_poll(struct file *file, poll_table * wait) 1091 1091 { 1092 1092 struct snd_seq_client *client = file->private_data; 1093 - unsigned int mask = 0; 1093 + __poll_t mask = 0; 1094 1094 1095 1095 /* check client structures are in place */ 1096 1096 if (snd_BUG_ON(!client))
+2 -2
sound/core/timer.c
··· 2072 2072 return result > 0 ? result : err; 2073 2073 } 2074 2074 2075 - static unsigned int snd_timer_user_poll(struct file *file, poll_table * wait) 2075 + static __poll_t snd_timer_user_poll(struct file *file, poll_table * wait) 2076 2076 { 2077 - unsigned int mask; 2077 + __poll_t mask; 2078 2078 struct snd_timer_user *tu; 2079 2079 2080 2080 tu = file->private_data;
+2 -2
sound/firewire/bebob/bebob_hwdep.c
··· 53 53 return count; 54 54 } 55 55 56 - static unsigned int 56 + static __poll_t 57 57 hwdep_poll(struct snd_hwdep *hwdep, struct file *file, poll_table *wait) 58 58 { 59 59 struct snd_bebob *bebob = hwdep->private_data; 60 - unsigned int events; 60 + __poll_t events; 61 61 62 62 poll_wait(file, &bebob->hwdep_wait, wait); 63 63
+2 -2
sound/firewire/dice/dice-hwdep.c
··· 52 52 return count; 53 53 } 54 54 55 - static unsigned int hwdep_poll(struct snd_hwdep *hwdep, struct file *file, 55 + static __poll_t hwdep_poll(struct snd_hwdep *hwdep, struct file *file, 56 56 poll_table *wait) 57 57 { 58 58 struct snd_dice *dice = hwdep->private_data; 59 - unsigned int events; 59 + __poll_t events; 60 60 61 61 poll_wait(file, &dice->hwdep_wait, wait); 62 62
+2 -2
sound/firewire/digi00x/digi00x-hwdep.c
··· 60 60 return count; 61 61 } 62 62 63 - static unsigned int hwdep_poll(struct snd_hwdep *hwdep, struct file *file, 63 + static __poll_t hwdep_poll(struct snd_hwdep *hwdep, struct file *file, 64 64 poll_table *wait) 65 65 { 66 66 struct snd_dg00x *dg00x = hwdep->private_data; 67 - unsigned int events; 67 + __poll_t events; 68 68 69 69 poll_wait(file, &dg00x->hwdep_wait, wait); 70 70
+2 -2
sound/firewire/fireface/ff-hwdep.c
··· 52 52 return count; 53 53 } 54 54 55 - static unsigned int hwdep_poll(struct snd_hwdep *hwdep, struct file *file, 55 + static __poll_t hwdep_poll(struct snd_hwdep *hwdep, struct file *file, 56 56 poll_table *wait) 57 57 { 58 58 struct snd_ff *ff = hwdep->private_data; 59 - unsigned int events; 59 + __poll_t events; 60 60 61 61 poll_wait(file, &ff->hwdep_wait, wait); 62 62
+2 -2
sound/firewire/fireworks/fireworks_hwdep.c
··· 184 184 return count; 185 185 } 186 186 187 - static unsigned int 187 + static __poll_t 188 188 hwdep_poll(struct snd_hwdep *hwdep, struct file *file, poll_table *wait) 189 189 { 190 190 struct snd_efw *efw = hwdep->private_data; 191 - unsigned int events; 191 + __poll_t events; 192 192 193 193 poll_wait(file, &efw->hwdep_wait, wait); 194 194
+2 -2
sound/firewire/motu/motu-hwdep.c
··· 59 59 return count; 60 60 } 61 61 62 - static unsigned int hwdep_poll(struct snd_hwdep *hwdep, struct file *file, 62 + static __poll_t hwdep_poll(struct snd_hwdep *hwdep, struct file *file, 63 63 poll_table *wait) 64 64 { 65 65 struct snd_motu *motu = hwdep->private_data; 66 - unsigned int events; 66 + __poll_t events; 67 67 68 68 poll_wait(file, &motu->hwdep_wait, wait); 69 69
+2 -2
sound/firewire/oxfw/oxfw-hwdep.c
··· 52 52 return count; 53 53 } 54 54 55 - static unsigned int hwdep_poll(struct snd_hwdep *hwdep, struct file *file, 55 + static __poll_t hwdep_poll(struct snd_hwdep *hwdep, struct file *file, 56 56 poll_table *wait) 57 57 { 58 58 struct snd_oxfw *oxfw = hwdep->private_data; 59 - unsigned int events; 59 + __poll_t events; 60 60 61 61 poll_wait(file, &oxfw->hwdep_wait, wait); 62 62
+2 -2
sound/firewire/tascam/tascam-hwdep.c
··· 50 50 return count; 51 51 } 52 52 53 - static unsigned int hwdep_poll(struct snd_hwdep *hwdep, struct file *file, 53 + static __poll_t hwdep_poll(struct snd_hwdep *hwdep, struct file *file, 54 54 poll_table *wait) 55 55 { 56 56 struct snd_tscm *tscm = hwdep->private_data; 57 - unsigned int events; 57 + __poll_t events; 58 58 59 59 poll_wait(file, &tscm->hwdep_wait, wait); 60 60
+2 -2
sound/oss/dmasound/dmasound_core.c
··· 670 670 return uUsed < 0? uUsed: uWritten; 671 671 } 672 672 673 - static unsigned int sq_poll(struct file *file, struct poll_table_struct *wait) 673 + static __poll_t sq_poll(struct file *file, struct poll_table_struct *wait) 674 674 { 675 - unsigned int mask = 0; 675 + __poll_t mask = 0; 676 676 int retVal; 677 677 678 678 if (write_sq.locked == 0) {
+1 -1
sound/usb/mixer_quirks.c
··· 240 240 return err < 0 ? err : count; 241 241 } 242 242 243 - static unsigned int snd_usb_sbrc_hwdep_poll(struct snd_hwdep *hw, struct file *file, 243 + static __poll_t snd_usb_sbrc_hwdep_poll(struct snd_hwdep *hw, struct file *file, 244 244 poll_table *wait) 245 245 { 246 246 struct usb_mixer_interface *mixer = hw->private_data;
+2 -2
sound/usb/usx2y/us122l.c
··· 271 271 return err; 272 272 } 273 273 274 - static unsigned int usb_stream_hwdep_poll(struct snd_hwdep *hw, 274 + static __poll_t usb_stream_hwdep_poll(struct snd_hwdep *hw, 275 275 struct file *file, poll_table *wait) 276 276 { 277 277 struct us122l *us122l = hw->private_data; 278 278 unsigned *polled; 279 - unsigned int mask; 279 + __poll_t mask; 280 280 281 281 poll_wait(file, &us122l->sk.sleep, wait); 282 282
+2 -2
sound/usb/usx2y/usX2Yhwdep.c
··· 86 86 return 0; 87 87 } 88 88 89 - static unsigned int snd_us428ctls_poll(struct snd_hwdep *hw, struct file *file, poll_table *wait) 89 + static __poll_t snd_us428ctls_poll(struct snd_hwdep *hw, struct file *file, poll_table *wait) 90 90 { 91 - unsigned int mask = 0; 91 + __poll_t mask = 0; 92 92 struct usX2Ydev *us428 = hw->private_data; 93 93 struct us428ctls_sharedmem *shm = us428->us428ctls_sharedmem; 94 94 if (us428->chip_status & USX2Y_STAT_CHIP_HUP)
+2 -2
virt/kvm/eventfd.c
··· 188 188 { 189 189 struct kvm_kernel_irqfd *irqfd = 190 190 container_of(wait, struct kvm_kernel_irqfd, wait); 191 - unsigned long flags = (unsigned long)key; 191 + __poll_t flags = key_to_poll(key); 192 192 struct kvm_kernel_irq_routing_entry irq; 193 193 struct kvm *kvm = irqfd->kvm; 194 194 unsigned seq; ··· 287 287 struct fd f; 288 288 struct eventfd_ctx *eventfd = NULL, *resamplefd = NULL; 289 289 int ret; 290 - unsigned int events; 290 + __poll_t events; 291 291 int idx; 292 292 293 293 if (!kvm_arch_intc_initialized(kvm))