Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1665147
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] HID: Replace semaphore driver_lock with mutex |
| Date | 2017-06-13 22:10 +0200 |
| Message-ID | <tS0it-40M-1@gated-at.bofh.it> (permalink) |
| References | <tRQj8-6bD-19@gated-at.bofh.it> <tRQCv-6hR-29@gated-at.bofh.it> <tRQMb-6li-25@gated-at.bofh.it> <tRQVQ-6DL-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Jun 13, 2017 at 12:09 PM, Binoy Jayan <binoy.jayan@linaro.org> wrote:
> Hi,
>
> On 13 June 2017 at 15:26, Benjamin Tissoires
> <benjamin.tissoires@redhat.com> wrote:
>
>>> Looks good to me, but I see you didn't include David and Andrew on
>>> Cc, it would be good for at least one of them to provide an Ack as well.
>>
>> Please also CC linux-input@
>
> Will do that.
>> (one more nitpick below too)
>> A little bit below, there is:
>> bool io_started; /* Protected by driver_lock. If IO has started */
>>
>> You should probably remove the mention to driver_lock here.
>
> Will remove the reference too.
>
> Thank you for noticing that, initially I missed it as I thought
> 'io_started' somehow
> influences the increment of the semaphore, but its anyway used only in
> hid-core.c
It is also used in hid_device_io_start() and hid_device_io_stop(), but
what's important here is that these are only ever called from inside of
hid_device_probe() and other functions called by that, so no
synchronization across CPUs is required here.
I think in theory, it could be accessed from below hid_device_remove
as well, but I did not find any instance of that.
Arnd
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2] HID: Replace semaphore driver_lock with mutex Binoy Jayan <binoy.jayan@linaro.org> - 2017-06-13 11:30 +0200
Re: [PATCH v2] HID: Replace semaphore driver_lock with mutex Arnd Bergmann <arnd@arndb.de> - 2017-06-13 11:50 +0200
Re: [PATCH v2] HID: Replace semaphore driver_lock with mutex Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2017-06-13 12:00 +0200
Re: [PATCH v2] HID: Replace semaphore driver_lock with mutex Binoy Jayan <binoy.jayan@linaro.org> - 2017-06-13 12:10 +0200
Re: [PATCH v2] HID: Replace semaphore driver_lock with mutex Arnd Bergmann <arnd@arndb.de> - 2017-06-13 22:10 +0200
Re: [PATCH v2] HID: Replace semaphore driver_lock with mutex David Herrmann <dh.herrmann@gmail.com> - 2017-06-13 17:50 +0200
Re: [PATCH v2] HID: Replace semaphore driver_lock with mutex Arnd Bergmann <arnd@arndb.de> - 2017-06-13 22:30 +0200
Re: [PATCH v2] HID: Replace semaphore driver_lock with mutex Binoy Jayan <binoy.jayan@linaro.org> - 2017-06-14 07:30 +0200
Re: [PATCH v2] HID: Replace semaphore driver_lock with mutex Arnd Bergmann <arnd@arndb.de> - 2017-06-14 09:30 +0200
Re: [PATCH v2] HID: Replace semaphore driver_lock with mutex David Herrmann <dh.herrmann@gmail.com> - 2017-06-14 09:50 +0200
Re: [PATCH v2] HID: Replace semaphore driver_lock with mutex Arnd Bergmann <arnd@arndb.de> - 2017-06-14 14:00 +0200
Re: [PATCH v2] HID: Replace semaphore driver_lock with mutex David Herrmann <dh.herrmann@gmail.com> - 2017-06-19 12:30 +0200
Re: [PATCH v2] HID: Replace semaphore driver_lock with mutex Binoy Jayan <binoy.jayan@linaro.org> - 2017-06-13 12:20 +0200
csiph-web