[patch V3 03/20] usb: gadget: Use completion interface instead of open coding it
Felipe Balbi
balbi at kernel.org
Wed Mar 25 19:37:57 AEDT 2020
Thomas Gleixner <tglx at linutronix.de> writes:
> From: Thomas Gleixner <tglx at linutronix.de>
>
> ep_io() uses a completion on stack and open codes the waiting with:
>
> wait_event_interruptible (done.wait, done.done);
> and
> wait_event (done.wait, done.done);
>
> This waits in non-exclusive mode for complete(), but there is no reason to
> do so because the completion can only be waited for by the task itself and
> complete() wakes exactly one exlusive waiter.
>
> Replace the open coded implementation with the corresponding
> wait_for_completion*() functions.
>
> No functional change.
>
> Reported-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
> Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
> Reviewed-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
> Cc: Felipe Balbi <balbi at kernel.org>
> Cc: linux-usb at vger.kernel.org
Do you want to carry it via your tree? If so:
Acked-by: Felipe Balbi <balbi at kernel.org>
Otherwise, let me know and I'll pick this patch.
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20200325/7f6da9a1/attachment.sig>
More information about the Linuxppc-dev
mailing list