Skip to content

Commit afc9a42

Browse files
author
Al Viro
committed
the rest of drivers/*: annotate ->poll() instances
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent c23e0cb commit afc9a42

File tree

144 files changed

+257
-256
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+257
-256
lines changed

drivers/android/binder.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -4276,7 +4276,7 @@ static int binder_thread_release(struct binder_proc *proc,
42764276
return active_transactions;
42774277
}
42784278

4279-
static unsigned int binder_poll(struct file *filp,
4279+
static __poll_t binder_poll(struct file *filp,
42804280
struct poll_table_struct *wait)
42814281
{
42824282
struct binder_proc *proc = filp->private_data;

drivers/bluetooth/hci_ldisc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ static ssize_t hci_uart_tty_write(struct tty_struct *tty, struct file *file,
794794
return 0;
795795
}
796796

797-
static unsigned int hci_uart_tty_poll(struct tty_struct *tty,
797+
static __poll_t hci_uart_tty_poll(struct tty_struct *tty,
798798
struct file *filp, poll_table *wait)
799799
{
800800
return 0;

drivers/bluetooth/hci_vhci.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ static ssize_t vhci_write(struct kiocb *iocb, struct iov_iter *from)
299299
return vhci_get_user(data, from);
300300
}
301301

302-
static unsigned int vhci_poll(struct file *file, poll_table *wait)
302+
static __poll_t vhci_poll(struct file *file, poll_table *wait)
303303
{
304304
struct vhci_data *data = file->private_data;
305305

drivers/char/apm-emulation.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ static ssize_t apm_read(struct file *fp, char __user *buf, size_t count, loff_t
236236
return ret;
237237
}
238238

239-
static unsigned int apm_poll(struct file *fp, poll_table * wait)
239+
static __poll_t apm_poll(struct file *fp, poll_table * wait)
240240
{
241241
struct apm_user *as = fp->private_data;
242242

drivers/char/dsp56k.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ static long dsp56k_ioctl(struct file *file, unsigned int cmd,
406406
* Do I need this function at all???
407407
*/
408408
#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)
410410
{
411411
int dev = iminor(file_inode(file)) & 0x0f;
412412

drivers/char/dtlk.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ static ssize_t dtlk_read(struct file *, char __user *,
9191
size_t nbytes, loff_t * ppos);
9292
static ssize_t dtlk_write(struct file *, const char __user *,
9393
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 *);
9595
static int dtlk_open(struct inode *, struct file *);
9696
static int dtlk_release(struct inode *, struct file *);
9797
static long dtlk_ioctl(struct file *file,
@@ -228,9 +228,9 @@ static ssize_t dtlk_write(struct file *file, const char __user *buf,
228228
return -EAGAIN;
229229
}
230230

231-
static unsigned int dtlk_poll(struct file *file, poll_table * wait)
231+
static __poll_t dtlk_poll(struct file *file, poll_table * wait)
232232
{
233-
int mask = 0;
233+
__poll_t mask = 0;
234234
unsigned long expires;
235235

236236
TRACE_TEXT(" dtlk_poll");

drivers/char/hpet.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ hpet_read(struct file *file, char __user *buf, size_t count, loff_t * ppos)
342342
return retval;
343343
}
344344

345-
static unsigned int hpet_poll(struct file *file, poll_table * wait)
345+
static __poll_t hpet_poll(struct file *file, poll_table * wait)
346346
{
347347
unsigned long v;
348348
struct hpet_dev *devp;

drivers/char/ipmi/bt-bmc.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,10 @@ static int bt_bmc_release(struct inode *inode, struct file *file)
338338
return 0;
339339
}
340340

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)
342342
{
343343
struct bt_bmc *bt_bmc = file_bt_bmc(file);
344-
unsigned int mask = 0;
344+
__poll_t mask = 0;
345345
u8 ctrl;
346346

347347
poll_wait(file, &bt_bmc->queue, wait);

drivers/char/ipmi/ipmi_devintf.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ static void file_receive_handler(struct ipmi_recv_msg *msg,
7878
spin_unlock_irqrestore(&(priv->recv_msg_lock), flags);
7979
}
8080

81-
static unsigned int ipmi_poll(struct file *file, poll_table *wait)
81+
static __poll_t ipmi_poll(struct file *file, poll_table *wait)
8282
{
8383
struct ipmi_file_private *priv = file->private_data;
84-
unsigned int mask = 0;
84+
__poll_t mask = 0;
8585
unsigned long flags;
8686

8787
poll_wait(file, &priv->wait, wait);

drivers/char/ipmi/ipmi_watchdog.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -887,9 +887,9 @@ static int ipmi_open(struct inode *ino, struct file *filep)
887887
}
888888
}
889889

890-
static unsigned int ipmi_poll(struct file *file, poll_table *wait)
890+
static __poll_t ipmi_poll(struct file *file, poll_table *wait)
891891
{
892-
unsigned int mask = 0;
892+
__poll_t mask = 0;
893893

894894
poll_wait(file, &read_q, wait);
895895

drivers/char/pcmcia/cm4040_cs.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -415,10 +415,10 @@ static ssize_t cm4040_write(struct file *filp, const char __user *buf,
415415
return count;
416416
}
417417

418-
static unsigned int cm4040_poll(struct file *filp, poll_table *wait)
418+
static __poll_t cm4040_poll(struct file *filp, poll_table *wait)
419419
{
420420
struct reader_dev *dev = filp->private_data;
421-
unsigned int mask = 0;
421+
__poll_t mask = 0;
422422

423423
poll_wait(filp, &dev->poll_wait, wait);
424424

drivers/char/ppdev.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -769,10 +769,10 @@ static int pp_release(struct inode *inode, struct file *file)
769769
}
770770

771771
/* 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)
773773
{
774774
struct pp_struct *pp = file->private_data;
775-
unsigned int mask = 0;
775+
__poll_t mask = 0;
776776

777777
poll_wait(file, &pp->irq_wait, wait);
778778
if (atomic_read(&pp->irqc))

drivers/char/random.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1784,10 +1784,10 @@ urandom_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos)
17841784
return ret;
17851785
}
17861786

1787-
static unsigned int
1787+
static __poll_t
17881788
random_poll(struct file *file, poll_table * wait)
17891789
{
1790-
unsigned int mask;
1790+
__poll_t mask;
17911791

17921792
poll_wait(file, &random_read_wait, wait);
17931793
poll_wait(file, &random_write_wait, wait);

drivers/char/rtc.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ static long rtc_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
147147
static void rtc_get_rtc_time(struct rtc_time *rtc_tm);
148148

149149
#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);
151151
#endif
152152

153153
static void get_rtc_alm_time(struct rtc_time *alm_tm);
@@ -790,7 +790,7 @@ static int rtc_release(struct inode *inode, struct file *file)
790790
}
791791

792792
#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)
794794
{
795795
unsigned long l;
796796

drivers/char/snsc.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,10 @@ scdrv_write(struct file *file, const char __user *buf,
321321
return status;
322322
}
323323

324-
static unsigned int
324+
static __poll_t
325325
scdrv_poll(struct file *file, struct poll_table_struct *wait)
326326
{
327-
unsigned int mask = 0;
327+
__poll_t mask = 0;
328328
int status = 0;
329329
struct subch_data_s *sd = (struct subch_data_s *) file->private_data;
330330
unsigned long flags;

drivers/char/sonypi.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ static ssize_t sonypi_misc_read(struct file *file, char __user *buf,
940940
return ret;
941941
}
942942

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)
944944
{
945945
poll_wait(file, &sonypi_device.fifo_proc_list, wait);
946946
if (kfifo_len(&sonypi_device.fifo))

drivers/char/tpm/tpm_vtpm_proxy.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,10 @@ static ssize_t vtpm_proxy_fops_write(struct file *filp, const char __user *buf,
173173
*
174174
* Return: Poll flags
175175
*/
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)
177177
{
178178
struct proxy_dev *proxy_dev = filp->private_data;
179-
unsigned ret;
179+
__poll_t ret;
180180

181181
poll_wait(filp, &proxy_dev->wq, wait);
182182

drivers/char/virtio_console.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -982,10 +982,10 @@ static ssize_t port_fops_splice_write(struct pipe_inode_info *pipe,
982982
return ret;
983983
}
984984

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)
986986
{
987987
struct port *port;
988-
unsigned int ret;
988+
__poll_t ret;
989989

990990
port = filp->private_data;
991991
poll_wait(filp, &port->waitqueue, wait);

drivers/char/xillybus/xillybus_core.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1736,10 +1736,10 @@ static loff_t xillybus_llseek(struct file *filp, loff_t offset, int whence)
17361736
return pos;
17371737
}
17381738

1739-
static unsigned int xillybus_poll(struct file *filp, poll_table *wait)
1739+
static __poll_t xillybus_poll(struct file *filp, poll_table *wait)
17401740
{
17411741
struct xilly_channel *channel = filp->private_data;
1742-
unsigned int mask = 0;
1742+
__poll_t mask = 0;
17431743
unsigned long flags;
17441744

17451745
poll_wait(filp, &channel->endpoint->ep_wait, wait);

drivers/dma-buf/dma-buf.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ static void dma_buf_poll_cb(struct dma_fence *fence, struct dma_fence_cb *cb)
157157
spin_unlock_irqrestore(&dcb->poll->lock, flags);
158158
}
159159

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)
161161
{
162162
struct dma_buf *dmabuf;
163163
struct reservation_object *resv;
@@ -195,7 +195,7 @@ static unsigned int dma_buf_poll(struct file *file, poll_table *poll)
195195

196196
if (fence_excl && (!(events & POLLOUT) || shared_count == 0)) {
197197
struct dma_buf_poll_cb_t *dcb = &dmabuf->cb_excl;
198-
unsigned long pevents = POLLIN;
198+
__poll_t pevents = POLLIN;
199199

200200
if (shared_count == 0)
201201
pevents |= POLLOUT;

drivers/dma-buf/sync_file.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ static int sync_file_release(struct inode *inode, struct file *file)
312312
return 0;
313313
}
314314

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)
316316
{
317317
struct sync_file *sync_file = file->private_data;
318318

drivers/firewire/core-cdev.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1784,10 +1784,10 @@ static int fw_device_op_release(struct inode *inode, struct file *file)
17841784
return 0;
17851785
}
17861786

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)
17881788
{
17891789
struct client *client = file->private_data;
1790-
unsigned int mask = 0;
1790+
__poll_t mask = 0;
17911791

17921792
poll_wait(file, &client->wait, pt);
17931793

drivers/firewire/nosy.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -328,11 +328,11 @@ nosy_release(struct inode *inode, struct file *file)
328328
return 0;
329329
}
330330

