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 ...
This commit is contained in:
Коммит
168fe32a07
|
@ -2,3 +2,4 @@
|
|||
include include/uapi/asm-generic/Kbuild.asm
|
||||
|
||||
generic-y += bpf_perf_event.h
|
||||
generic-y += poll.h
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#include <asm-generic/poll.h>
|
|
@ -9,8 +9,25 @@
|
|||
#ifndef _UAPI__BFIN_POLL_H
|
||||
#define _UAPI__BFIN_POLL_H
|
||||
|
||||
#define POLLWRNORM 4 /* POLLOUT */
|
||||
#define POLLWRBAND 256
|
||||
#ifndef __KERNEL__
|
||||
#define POLLWRNORM POLLOUT
|
||||
#define POLLWRBAND (__force __poll_t)256
|
||||
#else
|
||||
#define __ARCH_HAS_MANGLED_POLL
|
||||
static inline __u16 mangle_poll(__poll_t val)
|
||||
{
|
||||
__u16 v = (__force __u16)val;
|
||||
/* bit 9 -> bit 8, bit 8 -> bit 2 */
|
||||
return (v & ~0x300) | ((v & 0x200) >> 1) | ((v & 0x100) >> 6);
|
||||
}
|
||||
|
||||
static inline __poll_t demangle_poll(__u16 v)
|
||||
{
|
||||
/* bit 8 -> bit 9, bit 2 -> bits 2 and 8 */
|
||||
return (__force __poll_t)((v & ~0x100) | ((v & 0x100) << 1) |
|
||||
((v & 4) << 6));
|
||||
}
|
||||
#endif
|
||||
|
||||
#include <asm-generic/poll.h>
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ static ssize_t gpio_write(struct file *file, const char __user *buf,
|
|||
size_t count, loff_t *off);
|
||||
static int gpio_open(struct inode *inode, struct file *filp);
|
||||
static int gpio_release(struct inode *inode, struct file *filp);
|
||||
static unsigned int gpio_poll(struct file *filp, struct poll_table_struct *wait);
|
||||
static __poll_t gpio_poll(struct file *filp, struct poll_table_struct *wait);
|
||||
|
||||
/* private data per open() of this driver */
|
||||
|
||||
|
@ -141,9 +141,9 @@ static unsigned long dir_g_shadow; /* 1=output */
|
|||
#define USE_PORTS(priv) ((priv)->minor <= GPIO_MINOR_B)
|
||||
|
||||
|
||||
static unsigned int gpio_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t gpio_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
unsigned int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
struct gpio_private *priv = file->private_data;
|
||||
unsigned long data;
|
||||
unsigned long flags;
|
||||
|
|
|
@ -157,7 +157,7 @@ static inline int sync_data_avail(struct sync_port *port);
|
|||
|
||||
static int sync_serial_open(struct inode *inode, struct file *file);
|
||||
static int sync_serial_release(struct inode *inode, struct file *file);
|
||||
static unsigned int sync_serial_poll(struct file *filp, poll_table *wait);
|
||||
static __poll_t sync_serial_poll(struct file *filp, poll_table *wait);
|
||||
|
||||
static long sync_serial_ioctl(struct file *file,
|
||||
unsigned int cmd, unsigned long arg);
|
||||
|
@ -654,12 +654,12 @@ static int sync_serial_release(struct inode *inode, struct file *file)
|
|||
|
||||
|
||||
|
||||
static unsigned int sync_serial_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t sync_serial_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
int dev = MINOR(file_inode(file)->i_rdev);
|
||||
unsigned int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
struct sync_port *port;
|
||||
DEBUGPOLL(static unsigned int prev_mask = 0);
|
||||
DEBUGPOLL(static __poll_t prev_mask = 0);
|
||||
|
||||
port = &ports[dev];
|
||||
poll_wait(file, &port->out_wait_q, wait);
|
||||
|
|
|
@ -178,7 +178,7 @@ static inline int sync_data_avail(struct sync_port *port);
|
|||
|
||||
static int sync_serial_open(struct inode *, struct file *);
|
||||
static int sync_serial_release(struct inode *, struct file *);
|
||||
static unsigned int sync_serial_poll(struct file *filp, poll_table *wait);
|
||||
static __poll_t sync_serial_poll(struct file *filp, poll_table *wait);
|
||||
|
||||
static long sync_serial_ioctl(struct file *file,
|
||||
unsigned int cmd, unsigned long arg);
|
||||
|
@ -555,13 +555,13 @@ static int sync_serial_release(struct inode *inode, struct file *file)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static unsigned int sync_serial_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t sync_serial_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
int dev = iminor(file_inode(file));
|
||||
unsigned int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
struct sync_port *port;
|
||||
DEBUGPOLL(
|
||||
static unsigned int prev_mask;
|
||||
static __poll_t prev_mask;
|
||||
);
|
||||
|
||||
port = &ports[dev];
|
||||
|
|
|
@ -2,12 +2,27 @@
|
|||
#ifndef _ASM_POLL_H
|
||||
#define _ASM_POLL_H
|
||||
|
||||
#ifndef __KERNEL__
|
||||
#define POLLWRNORM POLLOUT
|
||||
#define POLLWRBAND 256
|
||||
#define POLLWRBAND (__force __poll_t)256
|
||||
#else
|
||||
#define __ARCH_HAS_MANGLED_POLL
|
||||
static inline __u16 mangle_poll(__poll_t val)
|
||||
{
|
||||
__u16 v = (__force __u16)val;
|
||||
/* bit 9 -> bit 8, bit 8 -> bit 2 */
|
||||
return (v & ~0x300) | ((v & 0x200) >> 1) | ((v & 0x100) >> 6);
|
||||
}
|
||||
|
||||
static inline __poll_t demangle_poll(__u16 v)
|
||||
{
|
||||
/* bit 8 -> bit 9, bit 2 -> bits 2 and 8 */
|
||||
return (__force __poll_t)((v & ~0x100) | ((v & 0x100) << 1) |
|
||||
((v & 4) << 6));
|
||||
}
|
||||
#endif
|
||||
|
||||
#include <asm-generic/poll.h>
|
||||
|
||||
#undef POLLREMOVE
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -3,3 +3,4 @@ include include/uapi/asm-generic/Kbuild.asm
|
|||
|
||||
generic-y += bpf_perf_event.h
|
||||
generic-y += kvm_para.h
|
||||
generic-y += poll.h
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#include <asm-generic/poll.h>
|
|
@ -1644,12 +1644,12 @@ pfm_write(struct file *file, const char __user *ubuf,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
static __poll_t
|
||||
pfm_poll(struct file *filp, poll_table * wait)
|
||||
{
|
||||
pfm_context_t *ctx;
|
||||
unsigned long flags;
|
||||
unsigned int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
|
||||
if (PFM_IS_FILE(filp) == 0) {
|
||||
printk(KERN_ERR "perfmon: pfm_poll: bad magic [%d]\n", task_pid_nr(current));
|
||||
|
|
|
@ -3,4 +3,5 @@ include include/uapi/asm-generic/Kbuild.asm
|
|||
|
||||
generic-y += bpf_perf_event.h
|
||||
generic-y += kvm_para.h
|
||||
generic-y += poll.h
|
||||
generic-y += siginfo.h
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#include <asm-generic/poll.h>
|
|
@ -2,8 +2,25 @@
|
|||
#ifndef __m68k_POLL_H
|
||||
#define __m68k_POLL_H
|
||||
|
||||
#ifndef __KERNEL__
|
||||
#define POLLWRNORM POLLOUT
|
||||
#define POLLWRBAND 256
|
||||
#define POLLWRBAND (__force __poll_t)256
|
||||
#else
|
||||
#define __ARCH_HAS_MANGLED_POLL
|
||||
static inline __u16 mangle_poll(__poll_t val)
|
||||
{
|
||||
__u16 v = (__force __u16)val;
|
||||
/* bit 9 -> bit 8, bit 8 -> bit 2 */
|
||||
return (v & ~0x300) | ((v & 0x200) >> 1) | ((v & 0x100) >> 6);
|
||||
}
|
||||
|
||||
static inline __poll_t demangle_poll(__u16 v)
|
||||
{
|
||||
/* bit 8 -> bit 9, bit 2 -> bits 2 and 8 */
|
||||
return (__force __poll_t)((v & ~0x100) | ((v & 0x100) << 1) |
|
||||
((v & 4) << 6));
|
||||
}
|
||||
#endif
|
||||
|
||||
#include <asm-generic/poll.h>
|
||||
|
||||
|
|
|
@ -2,8 +2,25 @@
|
|||
#ifndef __ASM_POLL_H
|
||||
#define __ASM_POLL_H
|
||||
|
||||
#ifndef __KERNEL__
|
||||
#define POLLWRNORM POLLOUT
|
||||
#define POLLWRBAND 0x0100
|
||||
#define POLLWRBAND (__force __poll_t)0x0100
|
||||
#else
|
||||
#define __ARCH_HAS_MANGLED_POLL
|
||||
static inline __u16 mangle_poll(__poll_t val)
|
||||
{
|
||||
__u16 v = (__force __u16)val;
|
||||
/* bit 9 -> bit 8, bit 8 -> bit 2 */
|
||||
return (v & ~0x300) | ((v & 0x200) >> 1) | ((v & 0x100) >> 6);
|
||||
}
|
||||
|
||||
static inline __poll_t demangle_poll(__u16 v)
|
||||
{
|
||||
/* bit 8 -> bit 9, bit 2 -> bits 2 and 8 */
|
||||
return (__force __poll_t)((v & ~0x100) | ((v & 0x100) << 1) |
|
||||
((v & 4) << 6));
|
||||
}
|
||||
#endif
|
||||
|
||||
#include <asm-generic/poll.h>
|
||||
|
||||
|
|
|
@ -336,10 +336,10 @@ static int file_release(struct inode *inode, struct file *filp)
|
|||
return rtlx_release(iminor(inode));
|
||||
}
|
||||
|
||||
static unsigned int file_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t file_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
int minor = iminor(file_inode(file));
|
||||
unsigned int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
|
||||
poll_wait(file, &channel_wqs[minor].rt_queue, wait);
|
||||
poll_wait(file, &channel_wqs[minor].lx_queue, wait);
|
||||
|
|
|
@ -2,4 +2,5 @@
|
|||
include include/uapi/asm-generic/Kbuild.asm
|
||||
|
||||
generic-y += bpf_perf_event.h
|
||||
generic-y += poll.h
|
||||
generic-y += siginfo.h
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#include <asm-generic/poll.h>
|
|
@ -388,7 +388,7 @@ out:
|
|||
return error;
|
||||
}
|
||||
|
||||
static unsigned int rtas_log_poll(struct file *file, poll_table * wait)
|
||||
static __poll_t rtas_log_poll(struct file *file, poll_table * wait)
|
||||
{
|
||||
poll_wait(file, &rtas_log_wait, wait);
|
||||
if (rtas_log_size)
|
||||
|
|
|
@ -86,10 +86,10 @@ static u32 spu_backing_mbox_stat_read(struct spu_context *ctx)
|
|||
return ctx->csa.prob.mb_stat_R;
|
||||
}
|
||||
|
||||
static unsigned int spu_backing_mbox_stat_poll(struct spu_context *ctx,
|
||||
unsigned int events)
|
||||
static __poll_t spu_backing_mbox_stat_poll(struct spu_context *ctx,
|
||||
__poll_t events)
|
||||
{
|
||||
int ret;
|
||||
__poll_t ret;
|
||||
u32 stat;
|
||||
|
||||
ret = 0;
|
||||
|
|
|
@ -762,10 +762,10 @@ out:
|
|||
return count;
|
||||
}
|
||||
|
||||
static unsigned int spufs_ibox_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t spufs_ibox_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct spu_context *ctx = file->private_data;
|
||||
unsigned int mask;
|
||||
__poll_t mask;
|
||||
|
||||
poll_wait(file, &ctx->ibox_wq, wait);
|
||||
|
||||
|
@ -898,10 +898,10 @@ out:
|
|||
return count;
|
||||
}
|
||||
|
||||
static unsigned int spufs_wbox_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t spufs_wbox_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct spu_context *ctx = file->private_data;
|
||||
unsigned int mask;
|
||||
__poll_t mask;
|
||||
|
||||
poll_wait(file, &ctx->wbox_wq, wait);
|
||||
|
||||
|
@ -1690,11 +1690,11 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static unsigned int spufs_mfc_poll(struct file *file,poll_table *wait)
|
||||
static __poll_t spufs_mfc_poll(struct file *file,poll_table *wait)
|
||||
{
|
||||
struct spu_context *ctx = file->private_data;
|
||||
u32 free_elements, tagstatus;
|
||||
unsigned int mask;
|
||||
__poll_t mask;
|
||||
|
||||
poll_wait(file, &ctx->mfc_wq, wait);
|
||||
|
||||
|
@ -2455,11 +2455,11 @@ static ssize_t spufs_switch_log_read(struct file *file, char __user *buf,
|
|||
return cnt == 0 ? error : cnt;
|
||||
}
|
||||
|
||||
static unsigned int spufs_switch_log_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t spufs_switch_log_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct inode *inode = file_inode(file);
|
||||
struct spu_context *ctx = SPUFS_I(inode)->i_ctx;
|
||||
unsigned int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
int rc;
|
||||
|
||||
poll_wait(file, &ctx->switch_log->wait, wait);
|
||||
|
|
|
@ -56,11 +56,10 @@ static u32 spu_hw_mbox_stat_read(struct spu_context *ctx)
|
|||
return in_be32(&ctx->spu->problem->mb_stat_R);
|
||||
}
|
||||
|
||||
static unsigned int spu_hw_mbox_stat_poll(struct spu_context *ctx,
|
||||
unsigned int events)
|
||||
static __poll_t spu_hw_mbox_stat_poll(struct spu_context *ctx, __poll_t events)
|
||||
{
|
||||
struct spu *spu = ctx->spu;
|
||||
int ret = 0;
|
||||
__poll_t ret = 0;
|
||||
u32 stat;
|
||||
|
||||
spin_lock_irq(&spu->register_lock);
|
||||
|
|
|
@ -185,8 +185,7 @@ struct mfc_dma_command {
|
|||
struct spu_context_ops {
|
||||
int (*mbox_read) (struct spu_context * ctx, u32 * data);
|
||||
u32(*mbox_stat_read) (struct spu_context * ctx);
|
||||
unsigned int (*mbox_stat_poll)(struct spu_context *ctx,
|
||||
unsigned int events);
|
||||
__poll_t (*mbox_stat_poll)(struct spu_context *ctx, __poll_t events);
|
||||
int (*ibox_read) (struct spu_context * ctx, u32 * data);
|
||||
int (*wbox_write) (struct spu_context * ctx, u32 data);
|
||||
u32(*signal1_read) (struct spu_context * ctx);
|
||||
|
|
|
@ -147,7 +147,7 @@ static bool opal_msg_queue_empty(void)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static unsigned int opal_prd_poll(struct file *file,
|
||||
static __poll_t opal_prd_poll(struct file *file,
|
||||
struct poll_table_struct *wait)
|
||||
{
|
||||
poll_wait(file, &opal_prd_msg_wait, wait);
|
||||
|
|
|
@ -2,4 +2,5 @@
|
|||
include include/uapi/asm-generic/Kbuild.asm
|
||||
|
||||
generic-y += bpf_perf_event.h
|
||||
generic-y += poll.h
|
||||
generic-y += siginfo.h
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef _ASM_SCORE_POLL_H
|
||||
#define _ASM_SCORE_POLL_H
|
||||
|
||||
#include <asm-generic/poll.h>
|
||||
|
||||
#endif /* _ASM_SCORE_POLL_H */
|
|
@ -2,11 +2,31 @@
|
|||
#ifndef __SPARC_POLL_H
|
||||
#define __SPARC_POLL_H
|
||||
|
||||
#ifndef __KERNEL__
|
||||
#define POLLWRNORM POLLOUT
|
||||
#define POLLWRBAND 256
|
||||
#define POLLMSG 512
|
||||
#define POLLREMOVE 1024
|
||||
#define POLLRDHUP 2048
|
||||
#define POLLWRBAND (__force __poll_t)256
|
||||
#define POLLMSG (__force __poll_t)512
|
||||
#define POLLREMOVE (__force __poll_t)1024
|
||||
#define POLLRDHUP (__force __poll_t)2048
|
||||
#else
|
||||
#define __ARCH_HAS_MANGLED_POLL
|
||||
static inline __u16 mangle_poll(__poll_t val)
|
||||
{
|
||||
__u16 v = (__force __u16)val;
|
||||
/* bit 9 -> bit 8, bit 8 -> bit 2, bit 13 -> bit 11 */
|
||||
return (v & ~0x300) | ((v & 0x200) >> 1) | ((v & 0x100) >> 6) |
|
||||
((v & 0x2000) >> 2);
|
||||
|
||||
|
||||
}
|
||||
|
||||
static inline __poll_t demangle_poll(__u16 v)
|
||||
{
|
||||
/* bit 8 -> bit 9, bit 2 -> bits 2 and 8 */
|
||||
return (__force __poll_t)((v & ~0x100) | ((v & 0x100) << 1) |
|
||||
((v & 4) << 6) | ((v & 0x800) << 2));
|
||||
}
|
||||
#endif
|
||||
|
||||
#include <asm-generic/poll.h>
|
||||
|
||||
|
|
|
@ -116,8 +116,15 @@ endef
|
|||
KBUILD_KCONFIG := $(HOST_DIR)/um/Kconfig
|
||||
|
||||
archheaders:
|
||||
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \
|
||||
kbuild-file=$(HOST_DIR)/include/asm/Kbuild \
|
||||
obj=$(HOST_DIR)/include/generated/asm
|
||||
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \
|
||||
kbuild-file=$(HOST_DIR)/include/uapi/asm/Kbuild \
|
||||
obj=$(HOST_DIR)/include/generated/uapi/asm
|
||||
$(Q)$(MAKE) KBUILD_SRC= ARCH=$(HEADER_ARCH) archheaders
|
||||
|
||||
|
||||
archprepare: include/generated/user_constants.h
|
||||
|
||||
LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static
|
||||
|
|
|
@ -119,10 +119,10 @@ static ssize_t hostaudio_write(struct file *file, const char __user *buffer,
|
|||
return err;
|
||||
}
|
||||
|
||||
static unsigned int hostaudio_poll(struct file *file,
|
||||
struct poll_table_struct *wait)
|
||||
static __poll_t hostaudio_poll(struct file *file,
|
||||
struct poll_table_struct *wait)
|
||||
{
|
||||
unsigned int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
|
||||
#ifdef DEBUG
|
||||
printk(KERN_DEBUG "hostaudio: poll called (unimplemented)\n");
|
||||
|
|
|
@ -5,3 +5,4 @@ generic-y += bpf_perf_event.h
|
|||
generated-y += unistd_32.h
|
||||
generated-y += unistd_64.h
|
||||
generated-y += unistd_x32.h
|
||||
generic-y += poll.h
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
#include <asm-generic/poll.h>
|
|
@ -1506,7 +1506,7 @@ static ssize_t do_read(struct file *fp, char __user *buf, size_t count, loff_t *
|
|||
return 0;
|
||||
}
|
||||
|
||||
static unsigned int do_poll(struct file *fp, poll_table *wait)
|
||||
static __poll_t do_poll(struct file *fp, poll_table *wait)
|
||||
{
|
||||
struct apm_user *as;
|
||||
|
||||
|
|
|
@ -243,7 +243,7 @@ out:
|
|||
return err ? err : buf - ubuf;
|
||||
}
|
||||
|
||||
static unsigned int mce_chrdev_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t mce_chrdev_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
poll_wait(file, &mce_chrdev_wait, wait);
|
||||
if (READ_ONCE(mcelog.next))
|
||||
|
|
|
@ -12,9 +12,26 @@
|
|||
#ifndef _XTENSA_POLL_H
|
||||
#define _XTENSA_POLL_H
|
||||
|
||||
#ifndef __KERNEL__
|
||||
#define POLLWRNORM POLLOUT
|
||||
#define POLLWRBAND 0x0100
|
||||
#define POLLREMOVE 0x0800
|
||||
#define POLLWRBAND (__force __poll_t)0x0100
|
||||
#define POLLREMOVE (__force __poll_t)0x0800
|
||||
#else
|
||||
#define __ARCH_HAS_MANGLED_POLL
|
||||
static inline __u16 mangle_poll(__poll_t val)
|
||||
{
|
||||
__u16 v = (__force __u16)val;
|
||||
/* bit 9 -> bit 8, bit 8 -> bit 2 */
|
||||
return (v & ~0x300) | ((v & 0x200) >> 1) | ((v & 0x100) >> 6);
|
||||
}
|
||||
|
||||
static inline __poll_t demangle_poll(__u16 v)
|
||||
{
|
||||
/* bit 8 -> bit 9, bit 2 -> bits 2 and 8 */
|
||||
return (__force __poll_t)((v & ~0x100) | ((v & 0x100) << 1) |
|
||||
((v & 4) << 6));
|
||||
}
|
||||
#endif
|
||||
|
||||
#include <asm-generic/poll.h>
|
||||
|
||||
|
|
|
@ -839,10 +839,10 @@ static int bsg_release(struct inode *inode, struct file *file)
|
|||
return bsg_put_device(bd);
|
||||
}
|
||||
|
||||
static unsigned int bsg_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t bsg_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct bsg_device *bd = file->private_data;
|
||||
unsigned int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
|
||||
poll_wait(file, &bd->wq_done, wait);
|
||||
poll_wait(file, &bd->wq_free, wait);
|
||||
|
|
|
@ -1062,13 +1062,13 @@ EXPORT_SYMBOL_GPL(af_alg_async_cb);
|
|||
/**
|
||||
* af_alg_poll - poll system call handler
|
||||
*/
|
||||
unsigned int af_alg_poll(struct file *file, struct socket *sock,
|
||||
__poll_t af_alg_poll(struct file *file, struct socket *sock,
|
||||
poll_table *wait)
|
||||
{
|
||||
struct sock *sk = sock->sk;
|
||||
struct alg_sock *ask = alg_sk(sk);
|
||||
struct af_alg_ctx *ctx = ask->private;
|
||||
unsigned int mask;
|
||||
__poll_t mask;
|
||||
|
||||
sock_poll_wait(file, sk_sleep(sk), wait);
|
||||
mask = 0;
|
||||
|
|
|
@ -193,7 +193,6 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static struct proto_ops algif_skcipher_ops = {
|
||||
.family = PF_ALG,
|
||||
|
||||
|
|
|
@ -718,9 +718,9 @@ again:
|
|||
return size > 0 ? size : ret;
|
||||
}
|
||||
|
||||
static unsigned int acpi_aml_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t acpi_aml_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
int masks = 0;
|
||||
__poll_t masks = 0;
|
||||
|
||||
poll_wait(file, &acpi_aml_io.wait, wait);
|
||||
if (acpi_aml_user_readable())
|
||||
|
|
|
@ -4311,7 +4311,7 @@ static int binder_thread_release(struct binder_proc *proc,
|
|||
return active_transactions;
|
||||
}
|
||||
|
||||
static unsigned int binder_poll(struct file *filp,
|
||||
static __poll_t binder_poll(struct file *filp,
|
||||
struct poll_table_struct *wait)
|
||||
{
|
||||
struct binder_proc *proc = filp->private_data;
|
||||
|
|
|
@ -794,7 +794,7 @@ static ssize_t hci_uart_tty_write(struct tty_struct *tty, struct file *file,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static unsigned int hci_uart_tty_poll(struct tty_struct *tty,
|
||||
static __poll_t hci_uart_tty_poll(struct tty_struct *tty,
|
||||
struct file *filp, poll_table *wait)
|
||||
{
|
||||
return 0;
|
||||
|
|
|
@ -299,7 +299,7 @@ static ssize_t vhci_write(struct kiocb *iocb, struct iov_iter *from)
|
|||
return vhci_get_user(data, from);
|
||||
}
|
||||
|
||||
static unsigned int vhci_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t vhci_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct vhci_data *data = file->private_data;
|
||||
|
||||
|
|
|
@ -236,7 +236,7 @@ static ssize_t apm_read(struct file *fp, char __user *buf, size_t count, loff_t
|
|||
return ret;
|
||||
}
|
||||
|
||||
static unsigned int apm_poll(struct file *fp, poll_table * wait)
|
||||
static __poll_t apm_poll(struct file *fp, poll_table * wait)
|
||||
{
|
||||
struct apm_user *as = fp->private_data;
|
||||
|
||||
|
|
|
@ -406,7 +406,7 @@ static long dsp56k_ioctl(struct file *file, unsigned int cmd,
|
|||
* Do I need this function at all???
|
||||
*/
|
||||
#if 0
|
||||
static unsigned int dsp56k_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t dsp56k_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
int dev = iminor(file_inode(file)) & 0x0f;
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ static ssize_t dtlk_read(struct file *, char __user *,
|
|||
size_t nbytes, loff_t * ppos);
|
||||
static ssize_t dtlk_write(struct file *, const char __user *,
|
||||
size_t nbytes, loff_t * ppos);
|
||||
static unsigned int dtlk_poll(struct file *, poll_table *);
|
||||
static __poll_t dtlk_poll(struct file *, poll_table *);
|
||||
static int dtlk_open(struct inode *, struct file *);
|
||||
static int dtlk_release(struct inode *, struct file *);
|
||||
static long dtlk_ioctl(struct file *file,
|
||||
|
@ -228,9 +228,9 @@ static ssize_t dtlk_write(struct file *file, const char __user *buf,
|
|||
return -EAGAIN;
|
||||
}
|
||||
|
||||
static unsigned int dtlk_poll(struct file *file, poll_table * wait)
|
||||
static __poll_t dtlk_poll(struct file *file, poll_table * wait)
|
||||
{
|
||||
int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
unsigned long expires;
|
||||
|
||||
TRACE_TEXT(" dtlk_poll");
|
||||
|
|
|
@ -342,7 +342,7 @@ out:
|
|||
return retval;
|
||||
}
|
||||
|
||||
static unsigned int hpet_poll(struct file *file, poll_table * wait)
|
||||
static __poll_t hpet_poll(struct file *file, poll_table * wait)
|
||||
{
|
||||
unsigned long v;
|
||||
struct hpet_dev *devp;
|
||||
|
|
|
@ -338,10 +338,10 @@ static int bt_bmc_release(struct inode *inode, struct file *file)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static unsigned int bt_bmc_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t bt_bmc_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct bt_bmc *bt_bmc = file_bt_bmc(file);
|
||||
unsigned int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
u8 ctrl;
|
||||
|
||||
poll_wait(file, &bt_bmc->queue, wait);
|
||||
|
|
|
@ -78,10 +78,10 @@ static void file_receive_handler(struct ipmi_recv_msg *msg,
|
|||
spin_unlock_irqrestore(&(priv->recv_msg_lock), flags);
|
||||
}
|
||||
|
||||
static unsigned int ipmi_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t ipmi_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct ipmi_file_private *priv = file->private_data;
|
||||
unsigned int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
unsigned long flags;
|
||||
|
||||
poll_wait(file, &priv->wait, wait);
|
||||
|
|
|
@ -887,9 +887,9 @@ static int ipmi_open(struct inode *ino, struct file *filep)
|
|||
}
|
||||
}
|
||||
|
||||
static unsigned int ipmi_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t ipmi_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
unsigned int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
|
||||
poll_wait(file, &read_q, wait);
|
||||
|
||||
|
|
|
@ -415,10 +415,10 @@ static ssize_t cm4040_write(struct file *filp, const char __user *buf,
|
|||
return count;
|
||||
}
|
||||
|
||||
static unsigned int cm4040_poll(struct file *filp, poll_table *wait)
|
||||
static __poll_t cm4040_poll(struct file *filp, poll_table *wait)
|
||||
{
|
||||
struct reader_dev *dev = filp->private_data;
|
||||
unsigned int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
|
||||
poll_wait(filp, &dev->poll_wait, wait);
|
||||
|
||||
|
|
|
@ -769,10 +769,10 @@ static int pp_release(struct inode *inode, struct file *file)
|
|||
}
|
||||
|
||||
/* No kernel lock held - fine */
|
||||
static unsigned int pp_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t pp_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct pp_struct *pp = file->private_data;
|
||||
unsigned int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
|
||||
poll_wait(file, &pp->irq_wait, wait);
|
||||
if (atomic_read(&pp->irqc))
|
||||
|
|
|
@ -1784,10 +1784,10 @@ urandom_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
static __poll_t
|
||||
random_poll(struct file *file, poll_table * wait)
|
||||
{
|
||||
unsigned int mask;
|
||||
__poll_t mask;
|
||||
|
||||
poll_wait(file, &random_read_wait, wait);
|
||||
poll_wait(file, &random_write_wait, wait);
|
||||
|
|
|
@ -147,7 +147,7 @@ static long rtc_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
|
|||
static void rtc_get_rtc_time(struct rtc_time *rtc_tm);
|
||||
|
||||
#ifdef RTC_IRQ
|
||||
static unsigned int rtc_poll(struct file *file, poll_table *wait);
|
||||
static __poll_t rtc_poll(struct file *file, poll_table *wait);
|
||||
#endif
|
||||
|
||||
static void get_rtc_alm_time(struct rtc_time *alm_tm);
|
||||
|
@ -790,7 +790,7 @@ no_irq:
|
|||
}
|
||||
|
||||
#ifdef RTC_IRQ
|
||||
static unsigned int rtc_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t rtc_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
unsigned long l;
|
||||
|
||||
|
|
|
@ -321,10 +321,10 @@ scdrv_write(struct file *file, const char __user *buf,
|
|||
return status;
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
static __poll_t
|
||||
scdrv_poll(struct file *file, struct poll_table_struct *wait)
|
||||
{
|
||||
unsigned int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
int status = 0;
|
||||
struct subch_data_s *sd = (struct subch_data_s *) file->private_data;
|
||||
unsigned long flags;
|
||||
|
|
|
@ -940,7 +940,7 @@ static ssize_t sonypi_misc_read(struct file *file, char __user *buf,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static unsigned int sonypi_misc_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t sonypi_misc_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
poll_wait(file, &sonypi_device.fifo_proc_list, wait);
|
||||
if (kfifo_len(&sonypi_device.fifo))
|
||||
|
|
|
@ -173,10 +173,10 @@ static ssize_t vtpm_proxy_fops_write(struct file *filp, const char __user *buf,
|
|||
*
|
||||
* Return: Poll flags
|
||||
*/
|
||||
static unsigned int vtpm_proxy_fops_poll(struct file *filp, poll_table *wait)
|
||||
static __poll_t vtpm_proxy_fops_poll(struct file *filp, poll_table *wait)
|
||||
{
|
||||
struct proxy_dev *proxy_dev = filp->private_data;
|
||||
unsigned ret;
|
||||
__poll_t ret;
|
||||
|
||||
poll_wait(filp, &proxy_dev->wq, wait);
|
||||
|
||||
|
|
|
@ -982,10 +982,10 @@ error_out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static unsigned int port_fops_poll(struct file *filp, poll_table *wait)
|
||||
static __poll_t port_fops_poll(struct file *filp, poll_table *wait)
|
||||
{
|
||||
struct port *port;
|
||||
unsigned int ret;
|
||||
__poll_t ret;
|
||||
|
||||
port = filp->private_data;
|
||||
poll_wait(filp, &port->waitqueue, wait);
|
||||
|
|
|
@ -1736,10 +1736,10 @@ end:
|
|||
return pos;
|
||||
}
|
||||
|
||||
static unsigned int xillybus_poll(struct file *filp, poll_table *wait)
|
||||
static __poll_t xillybus_poll(struct file *filp, poll_table *wait)
|
||||
{
|
||||
struct xilly_channel *channel = filp->private_data;
|
||||
unsigned int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
unsigned long flags;
|
||||
|
||||
poll_wait(filp, &channel->endpoint->ep_wait, wait);
|
||||
|
|
|
@ -157,13 +157,13 @@ static void dma_buf_poll_cb(struct dma_fence *fence, struct dma_fence_cb *cb)
|
|||
spin_unlock_irqrestore(&dcb->poll->lock, flags);
|
||||
}
|
||||
|
||||
static unsigned int dma_buf_poll(struct file *file, poll_table *poll)
|
||||
static __poll_t dma_buf_poll(struct file *file, poll_table *poll)
|
||||
{
|
||||
struct dma_buf *dmabuf;
|
||||
struct reservation_object *resv;
|
||||
struct reservation_object_list *fobj;
|
||||
struct dma_fence *fence_excl;
|
||||
unsigned long events;
|
||||
__poll_t events;
|
||||
unsigned shared_count, seq;
|
||||
|
||||
dmabuf = file->private_data;
|
||||
|
@ -195,7 +195,7 @@ retry:
|
|||
|
||||
if (fence_excl && (!(events & POLLOUT) || shared_count == 0)) {
|
||||
struct dma_buf_poll_cb_t *dcb = &dmabuf->cb_excl;
|
||||
unsigned long pevents = POLLIN;
|
||||
__poll_t pevents = POLLIN;
|
||||
|
||||
if (shared_count == 0)
|
||||
pevents |= POLLOUT;
|
||||
|
|
|
@ -312,7 +312,7 @@ static int sync_file_release(struct inode *inode, struct file *file)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static unsigned int sync_file_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t sync_file_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct sync_file *sync_file = file->private_data;
|
||||
|
||||
|
|
|
@ -1784,10 +1784,10 @@ static int fw_device_op_release(struct inode *inode, struct file *file)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static unsigned int fw_device_op_poll(struct file *file, poll_table * pt)
|
||||
static __poll_t fw_device_op_poll(struct file *file, poll_table * pt)
|
||||
{
|
||||
struct client *client = file->private_data;
|
||||
unsigned int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
|
||||
poll_wait(file, &client->wait, pt);
|
||||
|
||||
|
|
|
@ -328,11 +328,11 @@ nosy_release(struct inode *inode, struct file *file)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
static __poll_t
|
||||
nosy_poll(struct file *file, poll_table *pt)
|
||||
{
|
||||
struct client *client = file->private_data;
|
||||
unsigned int ret = 0;
|
||||
__poll_t ret = 0;
|
||||
|
||||
poll_wait(file, &client->buffer.wait, pt);
|
||||
|
||||
|
|
|
@ -604,11 +604,11 @@ struct lineevent_state {
|
|||
(GPIOEVENT_REQUEST_RISING_EDGE | \
|
||||
GPIOEVENT_REQUEST_FALLING_EDGE)
|
||||
|
||||
static unsigned int lineevent_poll(struct file *filep,
|
||||
static __poll_t lineevent_poll(struct file *filep,
|
||||
struct poll_table_struct *wait)
|
||||
{
|
||||
struct lineevent_state *le = filep->private_data;
|
||||
unsigned int events = 0;
|
||||
__poll_t events = 0;
|
||||
|
||||
poll_wait(filep, &le->wait, wait);
|
||||
|
||||
|
|
|
@ -559,10 +559,10 @@ EXPORT_SYMBOL(drm_read);
|
|||
*
|
||||
* Mask of POLL flags indicating the current status of the file.
|
||||
*/
|
||||
unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait)
|
||||
__poll_t drm_poll(struct file *filp, struct poll_table_struct *wait)
|
||||
{
|
||||
struct drm_file *file_priv = filp->private_data;
|
||||
unsigned int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
|
||||
poll_wait(filp, &file_priv->event_wait, wait);
|
||||
|
||||
|
|
|
@ -2331,12 +2331,12 @@ static enum hrtimer_restart oa_poll_check_timer_cb(struct hrtimer *hrtimer)
|
|||
*
|
||||
* Returns: any poll events that are ready without sleeping
|
||||
*/
|
||||
static unsigned int i915_perf_poll_locked(struct drm_i915_private *dev_priv,
|
||||
static __poll_t i915_perf_poll_locked(struct drm_i915_private *dev_priv,
|
||||
struct i915_perf_stream *stream,
|
||||
struct file *file,
|
||||
poll_table *wait)
|
||||
{
|
||||
unsigned int events = 0;
|
||||
__poll_t events = 0;
|
||||
|
||||
stream->ops->poll_wait(stream, file, wait);
|
||||
|
||||
|
@ -2365,11 +2365,11 @@ static unsigned int i915_perf_poll_locked(struct drm_i915_private *dev_priv,
|
|||
*
|
||||
* Returns: any poll events that are ready without sleeping
|
||||
*/
|
||||
static unsigned int i915_perf_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t i915_perf_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct i915_perf_stream *stream = file->private_data;
|
||||
struct drm_i915_private *dev_priv = stream->dev_priv;
|
||||
int ret;
|
||||
__poll_t ret;
|
||||
|
||||
mutex_lock(&dev_priv->perf.lock);
|
||||
ret = i915_perf_poll_locked(dev_priv, stream, file, wait);
|
||||
|
|
|
@ -713,7 +713,7 @@ extern int vmw_present_ioctl(struct drm_device *dev, void *data,
|
|||
struct drm_file *file_priv);
|
||||
extern int vmw_present_readback_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
extern unsigned int vmw_fops_poll(struct file *filp,
|
||||
extern __poll_t vmw_fops_poll(struct file *filp,
|
||||
struct poll_table_struct *wait);
|
||||
extern ssize_t vmw_fops_read(struct file *filp, char __user *buffer,
|
||||
size_t count, loff_t *offset);
|
||||
|
|
|
@ -412,7 +412,7 @@ out_clips:
|
|||
* Wrapper around the drm_poll function that makes sure the device is
|
||||
* processing the fifo if drm_poll decides to wait.
|
||||
*/
|
||||
unsigned int vmw_fops_poll(struct file *filp, struct poll_table_struct *wait)
|
||||
__poll_t vmw_fops_poll(struct file *filp, struct poll_table_struct *wait)
|
||||
{
|
||||
struct drm_file *file_priv = filp->private_data;
|
||||
struct vmw_private *dev_priv =
|
||||
|
|
|
@ -1266,7 +1266,7 @@ done:
|
|||
return ret_val;
|
||||
}
|
||||
|
||||
static unsigned int vga_arb_fpoll(struct file *file, poll_table *wait)
|
||||
static __poll_t vga_arb_fpoll(struct file *file, poll_table *wait)
|
||||
{
|
||||
pr_debug("%s\n", __func__);
|
||||
|
||||
|
|
|
@ -1179,7 +1179,7 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static unsigned int hid_debug_events_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t hid_debug_events_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct hid_debug_list *list = file->private_data;
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ exit_unlock:
|
|||
return retval;
|
||||
}
|
||||
|
||||
static unsigned int roccat_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t roccat_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct roccat_reader *reader = file->private_data;
|
||||
poll_wait(file, &reader->device->wait, wait);
|
||||
|
|
|
@ -702,11 +702,11 @@ static int hid_sensor_custom_open(struct inode *inode, struct file *file)
|
|||
return nonseekable_open(inode, file);
|
||||
}
|
||||
|
||||
static unsigned int hid_sensor_custom_poll(struct file *file,
|
||||
static __poll_t hid_sensor_custom_poll(struct file *file,
|
||||
struct poll_table_struct *wait)
|
||||
{
|
||||
struct hid_sensor_custom *sensor_inst;
|
||||
unsigned int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
|
||||
sensor_inst = container_of(file->private_data,
|
||||
struct hid_sensor_custom, custom_dev);
|
||||
|
|
|
@ -249,7 +249,7 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static unsigned int hidraw_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t hidraw_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct hidraw_list *list = file->private_data;
|
||||
|
||||
|
|
|
@ -753,7 +753,7 @@ unlock:
|
|||
return ret ? ret : count;
|
||||
}
|
||||
|
||||
static unsigned int uhid_char_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t uhid_char_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct uhid_device *uhid = file->private_data;
|
||||
|
||||
|
|
|
@ -422,7 +422,7 @@ static ssize_t hiddev_read(struct file * file, char __user * buffer, size_t coun
|
|||
* "poll" file op
|
||||
* No kernel lock - fine
|
||||
*/
|
||||
static unsigned int hiddev_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t hiddev_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct hiddev_list *list = file->private_data;
|
||||
|
||||
|
|
|
@ -1124,10 +1124,10 @@ static int cs_char_fasync(int fd, struct file *file, int on)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static unsigned int cs_char_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t cs_char_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct cs_char *csdata = file->private_data;
|
||||
unsigned int ret = 0;
|
||||
__poll_t ret = 0;
|
||||
|
||||
poll_wait(file, &cs_char_data.wait, wait);
|
||||
spin_lock_bh(&csdata->lock);
|
||||
|
|
|
@ -104,7 +104,7 @@ static ssize_t hvt_op_write(struct file *file, const char __user *buf,
|
|||
return ret ? ret : count;
|
||||
}
|
||||
|
||||
static unsigned int hvt_op_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t hvt_op_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct hvutil_transport *hvt;
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ ssize_t iio_format_value(char *buf, unsigned int type, int size, int *vals);
|
|||
#ifdef CONFIG_IIO_BUFFER
|
||||
struct poll_table_struct;
|
||||
|
||||
unsigned int iio_buffer_poll(struct file *filp,
|
||||
__poll_t iio_buffer_poll(struct file *filp,
|
||||
struct poll_table_struct *wait);
|
||||
ssize_t iio_buffer_read_first_n_outer(struct file *filp, char __user *buf,
|
||||
size_t n, loff_t *f_ps);
|
||||
|
|
|
@ -169,7 +169,7 @@ ssize_t iio_buffer_read_first_n_outer(struct file *filp, char __user *buf,
|
|||
* Return: (POLLIN | POLLRDNORM) if data is available for reading
|
||||
* or 0 for other cases
|
||||
*/
|
||||
unsigned int iio_buffer_poll(struct file *filp,
|
||||
__poll_t iio_buffer_poll(struct file *filp,
|
||||
struct poll_table_struct *wait)
|
||||
{
|
||||
struct iio_dev *indio_dev = filp->private_data;
|
||||
|
|
|
@ -95,12 +95,12 @@ EXPORT_SYMBOL(iio_push_event);
|
|||
* Return: (POLLIN | POLLRDNORM) if data is available for reading
|
||||
* or a negative error code on failure
|
||||
*/
|
||||
static unsigned int iio_event_poll(struct file *filep,
|
||||
static __poll_t iio_event_poll(struct file *filep,
|
||||
struct poll_table_struct *wait)
|
||||
{
|
||||
struct iio_dev *indio_dev = filep->private_data;
|
||||
struct iio_event_interface *ev_int = indio_dev->event_interface;
|
||||
unsigned int events = 0;
|
||||
__poll_t events = 0;
|
||||
|
||||
if (!indio_dev->info)
|
||||
return events;
|
||||
|
|
|
@ -1130,11 +1130,11 @@ static ssize_t ib_ucm_write(struct file *filp, const char __user *buf,
|
|||
return result;
|
||||
}
|
||||
|
||||
static unsigned int ib_ucm_poll(struct file *filp,
|
||||
static __poll_t ib_ucm_poll(struct file *filp,
|
||||
struct poll_table_struct *wait)
|
||||
{
|
||||
struct ib_ucm_file *file = filp->private_data;
|
||||
unsigned int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
|
||||
poll_wait(filp, &file->poll_wait, wait);
|
||||
|
||||
|
|
|
@ -1630,10 +1630,10 @@ static ssize_t ucma_write(struct file *filp, const char __user *buf,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static unsigned int ucma_poll(struct file *filp, struct poll_table_struct *wait)
|
||||
static __poll_t ucma_poll(struct file *filp, struct poll_table_struct *wait)
|
||||
{
|
||||
struct ucma_file *file = filp->private_data;
|
||||
unsigned int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
|
||||
poll_wait(filp, &file->poll_wait, wait);
|
||||
|
||||
|
|
|
@ -617,12 +617,12 @@ err:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static unsigned int ib_umad_poll(struct file *filp, struct poll_table_struct *wait)
|
||||
static __poll_t ib_umad_poll(struct file *filp, struct poll_table_struct *wait)
|
||||
{
|
||||
struct ib_umad_file *file = filp->private_data;
|
||||
|
||||
/* we will always be able to post a MAD send */
|
||||
unsigned int mask = POLLOUT | POLLWRNORM;
|
||||
__poll_t mask = POLLOUT | POLLWRNORM;
|
||||
|
||||
poll_wait(filp, &file->recv_wait, wait);
|
||||
|
||||
|
|
|
@ -339,11 +339,11 @@ static ssize_t ib_uverbs_comp_event_read(struct file *filp, char __user *buf,
|
|||
sizeof(struct ib_uverbs_comp_event_desc));
|
||||
}
|
||||
|
||||
static unsigned int ib_uverbs_event_poll(struct ib_uverbs_event_queue *ev_queue,
|
||||
static __poll_t ib_uverbs_event_poll(struct ib_uverbs_event_queue *ev_queue,
|
||||
struct file *filp,
|
||||
struct poll_table_struct *wait)
|
||||
{
|
||||
unsigned int pollflags = 0;
|
||||
__poll_t pollflags = 0;
|
||||
|
||||
poll_wait(filp, &ev_queue->poll_wait, wait);
|
||||
|
||||
|
@ -355,13 +355,13 @@ static unsigned int ib_uverbs_event_poll(struct ib_uverbs_event_queue *ev_queue,
|
|||
return pollflags;
|
||||
}
|
||||
|
||||
static unsigned int ib_uverbs_async_event_poll(struct file *filp,
|
||||
static __poll_t ib_uverbs_async_event_poll(struct file *filp,
|
||||
struct poll_table_struct *wait)
|
||||
{
|
||||
return ib_uverbs_event_poll(filp->private_data, filp, wait);
|
||||
}
|
||||
|
||||
static unsigned int ib_uverbs_comp_event_poll(struct file *filp,
|
||||
static __poll_t ib_uverbs_comp_event_poll(struct file *filp,
|
||||
struct poll_table_struct *wait)
|
||||
{
|
||||
struct ib_uverbs_completion_event_file *comp_ev_file =
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
static int hfi1_file_open(struct inode *inode, struct file *fp);
|
||||
static int hfi1_file_close(struct inode *inode, struct file *fp);
|
||||
static ssize_t hfi1_write_iter(struct kiocb *kiocb, struct iov_iter *from);
|
||||
static unsigned int hfi1_poll(struct file *fp, struct poll_table_struct *pt);
|
||||
static __poll_t hfi1_poll(struct file *fp, struct poll_table_struct *pt);
|
||||
static int hfi1_file_mmap(struct file *fp, struct vm_area_struct *vma);
|
||||
|
||||
static u64 kvirt_to_phys(void *addr);
|
||||
|
@ -102,8 +102,8 @@ static int allocate_ctxt(struct hfi1_filedata *fd, struct hfi1_devdata *dd,
|
|||
struct hfi1_user_info *uinfo,
|
||||
struct hfi1_ctxtdata **cd);
|
||||
static void deallocate_ctxt(struct hfi1_ctxtdata *uctxt);
|
||||
static unsigned int poll_urgent(struct file *fp, struct poll_table_struct *pt);
|
||||
static unsigned int poll_next(struct file *fp, struct poll_table_struct *pt);
|
||||
static __poll_t poll_urgent(struct file *fp, struct poll_table_struct *pt);
|
||||
static __poll_t poll_next(struct file *fp, struct poll_table_struct *pt);
|
||||
static int user_event_ack(struct hfi1_ctxtdata *uctxt, u16 subctxt,
|
||||
unsigned long arg);
|
||||
static int set_ctxt_pkey(struct hfi1_ctxtdata *uctxt, unsigned long arg);
|
||||
|
@ -607,10 +607,10 @@ static int vma_fault(struct vm_fault *vmf)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static unsigned int hfi1_poll(struct file *fp, struct poll_table_struct *pt)
|
||||
static __poll_t hfi1_poll(struct file *fp, struct poll_table_struct *pt)
|
||||
{
|
||||
struct hfi1_ctxtdata *uctxt;
|
||||
unsigned pollflag;
|
||||
__poll_t pollflag;
|
||||
|
||||
uctxt = ((struct hfi1_filedata *)fp->private_data)->uctxt;
|
||||
if (!uctxt)
|
||||
|
@ -1425,13 +1425,13 @@ static int user_exp_rcv_invalid(struct hfi1_filedata *fd, unsigned long arg,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static unsigned int poll_urgent(struct file *fp,
|
||||
static __poll_t poll_urgent(struct file *fp,
|
||||
struct poll_table_struct *pt)
|
||||
{
|
||||
struct hfi1_filedata *fd = fp->private_data;
|
||||
struct hfi1_ctxtdata *uctxt = fd->uctxt;
|
||||
struct hfi1_devdata *dd = uctxt->dd;
|
||||
unsigned pollflag;
|
||||
__poll_t pollflag;
|
||||
|
||||
poll_wait(fp, &uctxt->wait, pt);
|
||||
|
||||
|
@ -1448,13 +1448,13 @@ static unsigned int poll_urgent(struct file *fp,
|
|||
return pollflag;
|
||||
}
|
||||
|
||||
static unsigned int poll_next(struct file *fp,
|
||||
static __poll_t poll_next(struct file *fp,
|
||||
struct poll_table_struct *pt)
|
||||
{
|
||||
struct hfi1_filedata *fd = fp->private_data;
|
||||
struct hfi1_ctxtdata *uctxt = fd->uctxt;
|
||||
struct hfi1_devdata *dd = uctxt->dd;
|
||||
unsigned pollflag;
|
||||
__poll_t pollflag;
|
||||
|
||||
poll_wait(fp, &uctxt->wait, pt);
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ static int qib_open(struct inode *, struct file *);
|
|||
static int qib_close(struct inode *, struct file *);
|
||||
static ssize_t qib_write(struct file *, const char __user *, size_t, loff_t *);
|
||||
static ssize_t qib_write_iter(struct kiocb *, struct iov_iter *);
|
||||
static unsigned int qib_poll(struct file *, struct poll_table_struct *);
|
||||
static __poll_t qib_poll(struct file *, struct poll_table_struct *);
|
||||
static int qib_mmapf(struct file *, struct vm_area_struct *);
|
||||
|
||||
/*
|
||||
|
@ -1092,12 +1092,12 @@ bail:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static unsigned int qib_poll_urgent(struct qib_ctxtdata *rcd,
|
||||
static __poll_t qib_poll_urgent(struct qib_ctxtdata *rcd,
|
||||
struct file *fp,
|
||||
struct poll_table_struct *pt)
|
||||
{
|
||||
struct qib_devdata *dd = rcd->dd;
|
||||
unsigned pollflag;
|
||||
__poll_t pollflag;
|
||||
|
||||
poll_wait(fp, &rcd->wait, pt);
|
||||
|
||||
|
@ -1114,12 +1114,12 @@ static unsigned int qib_poll_urgent(struct qib_ctxtdata *rcd,
|
|||
return pollflag;
|
||||
}
|
||||
|
||||
static unsigned int qib_poll_next(struct qib_ctxtdata *rcd,
|
||||
static __poll_t qib_poll_next(struct qib_ctxtdata *rcd,
|
||||
struct file *fp,
|
||||
struct poll_table_struct *pt)
|
||||
{
|
||||
struct qib_devdata *dd = rcd->dd;
|
||||
unsigned pollflag;
|
||||
__poll_t pollflag;
|
||||
|
||||
poll_wait(fp, &rcd->wait, pt);
|
||||
|
||||
|
@ -1135,10 +1135,10 @@ static unsigned int qib_poll_next(struct qib_ctxtdata *rcd,
|
|||
return pollflag;
|
||||
}
|
||||
|
||||
static unsigned int qib_poll(struct file *fp, struct poll_table_struct *pt)
|
||||
static __poll_t qib_poll(struct file *fp, struct poll_table_struct *pt)
|
||||
{
|
||||
struct qib_ctxtdata *rcd;
|
||||
unsigned pollflag;
|
||||
__poll_t pollflag;
|
||||
|
||||
rcd = ctxt_fp(fp);
|
||||
if (!rcd)
|
||||
|
|
|
@ -635,11 +635,11 @@ static ssize_t evdev_read(struct file *file, char __user *buffer,
|
|||
}
|
||||
|
||||
/* No kernel lock - fine */
|
||||
static unsigned int evdev_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t evdev_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct evdev_client *client = file->private_data;
|
||||
struct evdev *evdev = client->evdev;
|
||||
unsigned int mask;
|
||||
__poll_t mask;
|
||||
|
||||
poll_wait(file, &evdev->wait, wait);
|
||||
|
||||
|
|
|
@ -1048,7 +1048,7 @@ static inline void input_wakeup_procfs_readers(void)
|
|||
wake_up(&input_devices_poll_wait);
|
||||
}
|
||||
|
||||
static unsigned int input_proc_devices_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t input_proc_devices_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
poll_wait(file, &input_devices_poll_wait, wait);
|
||||
if (file->f_version != input_devices_state) {
|
||||
|
|
|
@ -436,7 +436,7 @@ static ssize_t joydev_read(struct file *file, char __user *buf,
|
|||
}
|
||||
|
||||
/* No kernel lock - fine */
|
||||
static unsigned int joydev_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t joydev_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct joydev_client *client = file->private_data;
|
||||
struct joydev *joydev = client->joydev;
|
||||
|
|
|
@ -408,7 +408,7 @@ static ssize_t hp_sdc_rtc_read(struct file *file, char __user *buf,
|
|||
return retval;
|
||||
}
|
||||
|
||||
static unsigned int hp_sdc_rtc_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t hp_sdc_rtc_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
unsigned long l;
|
||||
|
||||
|
|
|
@ -694,7 +694,7 @@ static ssize_t uinput_read(struct file *file, char __user *buffer,
|
|||
return retval;
|
||||
}
|
||||
|
||||
static unsigned int uinput_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t uinput_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct uinput_device *udev = file->private_data;
|
||||
|
||||
|
|
|
@ -757,11 +757,11 @@ static ssize_t mousedev_read(struct file *file, char __user *buffer,
|
|||
}
|
||||
|
||||
/* No kernel lock - fine */
|
||||
static unsigned int mousedev_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t mousedev_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct mousedev_client *client = file->private_data;
|
||||
struct mousedev *mousedev = client->mousedev;
|
||||
unsigned int mask;
|
||||
__poll_t mask;
|
||||
|
||||
poll_wait(file, &mousedev->wait, wait);
|
||||
|
||||
|
|
|
@ -239,11 +239,11 @@ out:
|
|||
return retval;
|
||||
}
|
||||
|
||||
static unsigned int serio_raw_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t serio_raw_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct serio_raw_client *client = file->private_data;
|
||||
struct serio_raw *serio_raw = client->serio_raw;
|
||||
unsigned int mask;
|
||||
__poll_t mask;
|
||||
|
||||
poll_wait(file, &serio_raw->wait, wait);
|
||||
|
||||
|
|
|
@ -248,7 +248,7 @@ out:
|
|||
return error ?: count;
|
||||
}
|
||||
|
||||
static unsigned int userio_char_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t userio_char_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct userio_device *userio = file->private_data;
|
||||
|
||||
|
|
|
@ -724,11 +724,11 @@ capi_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos
|
|||
return count;
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
static __poll_t
|
||||
capi_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct capidev *cdev = file->private_data;
|
||||
unsigned int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
|
||||
if (!cdev->ap.applid)
|
||||
return POLLERR;
|
||||
|
|
|
@ -119,10 +119,10 @@ isdn_divert_write(struct file *file, const char __user *buf, size_t count, loff_
|
|||
/***************************************/
|
||||
/* select routines for various kernels */
|
||||
/***************************************/
|
||||
static unsigned int
|
||||
static __poll_t
|
||||
isdn_divert_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
unsigned int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
|
||||
poll_wait(file, &(rd_queue), wait);
|
||||
/* mask = POLLOUT | POLLWRNORM; */
|
||||
|
|
|
@ -98,9 +98,9 @@ void diva_os_get_time(dword *sec, dword *usec)
|
|||
/*
|
||||
* device node operations
|
||||
*/
|
||||
static unsigned int maint_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t maint_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
unsigned int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
|
||||
poll_wait(file, &msgwaitq, wait);
|
||||
mask = POLLOUT | POLLWRNORM;
|
||||
|
|
|
@ -74,7 +74,7 @@ static ssize_t um_idi_read(struct file *file, char __user *buf, size_t count,
|
|||
loff_t *offset);
|
||||
static ssize_t um_idi_write(struct file *file, const char __user *buf,
|
||||
size_t count, loff_t *offset);
|
||||
static unsigned int um_idi_poll(struct file *file, poll_table *wait);
|
||||
static __poll_t um_idi_poll(struct file *file, poll_table *wait);
|
||||
static int um_idi_open(struct inode *inode, struct file *file);
|
||||
static int um_idi_release(struct inode *inode, struct file *file);
|
||||
static int remove_entity(void *entity);
|
||||
|
@ -365,7 +365,7 @@ um_idi_write(struct file *file, const char __user *buf, size_t count,
|
|||
return (ret);
|
||||
}
|
||||
|
||||
static unsigned int um_idi_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t um_idi_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
diva_um_idi_os_context_t *p_os;
|
||||
|
||||
|
|
|
@ -650,7 +650,7 @@ static ssize_t divas_read(struct file *file, char __user *buf,
|
|||
return (ret);
|
||||
}
|
||||
|
||||
static unsigned int divas_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t divas_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
if (!file->private_data) {
|
||||
return (POLLERR);
|
||||
|
|
|
@ -99,7 +99,7 @@ divas_write(struct file *file, const char __user *buf, size_t count, loff_t *off
|
|||
return (-ENODEV);
|
||||
}
|
||||
|
||||
static unsigned int divas_poll(struct file *file, poll_table *wait)
|
||||
static __poll_t divas_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
return (POLLERR);
|
||||
}
|
||||
|
|
|
@ -281,10 +281,10 @@ hysdn_log_close(struct inode *ino, struct file *filep)
|
|||
/*************************************************/
|
||||
/* select/poll routine to be able using select() */
|
||||
/*************************************************/
|
||||
static unsigned int
|
||||
static __poll_t
|
||||
hysdn_log_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
unsigned int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
hysdn_card *card = PDE_DATA(file_inode(file));
|
||||
struct procdata *pd = card->proclog;
|
||||
|
||||
|
|
|
@ -1227,10 +1227,10 @@ out:
|
|||
return retval;
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
static __poll_t
|
||||
isdn_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
unsigned int mask = 0;
|
||||
__poll_t mask = 0;
|
||||
unsigned int minor = iminor(file_inode(file));
|
||||
int drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL);
|
||||
|
||||
|
|
|
@ -685,10 +685,10 @@ isdn_ppp_ioctl(int min, struct file *file, unsigned int cmd, unsigned long arg)
|
|||
return 0;
|
||||
}
|
||||
|
||||
unsigned int
|
||||
__poll_t
|
||||
isdn_ppp_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
u_int mask;
|
||||
__poll_t mask;
|
||||
struct ippp_buf_queue *bf, *bl;
|
||||
u_long flags;
|
||||
struct ippp_struct *is;
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче