diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-01-30 17:58:07 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-01-30 17:58:07 -0800 |
commit | 168fe32a072a4b8dc81a3aebf0e5e588d38e2955 (patch) | |
tree | 297f0f6192256785979f5ebfb92797f81754548d /drivers/staging/media | |
parent | 13ddd1667e7f01071cdf120132238ffca004a88e (diff) | |
parent | c71d227fc4133f949dae620ed5e3a250b43f2415 (diff) | |
download | linux-stable-168fe32a072a4b8dc81a3aebf0e5e588d38e2955.tar.gz linux-stable-168fe32a072a4b8dc81a3aebf0e5e588d38e2955.tar.bz2 linux-stable-168fe32a072a4b8dc81a3aebf0e5e588d38e2955.zip |
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
...
Diffstat (limited to 'drivers/staging/media')
-rw-r--r-- | drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c | 2 | ||||
-rw-r--r-- | drivers/staging/media/bcm2048/radio-bcm2048.c | 4 | ||||
-rw-r--r-- | drivers/staging/media/davinci_vpfe/vpfe_video.c | 2 | ||||
-rw-r--r-- | drivers/staging/media/lirc/lirc_zilog.c | 4 | ||||
-rw-r--r-- | drivers/staging/media/omap4iss/iss_video.c | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c index dd7596d8763d..6657ebbe068a 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c @@ -1255,7 +1255,7 @@ static int atomisp_file_mmap(struct file *file, struct vm_area_struct *vma) return videobuf_mmap_mapper(&pipe->outq, vma); } -static unsigned int atomisp_poll(struct file *file, +static __poll_t atomisp_poll(struct file *file, struct poll_table_struct *pt) { struct video_device *vdev = video_devdata(file); diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c index 5d3b0e5a1283..4ffff6f8b809 100644 --- a/drivers/staging/media/bcm2048/radio-bcm2048.c +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c @@ -2174,11 +2174,11 @@ static int bcm2048_fops_release(struct file *file) return 0; } -static unsigned int bcm2048_fops_poll(struct file *file, +static __poll_t bcm2048_fops_poll(struct file *file, struct poll_table_struct *pts) { struct bcm2048_device *bdev = video_drvdata(file); - int retval = 0; + __poll_t retval = 0; poll_wait(file, &bdev->read_queue, pts); diff --git a/drivers/staging/media/davinci_vpfe/vpfe_video.c b/drivers/staging/media/davinci_vpfe/vpfe_video.c index 155e8c758e4b..588743a6fd8a 100644 --- a/drivers/staging/media/davinci_vpfe/vpfe_video.c +++ b/drivers/staging/media/davinci_vpfe/vpfe_video.c @@ -573,7 +573,7 @@ static int vpfe_mmap(struct file *file, struct vm_area_struct *vma) /* * vpfe_poll() - It is used for select/poll system call */ -static unsigned int vpfe_poll(struct file *file, poll_table *wait) +static __poll_t vpfe_poll(struct file *file, poll_table *wait) { struct vpfe_video_device *video = video_drvdata(file); struct vpfe_device *vpfe_dev = video->vpfe_dev; diff --git a/drivers/staging/media/lirc/lirc_zilog.c b/drivers/staging/media/lirc/lirc_zilog.c index 6bd0717bf76e..a003603af725 100644 --- a/drivers/staging/media/lirc/lirc_zilog.c +++ b/drivers/staging/media/lirc/lirc_zilog.c @@ -1197,12 +1197,12 @@ static ssize_t write(struct file *filep, const char __user *buf, size_t n, } /* copied from lirc_dev */ -static unsigned int poll(struct file *filep, poll_table *wait) +static __poll_t poll(struct file *filep, poll_table *wait) { struct IR *ir = lirc_get_pdata(filep); struct IR_rx *rx; struct lirc_buffer *rbuf = ir->l->buf; - unsigned int ret; + __poll_t ret; dev_dbg(ir->dev, "%s called\n", __func__); diff --git a/drivers/staging/media/omap4iss/iss_video.c b/drivers/staging/media/omap4iss/iss_video.c index 9e2f0421a01e..a3a83424a926 100644 --- a/drivers/staging/media/omap4iss/iss_video.c +++ b/drivers/staging/media/omap4iss/iss_video.c @@ -1185,7 +1185,7 @@ static int iss_video_release(struct file *file) return 0; } -static unsigned int iss_video_poll(struct file *file, poll_table *wait) +static __poll_t iss_video_poll(struct file *file, poll_table *wait) { struct iss_video_fh *vfh = to_iss_video_fh(file->private_data); |