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/input | |
parent | 13ddd1667e7f01071cdf120132238ffca004a88e (diff) | |
parent | c71d227fc4133f949dae620ed5e3a250b43f2415 (diff) | |
download | linux-168fe32a072a4b8dc81a3aebf0e5e588d38e2955.tar.bz2 |
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/input')
-rw-r--r-- | drivers/input/evdev.c | 4 | ||||
-rw-r--r-- | drivers/input/input.c | 2 | ||||
-rw-r--r-- | drivers/input/joydev.c | 2 | ||||
-rw-r--r-- | drivers/input/misc/hp_sdc_rtc.c | 2 | ||||
-rw-r--r-- | drivers/input/misc/uinput.c | 2 | ||||
-rw-r--r-- | drivers/input/mousedev.c | 4 | ||||
-rw-r--r-- | drivers/input/serio/serio_raw.c | 4 | ||||
-rw-r--r-- | drivers/input/serio/userio.c | 2 |
8 files changed, 11 insertions, 11 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 925571475005..0193dd4f0452 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -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); diff --git a/drivers/input/input.c b/drivers/input/input.c index e30642db50d5..0d0b2ab1bb6b 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -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) { diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index 7b29a8944039..fe3255572886 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c @@ -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; diff --git a/drivers/input/misc/hp_sdc_rtc.c b/drivers/input/misc/hp_sdc_rtc.c index 1c8c56efc995..9c3f7ec3bd3d 100644 --- a/drivers/input/misc/hp_sdc_rtc.c +++ b/drivers/input/misc/hp_sdc_rtc.c @@ -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; diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c index 39ddd9a73feb..91df0df15e68 100644 --- a/drivers/input/misc/uinput.c +++ b/drivers/input/misc/uinput.c @@ -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; diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c index 2d7f691ec71c..731d84ae5101 100644 --- a/drivers/input/mousedev.c +++ b/drivers/input/mousedev.c @@ -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); diff --git a/drivers/input/serio/serio_raw.c b/drivers/input/serio/serio_raw.c index 516f9fe77a17..fccf55a380b2 100644 --- a/drivers/input/serio/serio_raw.c +++ b/drivers/input/serio/serio_raw.c @@ -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); diff --git a/drivers/input/serio/userio.c b/drivers/input/serio/userio.c index df1fd41860ac..a63de06b08bc 100644 --- a/drivers/input/serio/userio.c +++ b/drivers/input/serio/userio.c @@ -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; |