Received: by 10.192.165.156 with SMTP id m28csp383940imm; Wed, 11 Apr 2018 00:13:17 -0700 (PDT) X-Google-Smtp-Source: AIpwx49J5o+Jpzyn56/x4DdkFwkt+LfQOA4Y/m8JzgIKvxUCDjhumfqBg7tPUg/g6A66WqeJIkKo X-Received: by 2002:a17:902:9a8c:: with SMTP id w12-v6mr126185plp.333.1523430797652; Wed, 11 Apr 2018 00:13:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523430797; cv=none; d=google.com; s=arc-20160816; b=Ef5vI6wvDOBIzCWvYtg3j1awz/b/F+E3qC3qZJ05KXDOgx3WNRNIFrRo8o7fXkrl0T v83Ght/JrA8Xuqcqa9SsbqsmJhxFRLsrYtvELwsWv0trzILlkf+dswHadCu7fSEYst+M Us5//jziDMNxjHHfSodvmqELMC+CZJZVll4f7smO1kmvVRtPC1iAmQhwjbX7SrpFzjsn wyeUroCjHb73voZPij7KDVBNV31MSGsEHR6NXLzH6qKq/6ilnhFnfznDohz5v1U8R7AL vLxBdNU4PH8fzoBYGiVRhyXuQMtb8vYE8HMyTYdxWPRJGj7POPL+7n698fUKuAoK29ZS LEtw== 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:dkim-signature:arc-authentication-results; bh=UH9N5Z8ldFOv8QzfCkkMM6P77iux/AEw6RAzs5K3+J4=; b=cg+0adoNuJvnHzbKvzjFGJ0rLVMHdNX8h/BgvWxZC1fHsj8yk2mYO/2FbGBUb9Ib1V ezTHDcMpIr4rMexiin2KdcYiGE6VXCZE+Nn9uiOISFNtye7LL6RmVWF+PmpFY2ZamvRj lSdWY4gM+rgSMrvhc5B1CmqKdVE7r+i1dVySMJA1eWrkUFxTeN8pUbodljs59YsL5+6R mdiu0Y94M384QGivzWMaIafjdyP0SwKHOKLh3AUfZ6KdD86/ylzn0Ne0mtW2LRtk1VjC XhspJPI67bRdkWda+VhZDdBSpC6YRgk6rpqWFKVLtenh+svlkY9R4NlSE9pjLXi4IXSE X3PA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=YpvwX64X; 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 9-v6si556548plb.140.2018.04.11.00.12.41; Wed, 11 Apr 2018 00:13:17 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=YpvwX64X; 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 S1752807AbeDKHI3 (ORCPT + 99 others); Wed, 11 Apr 2018 03:08:29 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:40655 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752706AbeDKHI0 (ORCPT ); Wed, 11 Apr 2018 03:08:26 -0400 Received: by mail-lf0-f66.google.com with SMTP id e5-v6so1095384lfb.7; Wed, 11 Apr 2018 00:08:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=UH9N5Z8ldFOv8QzfCkkMM6P77iux/AEw6RAzs5K3+J4=; b=YpvwX64X+verkZp33Ed6U5YtNKsy4Jrs0NCPyAQSHuwyOoDMlNoATMj5iTSofIOxnp 89otwf79zDOT8rME0msmJm3w9IK/hC/upIm+KGmvrIi9I/rxbyx6rPnXXJ1pX+DKYBoW pqUCJWPVMjxpVfGuey6x6q444Mu0N62s2Nj1WXLLsU8YEhUiHB8iYhPxMz+JURL0VtLP Qg6Rw8m3oNirwJtvyCa0JnqyZvBl9C27jcqq5DBGySACmxws4+CkdZpHBAy74MnXyyxm zxMWiCII0xoyrgC5onJMv0kzw7AUDZt2g923VFsLS0ZSq24huU5mVDDDupE/FuyA8sTv W2bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=UH9N5Z8ldFOv8QzfCkkMM6P77iux/AEw6RAzs5K3+J4=; b=j6IwdyqQmfv9Pb1gdwDUcVY4K6BgHCjPew2m1o2bJMN0T/Qm5ZvxLwcTcJm7AMe7Uy qw6nGqQ1cERTtUmMIJBeVLUNLVWGRf6JuWFVVRPRR9uHM9TxaWrg4kA0LBWDyuueAnqg AHjpiLi58A8avyJXmLn0EtyD3H3HFNzeEFD1DA2awow+teL8dCwu877aYlhc8BqmNLU2 /yW+q/gnrIljpk2xmGgovGRHQ7mQY7yddI8k5BOkXc/gDOi3TY+oFPqSn+6TPyFWMSAI hDVZTd9wR1YznDXx9N1e9HHJ8o9IkDwxR3HGo01qEqjqQZfO67a1krES8SkpKrtSWfrU C9zw== X-Gm-Message-State: ALQs6tDH+pTq8dufcOe6HaAH7aUjlW2NZxGV7xfgePQZ0yyM7n7Lisju imtESrX4P6NEgIXV4vQtgJI= X-Received: by 2002:a19:7dc4:: with SMTP id y187-v6mr1986429lfc.2.1523430504989; Wed, 11 Apr 2018 00:08:24 -0700 (PDT) Received: from xi.terra (c-8bb2e655.07-184-6d6c6d4.cust.bredbandsbolaget.se. [85.230.178.139]) by smtp.gmail.com with ESMTPSA id u13-v6sm117002lff.72.2018.04.11.00.08.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Apr 2018 00:08:24 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.90_1) (envelope-from ) id 1f69rg-0004d2-Nk; Wed, 11 Apr 2018 09:08:20 +0200 Date: Wed, 11 Apr 2018 09:08:20 +0200 From: Johan Hovold To: Jia-Ju Bai Cc: samuel@sortiz.org, gregkh@linuxfoundation.org, davem@davemloft.net, johan@kernel.org, arvind.yadav.cs@gmail.com, netdev@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] staging: irda: Replace mdelay with usleep_range in irda_usb_probe Message-ID: <20180411070820.GF10795@localhost> References: <1523410435-1693-1-git-send-email-baijiaju1990@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1523410435-1693-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:33:55AM +0800, Jia-Ju Bai wrote: > irda_usb_probe() is never called in atomic context. > > irda_usb_probe() is only set as ".probe" in struct usb_driver. > > Despite never getting called from atomic context, irda_usb_probe() > 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 Reviewed-by: Johan Hovold