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=-8.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 0C3D4C43457 for ; Mon, 19 Oct 2020 16:28:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B595321D81 for ; Mon, 19 Oct 2020 16:28:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730153AbgJSQ2i (ORCPT ); Mon, 19 Oct 2020 12:28:38 -0400 Received: from netrider.rowland.org ([192.131.102.5]:49725 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1730591AbgJSQ2h (ORCPT ); Mon, 19 Oct 2020 12:28:37 -0400 Received: (qmail 902187 invoked by uid 1000); 19 Oct 2020 12:28:35 -0400 Date: Mon, 19 Oct 2020 12:28:35 -0400 From: Alan Stern To: Thomas Gleixner Cc: LKML , Peter Zijlstra , "Ahmed S. Darwish" , Sebastian Andrzej Siewior , Felipe Balbi , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Thomas Winischhofer , Johan Hovold , Mathias Nyman , Valentina Manea , Shuah Khan , linux-omap@vger.kernel.org, Kukjin Kim , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Duncan Sands Subject: Re: [patch V2 11/13] usb: gadget: udc: Remove in_interrupt()/in_irq() from comments Message-ID: <20201019162835.GC898631@rowland.harvard.edu> References: <20201019100629.419020859@linutronix.de> <20201019101110.744172050@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201019101110.744172050@linutronix.de> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org On Mon, Oct 19, 2020 at 12:06:40PM +0200, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > The usage of in_irq()/in_interrupt() in drivers is phased out for various > reasons. > > The context description for usb_gadget_giveback_request() is misleading as > in_interupt() means: hard interrupt or soft interrupt or bottom half > disabled regions. But it's also invoked from task context when endpoints > are torn down. Remove it as it's more confusing than helpful. > > Replace also the in_irq() comment with plain text. > > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Sebastian Andrzej Siewior > Signed-off-by: Thomas Gleixner > Cc: Felipe Balbi > Cc: Greg Kroah-Hartman > Cc: linux-usb@vger.kernel.org > > --- > drivers/usb/gadget/udc/core.c | 2 -- > drivers/usb/gadget/udc/dummy_hcd.c | 6 ++++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > --- a/drivers/usb/gadget/udc/core.c > +++ b/drivers/usb/gadget/udc/core.c > @@ -894,8 +894,6 @@ EXPORT_SYMBOL_GPL(usb_gadget_unmap_reque > * @ep: the endpoint to be used with with the request > * @req: the request being given back > * > - * Context: in_interrupt() > - * > * This is called by device controller drivers in order to return the > * completed request back to the gadget layer. > */ > --- a/drivers/usb/gadget/udc/dummy_hcd.c > +++ b/drivers/usb/gadget/udc/dummy_hcd.c > @@ -1754,8 +1754,10 @@ static int handle_control_request(struct > return ret_val; > } > > -/* drive both sides of the transfers; looks like irq handlers to > - * both drivers except the callbacks aren't in_irq(). > +/* > + * Drive both sides of the transfers; looks like irq handlers to both > + * drivers except that the callbacks are invoked from soft interrupt > + * context. > */ > static void dummy_timer(struct timer_list *t) > { For dummy-hcd.c: Acked-by: Alan Stern