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 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.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 7B7B1C4332D for ; Thu, 19 Mar 2020 08:44:27 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2D6382072C for ; Thu, 19 Mar 2020 08:44:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="NZqqpZ2j" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2D6382072C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 48jgST2sHszDrCl for ; Thu, 19 Mar 2020 19:44:25 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linuxfoundation.org (client-ip=198.145.29.99; helo=mail.kernel.org; envelope-from=gregkh@linuxfoundation.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=default header.b=NZqqpZ2j; dkim-atps=neutral Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 48jgNv6TGrzDr3j for ; Thu, 19 Mar 2020 19:41:19 +1100 (AEDT) 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 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> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Randy Dunlap , Peter Zijlstra , linux-pci@vger.kernel.org, Sebastian Andrzej Siewior , Oleg Nesterov , Joel Fernandes , Will Deacon , Ingo Molnar , Davidlohr Bueso , Arnd Bergmann , "Paul E . McKenney" , linuxppc-dev@lists.ozlabs.org, Steven Rostedt , Bjorn Helgaas , Kurt Schwemmer , Kalle Valo , Felipe Balbi , Logan Gunthorpe , linux-usb@vger.kernel.org, linux-wireless@vger.kernel.org, LKML , netdev@vger.kernel.org, Linus Torvalds , "David S. Miller" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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