Skip to content

Commit

Permalink
the rest of drivers/*: annotate ->poll() instances
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Nov 28, 2017
1 parent c23e0cb commit afc9a42
Show file tree
Hide file tree
Showing 144 changed files with 257 additions and 256 deletions.
2 changes: 1 addition & 1 deletion drivers/android/binder.c
Original file line number Diff line number Diff line change
Expand Up @@ -4276,7 +4276,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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci_ldisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci_vhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion drivers/char/apm-emulation.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion drivers/char/dsp56k.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions drivers/char/dtlk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/hpet.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ hpet_read(struct file *file, char __user *buf, size_t count, loff_t * ppos)
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;
Expand Down
4 changes: 2 additions & 2 deletions drivers/char/ipmi/bt-bmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions drivers/char/ipmi/ipmi_devintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions drivers/char/ipmi/ipmi_watchdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions drivers/char/pcmcia/cm4040_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions drivers/char/ppdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions drivers/char/random.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions drivers/char/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -790,7 +790,7 @@ static int rtc_release(struct inode *inode, struct file *file)
}

#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;

Expand Down
4 changes: 2 additions & 2 deletions drivers/char/snsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/sonypi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions drivers/char/tpm/tpm_vtpm_proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions drivers/char/virtio_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -982,10 +982,10 @@ static ssize_t port_fops_splice_write(struct pipe_inode_info *pipe,
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);
Expand Down
4 changes: 2 additions & 2 deletions drivers/char/xillybus/xillybus_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1736,10 +1736,10 @@ static loff_t xillybus_llseek(struct file *filp, loff_t offset, int whence)
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);
Expand Down
4 changes: 2 additions & 2 deletions drivers/dma-buf/dma-buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ 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;
Expand Down Expand Up @@ -195,7 +195,7 @@ static unsigned int dma_buf_poll(struct file *file, poll_table *poll)

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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma-buf/sync_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions drivers/firewire/core-cdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions drivers/firewire/nosy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions drivers/gpio/gpiolib.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,11 +603,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);

Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/drm_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
8 changes: 4 additions & 4 deletions drivers/gpu/drm/i915/i915_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ int vmw_present_readback_ioctl(struct drm_device *dev, void *data,
* 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 =
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/vga/vgaarb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,7 @@ static ssize_t vga_arb_write(struct file *file, const char __user *buf,
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__);

Expand Down
2 changes: 1 addition & 1 deletion drivers/hid/hid-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,7 @@ static ssize_t hid_debug_events_read(struct file *file, char __user *buffer,
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;

Expand Down
2 changes: 1 addition & 1 deletion drivers/hid/hid-roccat.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ static ssize_t roccat_read(struct file *file, char __user *buffer,
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);
Expand Down
4 changes: 2 additions & 2 deletions drivers/hid/hid-sensor-custom.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading

0 comments on commit afc9a42

Please sign in to comment.