Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp884677pxb; Wed, 27 Oct 2021 14:27:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7f7hSxUjf2UoTKt+3bQMT31zrKANZVRxyiM08SXukEr+S6YT0uTDdR/1QPeLpAd5sPKda X-Received: by 2002:a17:90b:1c92:: with SMTP id oo18mr8448502pjb.56.1635370020741; Wed, 27 Oct 2021 14:27:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635370020; cv=none; d=google.com; s=arc-20160816; b=rzJSZd0MuWWZMMbXZIfBonjyVbH5Kuhs3eU8zvHSCsAMvq2IAwxzh065FHtzy0M3HS HJXiqj4GDSONDDhD7PSIJZ0l1lo1TOX4yJJj4dsJH0krn9XWD0+r724WYqkrOL7G4Wq7 Q20FCEmHkkrGsiv0RQGOUKYuu0yxG9kYyZvj0vl39hbXY+jxeA9kDoFXeVvHuHohYQzM ppp/DP6xotHHT2j3Qbtj1zZfJENeChQXhv7eAnj28Nmm0V3DIHoBBxGYVvi+13H8zGdH QWMne0DuT11FTLPmvi4p0p17hefesKCFHHflJONyyKzcr0Pk6sGmbcKTKCH8TYUm8Lpq 8cmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=v9PK3zZc2aEUwtmXeoDx3SD3su6b3gtdli5tzVB30l0=; b=RxeJko75lwDde50HCspyQOJAmC1fm4guzOSaScGhCisK9dUivzjoKJ3z7vvW2g976r dXEh65Ut2Tw7G3hkA7/yxdkiZtmmAiLcxMRnw7h/1yG4nqJU3aXFwb73V6I+WCXpd1MC JXQajycUl+yN7rJYwi4U7HGTNqZFNluuUiNpMa2KVtYdA+K31x30K1pXiVTEqY/O0+Bz qCBYwBIzf3/6k36N8QE7zwtMc+mSnl2Ac8wcpy0Zpu+rK/GNFEmkI1dUealFhnkHWxie wpZt4CFjsrJaxaxpTEZ8lB5iDTTcgnwZydjuI9LRYAPoKUz281NGYwjCjJOYsK8OerPz rKlA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r12si1605026pgv.21.2021.10.27.14.26.49; Wed, 27 Oct 2021 14:27:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238344AbhJ0O0z (ORCPT + 97 others); Wed, 27 Oct 2021 10:26:55 -0400 Received: from netrider.rowland.org ([192.131.102.5]:41575 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S238277AbhJ0O0u (ORCPT ); Wed, 27 Oct 2021 10:26:50 -0400 Received: (qmail 1320616 invoked by uid 1000); 27 Oct 2021 10:24:22 -0400 Date: Wed, 27 Oct 2021 10:24:22 -0400 From: Alan Stern To: Wesley Cheng Cc: balbi@kernel.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, jackp@codeaurora.org Subject: Re: [PATCH v2 1/2] usb: gadget: udc: core: Revise comments for usb_ep_disable() Message-ID: <20211027142422.GA1319606@rowland.harvard.edu> References: <1635303025-772-1-git-send-email-quic_wcheng@quicinc.com> <1635303025-772-2-git-send-email-quic_wcheng@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1635303025-772-2-git-send-email-quic_wcheng@quicinc.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 26, 2021 at 07:50:24PM -0700, Wesley Cheng wrote: > The usb_ep_disable() routine is being widely used directly in the > disconnect callback path by function drivers. Hence, the statement > about it being able to only run in process context may not be true. > > Signed-off-by: Wesley Cheng > --- > drivers/usb/gadget/udc/core.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c > index d626511..e1f90d8 100644 > --- a/drivers/usb/gadget/udc/core.c > +++ b/drivers/usb/gadget/udc/core.c > @@ -136,8 +136,6 @@ EXPORT_SYMBOL_GPL(usb_ep_enable); > * gadget drivers must call usb_ep_enable() again before queueing > * requests to the endpoint. > * > - * This routine must be called in process context. > - * > * returns zero, or a negative error code. > */ > int usb_ep_disable(struct usb_ep *ep) You should also change the kerneldoc for usb_ep_enable. Neither routine needs to be called in process context. In fact, it might be good to change both comments to: * This routine may be called in an atomic (interrupt) context. just to be totally explicit. Alan Stern