331-
static unsigned int
331+
static __poll_t
332332
nosy_poll(struct file *file, poll_table *pt)
333333
{
334334
struct client *client = file->private_data;
335-
unsigned int ret = 0;
335+
__poll_t ret = 0;
336336

337337
poll_wait(file, &client->buffer.wait, pt);
338338

drivers/gpio/gpiolib.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -603,11 +603,11 @@ struct lineevent_state {
603603
(GPIOEVENT_REQUEST_RISING_EDGE | \
604604
GPIOEVENT_REQUEST_FALLING_EDGE)
605605

606-
static unsigned int lineevent_poll(struct file *filep,
606+
static __poll_t lineevent_poll(struct file *filep,
607607
struct poll_table_struct *wait)
608608
{
609609
struct lineevent_state *le = filep->private_data;
610-
unsigned int events = 0;
610+
__poll_t events = 0;
611611

612612
poll_wait(filep, &le->wait, wait);
613613

drivers/gpu/drm/drm_file.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -559,10 +559,10 @@ EXPORT_SYMBOL(drm_read);
559559
*
560560
* Mask of POLL flags indicating the current status of the file.
561561
*/
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)
563563
{
564564
struct drm_file *file_priv = filp->private_data;
565-
unsigned int mask = 0;
565+
__poll_t mask = 0;
566566

567567
poll_wait(filp, &file_priv->event_wait, wait);
568568

drivers/gpu/drm/i915/i915_perf.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -2331,12 +2331,12 @@ static enum hrtimer_restart oa_poll_check_timer_cb(struct hrtimer *hrtimer)
23312331
*
23322332
* Returns: any poll events that are ready without sleeping
23332333
*/
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,
23352335
struct i915_perf_stream *stream,
23362336
struct file *file,
23372337
poll_table *wait)
23382338
{
2339-
unsigned int events = 0;
2339+
__poll_t events = 0;
23402340

23412341
stream->ops->poll_wait(stream, file, wait);
23422342

@@ -2365,11 +2365,11 @@ static unsigned int i915_perf_poll_locked(struct drm_i915_private *dev_priv,
23652365
*
23662366
* Returns: any poll events that are ready without sleeping
23672367
*/
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)
23692369
{
23702370
struct i915_perf_stream *stream = file->private_data;
23712371
struct drm_i915_private *dev_priv = stream->dev_priv;
2372-
int ret;
2372+
__poll_t ret;
23732373

23742374
mutex_lock(&dev_priv->perf.lock);
23752375
ret = i915_perf_poll_locked(dev_priv, stream, file, wait);

drivers/gpu/drm/vmwgfx/vmwgfx_drv.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ extern int vmw_present_ioctl(struct drm_device *dev, void *data,
713713
struct drm_file *file_priv);
714714
extern int vmw_present_readback_ioctl(struct drm_device *dev, void *data,
715715
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,
717717
struct poll_table_struct *wait);
718718
extern ssize_t vmw_fops_read(struct file *filp, char __user *buffer,
719719
size_t count, loff_t *offset);

drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ int vmw_present_readback_ioctl(struct drm_device *dev, void *data,
412412
* Wrapper around the drm_poll function that makes sure the device is
413413
* processing the fifo if drm_poll decides to wait.
414414
*/
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)
416416
{
417417
struct drm_file *file_priv = filp->private_data;
418418
struct vmw_private *dev_priv =

drivers/gpu/vga/vgaarb.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1266,7 +1266,7 @@ static ssize_t vga_arb_write(struct file *file, const char __user *buf,
12661266
return ret_val;
12671267
}
12681268

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)
12701270
{
12711271
pr_debug("%s\n", __func__);
12721272

drivers/hid/hid-debug.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,7 @@ static ssize_t hid_debug_events_read(struct file *file, char __user *buffer,
11791179
return ret;
11801180
}
11811181

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)
11831183
{
11841184
struct hid_debug_list *list = file->private_data;
11851185

drivers/hid/hid-roccat.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ static ssize_t roccat_read(struct file *file, char __user *buffer,
137137
return retval;
138138
}
139139

140-
static unsigned int roccat_poll(struct file *file, poll_table *wait)
140+
static __poll_t roccat_poll(struct file *file, poll_table *wait)
141141
{
142142
struct roccat_reader *reader = file->private_data;
143143
poll_wait(file, &reader->device->wait, wait);

drivers/hid/hid-sensor-custom.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -702,11 +702,11 @@ static int hid_sensor_custom_open(struct inode *inode, struct file *file)
702702
return nonseekable_open(inode, file);
703703
}
704704

705-
static unsigned int hid_sensor_custom_poll(struct file *file,
705+
static __poll_t hid_sensor_custom_poll(struct file *file,
706706
struct poll_table_struct *wait)
707707
{
708708
struct hid_sensor_custom *sensor_inst;
709-
unsigned int mask = 0;
709+
__poll_t mask = 0;
710710

711711
sensor_inst = container_of(file->private_data,
712712
struct hid_sensor_custom, custom_dev);

0 commit comments

Comments
 (0)