Re: [patch V3 03/20] usb: gadget: Use completion interface instead of open coding it
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>
- Subject: Re: [patch V3 03/20] usb: gadget: Use completion interface instead of open coding it
- From: Felipe Balbi <balbi@xxxxxxxxxx>
- Date: Wed, 25 Mar 2020 10:37:57 +0200
- Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Sebastian Siewior <bigeasy@xxxxxxxxxxxxx>, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Joel Fernandes <joel@xxxxxxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>, Davidlohr Bueso <dave@xxxxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, linux-usb@xxxxxxxxxxxxxxx, Logan Gunthorpe <logang@xxxxxxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, Kurt Schwemmer <kurt.schwemmer@xxxxxxxxxxxxx>, linux-pci@xxxxxxxxxxxxxxx, Kalle Valo <kvalo@xxxxxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, linux-wireless@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, Darren Hart <dvhart@xxxxxxxxxxxxx>, Andy Shevchenko <andy@xxxxxxxxxxxxx>, platform-driver-x86@xxxxxxxxxxxxxxx, Zhang Rui <rui.zhang@xxxxxxxxx>, "Rafael J. Wysocki" <rafael.j.wysocki@xxxxxxxxx>, linux-pm@xxxxxxxxxxxxxxx, Len Brown <lenb@xxxxxxxxxx>, linux-acpi@xxxxxxxxxxxxxxx, kbuild test robot <lkp@xxxxxxxxx>, Nick Hu <nickhu@xxxxxxxxxxxxx>, Greentime Hu <green.hu@xxxxxxxxx>, Vincent Chen <deanbo422@xxxxxxxxx>, Guo Ren <guoren@xxxxxxxxxx>, linux-csky@xxxxxxxxxxxxxxx, Brian Cain <bcain@xxxxxxxxxxxxxx>, linux-hexagon@xxxxxxxxxxxxxxx, Tony Luck <tony.luck@xxxxxxxxx>, Fenghua Yu <fenghua.yu@xxxxxxxxx>, linux-ia64@xxxxxxxxxxxxxxx, Michal Simek <monstr@xxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Geoff Levand <geoff@xxxxxxxxxxxxx>, linuxppc-dev@xxxxxxxxxxxxxxxx, "Paul E . McKenney" <paulmck@xxxxxxxxxx>, Jonathan Corbet <corbet@xxxxxxx>, Randy Dunlap <rdunlap@xxxxxxxxxxxxx>, Davidlohr Bueso <dbueso@xxxxxxx>
- In-reply-to: <20200321113241.043380271@linutronix.de>
- References: <20200321112544.878032781@linutronix.de> <20200321113241.043380271@linutronix.de>
Thomas Gleixner <tglx@xxxxxxxxxxxxx> writes:
> From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
>
> 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@xxxxxxxxxxxxx>
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Reviewed-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Cc: Felipe Balbi <balbi@xxxxxxxxxx>
> Cc: linux-usb@xxxxxxxxxxxxxxx
Do you want to carry it via your tree? If so:
Acked-by: Felipe Balbi <balbi@xxxxxxxxxx>
Otherwise, let me know and I'll pick this patch.
--
balbi
Attachment:
signature.asc
Description: PGP signature
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]