Received: by 10.192.165.156 with SMTP id m28csp435695imm; Wed, 11 Apr 2018 01:20:52 -0700 (PDT) X-Google-Smtp-Source: AIpwx48lXRmckbH6jXYVxAabIah5HlrcgaUOnz9KTvlkePRtsfjwNu+e5nkZ9sOXY4k09S4A24Yf X-Received: by 2002:a17:902:5066:: with SMTP id f35-v6mr4053794plh.14.1523434852786; Wed, 11 Apr 2018 01:20:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523434852; cv=none; d=google.com; s=arc-20160816; b=P66y8BEvDtAkGFvOB5QN36GFKoB9PbLhl3ASky0OhwphxgUgbOD39gdovsVJnxw+Vy WZFY2nj1/FAiAagg4iM2J1Ujle2om5p0SCMXkCUCoJixjpNihHUDF8fsB3sVdEQUxjyd 8PB4Qgs2vXNwrjPCvQNfAPIJkPktXxsEBiJll/9XuOFWKAkmI7sAabFgonnZjGh2Jo8u N4TQ7QpmBb6ea+rwlYmD4SgY1Dgc5cUduP02Z+x3OoTKh0guWf4GuRdom8N8tVjPsi6m 7lwfhFEKSKgPJqUy+0zLA/zuuFJCRlLJJk2tCzC8XHvAlp38cGLQiHiaLtea8qDNZikm 3zBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=ITMaOZwtiCmikV4QruXiJJlNXH5j5IUC/Sx52j8lnl8=; b=ggY+ckfh5eJu61q+H07kswVecegQpvB1cGycytj47EAZd8zzSdZW4D1VT0NSh5s4wN 54DTP27HWCFGxTIiT7ZPzMKNsuENMT5CJzDo2PZ7SSPU5ReF/9KIiaDzSIl60vTMAPEK r8zEnQ1z5h5dXFXCjorHAOE3HHD8oDuzwxUjq/TvJWqUZwNzeDClLYWdwr9xSIFEH4c3 uU+yJYv47jJSc1/eSIYjscNhYPs+onN6oZ96XRvq3QU2lzL7bWq4/xcTqdsfFz/nT5TK OhEg6UrViPPYa4bsWPsz59vn/JoQ8QL1n2rjClEdZZjJgwnUGDCfqKw0eD6Dl684HMc1 r6Og== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z33-v6si598367plb.694.2018.04.11.01.20.15; Wed, 11 Apr 2018 01:20:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752270AbeDKIRj (ORCPT + 99 others); Wed, 11 Apr 2018 04:17:39 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:49026 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751661AbeDKIRg (ORCPT ); Wed, 11 Apr 2018 04:17:36 -0400 Received: from localhost (unknown [37.173.10.135]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 39E6BCD4; Wed, 11 Apr 2018 08:17:34 +0000 (UTC) Date: Wed, 11 Apr 2018 10:17:24 +0200 From: Greg KH To: Jia-Ju Bai Cc: devel@driverdev.osuosl.org, samuel@sortiz.org, netdev@vger.kernel.org, johan@kernel.org, linux-kernel@vger.kernel.org, arvind.yadav.cs@gmail.com, davem@davemloft.net Subject: Re: [PATCH 1/2] staging: irda: Replace mdelay with usleep_range in stir421x_fw_upload Message-ID: <20180411081724.GA4155@kroah.com> References: <1523410174-1553-1-git-send-email-baijiaju1990@gmail.com> <20180411064135.GA28354@kroah.com> <20180411080311.GB2137@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 11, 2018 at 04:11:00PM +0800, Jia-Ju Bai wrote: > > > On 2018/4/11 16:03, Greg KH wrote: > > On Wed, Apr 11, 2018 at 03:17:10PM +0800, Jia-Ju Bai wrote: > > > > > > On 2018/4/11 14:41, Greg KH wrote: > > > > On Wed, Apr 11, 2018 at 09:29:34AM +0800, Jia-Ju Bai wrote: > > > > > stir421x_fw_upload() is never called in atomic context. > > > > > > > > > > The call chain ending up at stir421x_fw_upload() is: > > > > > [1] stir421x_fw_upload() <- stir421x_patch_device() <- irda_usb_probe() > > > > > > > > > > irda_usb_probe() is set as ".probe" in struct usb_driver. > > > > > This function is not called in atomic context. > > > > > > > > > > Despite never getting called from atomic context, stir421x_fw_upload() > > > > > calls mdelay() to busily wait. > > > > > This is not necessary and can be replaced with usleep_range() to > > > > > avoid busy waiting. > > > > > > > > > > This is found by a static analysis tool named DCNS written by myself. > > > > > And I also manually check it. > > > > > > > > > > Signed-off-by: Jia-Ju Bai > > > > > --- > > > > > drivers/staging/irda/drivers/irda-usb.c | 2 +- > > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > Please, at the very least, work off of Linus's tree. There is no > > > > drivers/staging/irda/ anymore :) > > > > > > > Okay, sorry. > > > Could you please recommend me a right tree or its git address? > > Have you looked in the MAINTAINERS file? Worst case, always use > > linux-next. > > > > greg k-h > > Oh, sorry, I did notice the git tree in the MAINTAINERS file. > I always used linux-stable. linux-stable is almost never the tree to use as it is almost always 12000 patches behind what is in Linus's tree and about 20000 changes behind linux-next. thanks, greg k-h