Received: by 10.192.165.156 with SMTP id m28csp382366imm; Wed, 11 Apr 2018 00:11:20 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+BSd2Rjo6zGAKv1OY38aZfXp1WKtfOR5G2fxxCQqQHcXb5LEsHOIEcWk4AHtO4TfOsvGQE X-Received: by 2002:a17:902:ab81:: with SMTP id f1-v6mr3714382plr.5.1523430680584; Wed, 11 Apr 2018 00:11:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523430680; cv=none; d=google.com; s=arc-20160816; b=GK07kuTo94iyqi25qGmpmQxfsdpu2c7wt3rzEWFbEC25oUGnsY0FizxzdX5+JEBksj Y6nqBWq4F+FsIVYJQM8T0DP2GwBJHDInA+BTIpwTi+k55b8OTZJDAqIcmaXU4lSEmVr6 uEG6TBoHCvZdQHvaFleqBg4WJuP8+5mkMNZx5kQXLSH9Vp2Cm+Hz36EBLwdTjSe2jYiZ PaEILQbeDxKeOZPq3JpsLNDtwPcKV9OoQUGUc5Y1XIOuRUEBTc6etv2qQ4bpPTa1a4OQ TeJcef+D8BhmxAM0j2TwK+W/khFT5qRyWTh0ozF75L8dkQ5xaLwxLcE2QwYFhV4EZ/Hu 13yg== 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=Fgj87iltr84asqY7d71DJV1jvgK5e7fXeNxrIUw12vg=; b=YlDXUYSp84lLtUTaJpKSY/TvCkc0n3LsLaSkY+KNHV4wZtZc9MY3jwcT0ZosU9CEG4 e+9f7G2r3itsLCJWEJs1hSGxjSbw5aqTIcI0heibf3f3bkaD4K93piudvFWIPj/8SSiF dEuvgiQVEdsKVQ99oRXUqf+8enj3W9GlbPR9C8zFSCpj2JaYldTlJYUxeLrnKZjZWuUa 1GX2nRibmUmPxNw/64K6bv9LGbRyvQen2B4LRuRBNjOucZDn0NDLU8kjUcjlnZKlSEet oJtS9KpF+Qb2XyAEbJGDa/+93xXgBfZGvGVfbudZLdm3DlBSnijLCap0NOxIX4sG4ghe 7Lag== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=KabgKSVl; 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 e63-v6si544900plb.91.2018.04.11.00.10.44; Wed, 11 Apr 2018 00:11:20 -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=KabgKSVl; 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 S1752690AbeDKHHu (ORCPT + 99 others); Wed, 11 Apr 2018 03:07:50 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:45312 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751858AbeDKHHs (ORCPT ); Wed, 11 Apr 2018 03:07:48 -0400 Received: by mail-lf0-f68.google.com with SMTP id q5-v6so1074612lff.12; Wed, 11 Apr 2018 00:07:47 -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=Fgj87iltr84asqY7d71DJV1jvgK5e7fXeNxrIUw12vg=; b=KabgKSVlhJB7AB8YeohU71ZhRKddNrKw4AliTO8pXIqnYS3EaOZNXOJECOsDvydA78 EQwW2kSFvKwL2nrLTLy0KmiUxk2UgMswldmvMBDK63+jCjW6KfrRHvGtfYt8QEXTiZN7 ROTBnFLbSmYZ4n0fMRishRGPwSXSTz20rOTvJDTGTXJIvsexJ8peoNPdgMYv/yIo7EpD +qU+zelEJLKObKIVGUGQFe7Y9es53P/3FxfHF//RkX2VIEXYluWDCK6nAgoflqcJarI4 m8mcIuNFmXH3sg5yDY7PyU9uZx+edJeM9vPkUf3HHaaVxYhXowUnTOS7dppT1r6XDYVZ /PKw== 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=Fgj87iltr84asqY7d71DJV1jvgK5e7fXeNxrIUw12vg=; b=dt9I8EHYEOUC03sXZHPeH/bZ2eb13c7yNs63tQCfvN6M3j+uNSMpqySkHPlku154TA Pe8Dy6DJFGG4jSDA2JzNDg2gaf5FRKFoE0PjnFCAykD5FZrmsRdqb4CGJiY/ESdSn0XL xrMqS31POr4vKDkGK7hXZx/cCfmonZjk8D5+G74FULkYGWm0207LX3VKueycakAApI+0 UTUEf3fpkMriy7UYNW3OAqlpJq0DdBj9nfPZAauqIRO6PmwX5FA/AzvxotqlHbdZDfu1 CWnNTMPponiIzYWc3tKk64GiAfPnXZEMdw0yqTAtk98VrlEOnntPzmBCCWfkJQNztBHT w6cA== X-Gm-Message-State: ALQs6tBWM609RALJTE1LOr8Jb7K9fo6WBZuc/pZ8JpVxOLhKt4EtJyAm YyzvGJOFoDjipb6ZKnsNUHp2XA0D X-Received: by 10.46.133.69 with SMTP id u5mr2237154ljj.25.1523430466559; Wed, 11 Apr 2018 00:07:46 -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 g17sm97042ljk.18.2018.04.11.00.07.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Apr 2018 00:07:45 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.90_1) (envelope-from ) id 1f69r4-0004cl-Cv; Wed, 11 Apr 2018 09:07:42 +0200 Date: Wed, 11 Apr 2018 09:07:42 +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 1/2] staging: irda: Replace mdelay with usleep_range in stir421x_fw_upload Message-ID: <20180411070742.GE10795@localhost> 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 This all looks good (also note the call to usb_control_msg(), which may sleep, just above the mdelay()). Reviewed-by: Johan Hovold Thanks, Johan