Received: by 10.192.165.156 with SMTP id m28csp388350imm; Wed, 11 Apr 2018 00:19:01 -0700 (PDT) X-Google-Smtp-Source: AIpwx48QgRXuPgJ/x3tg4r/6mo6GU9Yx5RAzCWww6UT0jvYx8pioNZVu5ph8yR2a8s/4CWYBELQN X-Received: by 10.98.32.199 with SMTP id m68mr3041342pfj.218.1523431141738; Wed, 11 Apr 2018 00:19:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523431141; cv=none; d=google.com; s=arc-20160816; b=YN92+hkJB0GSuWfBnI7lQKhE1Mj9z/oBLRcl1MSG47B0KtIdVQLugw86S9bRnwgsnK HADU92Sb+o4wLpt1OT9lNaPw12nBAILM6aVKfKHODoj5WpZ+26nyGMM68b2X36L1WxLu 1sMCkwi87kPIXOzrtdXPec4cJeSfnNeNtTwJkoJTYvWJCpfifnSvpfh4xvs97IffLhOI JLG32tfo/lsSPKBn21A1NLFg4GvX4/zHgLJoHOUtLqdkc9+LO1Zp7SpGnGEJucO29qGd ReCU//UKrzbDyJ0dU5J3q35UBXjEFqveNZdOLxZ4el155JBLXiyy3q/E7s57BmnIc9bD mtTg== 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=bvJgZDPnsx1vyUHola56c6M7MwVv8z7GuZRFodHXe3g=; b=cWmCx8Qc9FWEnzecalJ/bE8xFkl8WJJ8thmEHK4Zn9HtRb8pCVyN4oBAm8Yk/zN00w 268UqoksK+gmDdS9/xwp1h+8Q44rO2L4HX4QKjuYPxposAnXU/fSQAlnIvg13xJeoR0W 8LCCYRFf2s5dRopOv16ASyhwkQBlzdvAKjWci2BGJ1tfTXx4rx2uZinbU1Ewuc4jFHAa tKBCLoPUtJm592rjd1kmDOEXjz4qSAHNWUvxZxbHgG1HCA4DHgqyQk+JP1zEBCk9iTro hSddvt7XXHdeRLkQKlPBe9lXJw3jY71Zyyf9NgeymTCCXY/xEZVaJSI6O1miPMKGsM3e LwDg== 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 b186si336981pgc.569.2018.04.11.00.18.24; Wed, 11 Apr 2018 00:19:01 -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 S1752654AbeDKHPI (ORCPT + 99 others); Wed, 11 Apr 2018 03:15:08 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57832 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752484AbeDKHPF (ORCPT ); Wed, 11 Apr 2018 03:15:05 -0400 Received: from localhost (unknown [37.173.10.135]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id C3392CFC; Wed, 11 Apr 2018 07:15:03 +0000 (UTC) Date: Wed, 11 Apr 2018 08:41:35 +0200 From: Greg KH To: Jia-Ju Bai Cc: samuel@sortiz.org, davem@davemloft.net, johan@kernel.org, arvind.yadav.cs@gmail.com, devel@driverdev.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] staging: irda: Replace mdelay with usleep_range in stir421x_fw_upload Message-ID: <20180411064135.GA28354@kroah.com> References: <1523410174-1553-1-git-send-email-baijiaju1990@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1523410174-1553-1-git-send-email-baijiaju1990@gmail.com> 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 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 :) thanks, greg k-h