Thread (10 messages) flat view 10 messages, 4 authors, 2017-06-19

Re: [PATCH v2] HID: Replace semaphore driver_lock with mutex

From: Arnd Bergmann <arnd@arndb.de>
Date: 2017-06-13 20:00:48
Also in: lkml

On Tue, Jun 13, 2017 at 12:09 PM, Binoy Jayan [off-list ref] wrote:
Hi,

On 13 June 2017 at 15:26, Benjamin Tissoires
[off-list ref] wrote:
quoted
quoted
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.
quoted
(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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help