Thread (38 messages) 38 messages, 8 authors, 2020-03-27

Re: [patch V3 03/20] usb: gadget: Use completion interface instead of open coding it

From: Felipe Balbi <balbi@kernel.org>
Date: 2020-03-25 08:38:11
Also in: linux-acpi, linux-pci, linux-pm, linux-usb, linuxppc-dev, lkml, netdev, platform-driver-x86

Thomas Gleixner [off-list ref] writes:
From: Thomas Gleixner <redacted>

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@linutronix.de>
Signed-off-by: Thomas Gleixner <redacted>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Felipe Balbi <balbi@kernel.org>
Cc: linux-usb@vger.kernel.org
Do you want to carry it via your tree? If so:

Acked-by: Felipe Balbi <balbi@kernel.org>

Otherwise, let me know and I'll pick this patch.

-- 
balbi

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help