From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F517C4332B for ; Thu, 19 Mar 2020 08:41:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D548B2072D for ; Thu, 19 Mar 2020 08:41:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584607282; bh=Ax69JWe2mAO3MiZ3t8XP/HcweZkT7pxlhXJ1svHjTis=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=R3CeiHlBjs8wXYpLY9BJYH+M3iOrVFBBOvcsSZOp3+hj3tLGvPv7GrfTv9X2ZN0tg pVfnm05WwCqCq2NCij/IAxtWtClXzZpeKAzXCGvyW7k8pzKSG+ykBmud1gSRsUiwvU IqpPqNuD43SmKsFFtZvL2yu20mEUqdAHUbmjTUTA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726979AbgCSIlS (ORCPT ); Thu, 19 Mar 2020 04:41:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:56280 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725895AbgCSIlS (ORCPT ); Thu, 19 Mar 2020 04:41:18 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 237512072C; Thu, 19 Mar 2020 08:41:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584607277; bh=Ax69JWe2mAO3MiZ3t8XP/HcweZkT7pxlhXJ1svHjTis=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NZqqpZ2jqJGbiLh1O9e+6Zp6HeAL9Yj2e7wjAbOpeJv419lkji1jaJB7nHjmMhGzm 7GPB5mhSV879Jnm+FzyKpqgQIUxX3FrelEzxKQJHyPfzrXshDpuEU831YrsdrjaF5K ZKnx/byPP6ThnVhPThevhoLaMVz4u7vaQJ77K2II= Date: Thu, 19 Mar 2020 09:41:15 +0100 From: Greg Kroah-Hartman To: Thomas Gleixner Cc: LKML , Peter Zijlstra , Linus Torvalds , Ingo Molnar , Will Deacon , "Paul E . McKenney" , Joel Fernandes , Steven Rostedt , Randy Dunlap , Sebastian Andrzej Siewior , Felipe Balbi , linux-usb@vger.kernel.org, Logan Gunthorpe , Kurt Schwemmer , Bjorn Helgaas , linux-pci@vger.kernel.org, Kalle Valo , "David S. Miller" , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Oleg Nesterov , Davidlohr Bueso , Michael Ellerman , Arnd Bergmann , linuxppc-dev@lists.ozlabs.org Subject: Re: [patch V2 03/15] usb: gadget: Use completion interface instead of open coding it Message-ID: <20200319084115.GB3492783@kroah.com> References: <20200318204302.693307984@linutronix.de> <20200318204407.700914073@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200318204407.700914073@linutronix.de> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Wed, Mar 18, 2020 at 09:43:05PM +0100, Thomas Gleixner wrote: > 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 > Signed-off-by: Thomas Gleixner > Cc: Felipe Balbi > Cc: Greg Kroah-Hartman > Cc: linux-usb@vger.kernel.org > --- > V2: New patch to avoid the conversion to swait interfaces later > --- Reviewed-by: Greg Kroah-Hartman