Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3566845pxu; Mon, 19 Oct 2020 15:43:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKNnlxMskcXEwBKzNiQEqXbgnIXfaHlkrVqSFot9WwOkfgd8Dhw+wWxd0xE2XSXoeHCOzL X-Received: by 2002:a50:9b1d:: with SMTP id o29mr2221855edi.56.1603147384790; Mon, 19 Oct 2020 15:43:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603147384; cv=none; d=google.com; s=arc-20160816; b=eiU6kcHVqmF4LNGJ3rQe8N69XMxsC031LwYK1Zagkbgm1qXZFH91a/1jBDj7Ai5Pr2 gDJYMgKVYGu2JAnLjQUjxvlC0HOLVrBgL48GrsD7OipcFB40gTkOMBepQV0iWSTV7aXc auG4vxVoxGwqUUyWhE2yS29RRCj4V9ZOUekdsQ1+ChFl/DaHGjE4NLRQWNx5Ob5/hARV Wb+SdwHcTuOmKfJ/57g9BYuBSjklZ0yzge0shuGCV7iVFCRRruSXq7xKRJcXsbvlTaHE JGL8yO/qKyB4eCDenNiXEqJrhGQ8FffHXr6Pe22QFYauNG5iflNMq5+QoeCAKqbeYPLJ L3oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=hQFTTu50MW256q34nzBj+AMw4S/Lpz6tyMezzi91IN4=; b=Z7M24xP02JIXGFChDyxo5WO18mYlDkmijqnfx6e2WWz6km/8SjyBLMsuAiBSGHk0fU 4mMlMa4GdJGQP9cxoeajpt2KjmuxjqDZ/LbqUQdVgd0MpSdrFhBeahjYTrq90EnyonDY sxp+zjRqAARZz6CSPaaq7gzlBRj00FZaNNEs67GlO/WG86ujHaKVoPTE0yWXBOILQgQX d8teFb4mS/IXrVzErQDNdVRmYFP8J8XU1f26fPteC0hlgqFGO98yfylO6LE/NMtNUVCX HRjNNrAIfeDbibeKOPEF+xRafgqsnyxGMjw9B4s6oAmoxIuM/M+QX3Lyqiy3cK8eSKWc NdIw== 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 p27si910989ejf.691.2020.10.19.15.42.32; Mon, 19 Oct 2020 15:43:04 -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 S1727033AbgJSK3z (ORCPT + 99 others); Mon, 19 Oct 2020 06:29:55 -0400 Received: from smtp1-g21.free.fr ([212.27.42.1]:26149 "EHLO smtp1-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726791AbgJSK3z (ORCPT ); Mon, 19 Oct 2020 06:29:55 -0400 Received: from [IPv6:2a01:e0a:255:1000:418c:f3f1:2ca7:834] (unknown [IPv6:2a01:e0a:255:1000:418c:f3f1:2ca7:834]) (Authenticated sender: duncan.sands@free.fr) by smtp1-g21.free.fr (Postfix) with ESMTPSA id C5434B0052C; Mon, 19 Oct 2020 12:28:33 +0200 (CEST) Subject: Re: [patch V2 13/13] usb: atm: Replace in_interrupt() usage in comment To: Thomas Gleixner , LKML Cc: Peter Zijlstra , "Ahmed S. Darwish" , Sebastian Andrzej Siewior , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Thomas Winischhofer , Johan Hovold , Mathias Nyman , Valentina Manea , Shuah Khan , Alan Stern , linux-omap@vger.kernel.org, Kukjin Kim , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Felipe Balbi References: <20201019100629.419020859@linutronix.de> <20201019101110.944939915@linutronix.de> From: Duncan Sands Message-ID: <0fe3d019-3c5d-fd11-dcc7-6c4ff8b04403@free.fr> Date: Mon, 19 Oct 2020 12:28:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: <20201019101110.944939915@linutronix.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/19/20 12:06 PM, Thomas Gleixner wrote: > in_interrupt() is a pretty vague context description as it means: hard > interrupt, soft interrupt or bottom half disabled regions. > > Replace the vague comment with a proper reasoning why spin_lock_irqsave() > needs to be used. > > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Sebastian Andrzej Siewior > Signed-off-by: Thomas Gleixner > Cc: Duncan Sands > Cc: Greg Kroah-Hartman > Cc: linux-usb@vger.kernel.org > > --- > drivers/usb/atm/usbatm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- a/drivers/usb/atm/usbatm.c > +++ b/drivers/usb/atm/usbatm.c > @@ -249,7 +249,7 @@ static void usbatm_complete(struct urb * > /* vdbg("%s: urb 0x%p, status %d, actual_length %d", > __func__, urb, status, urb->actual_length); */ > > - /* usually in_interrupt(), but not always */ > + /* Can be invoked from task context, protect against interrupts */ > spin_lock_irqsave(&channel->lock, flags); > > /* must add to the back when receiving; doesn't matter when sending */ > Signed-off-by: Duncan Sands