Received: by 10.213.65.68 with SMTP id h4csp500540imn; Fri, 23 Mar 2018 09:06:10 -0700 (PDT) X-Google-Smtp-Source: AG47ELsyrKMZD+fumfHCPhDN/dXnoN0IINW8eJ+WFWalYNplMHI3mwp5mn7S00YOi8Bp6k/VyiTL X-Received: by 10.98.60.207 with SMTP id b76mr18621422pfk.118.1521821170869; Fri, 23 Mar 2018 09:06:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521821170; cv=none; d=google.com; s=arc-20160816; b=q7bafckES53TPMqrYRzgZvd120SZxXWmvDI7LIfI/YD+0qlQH8OsWYZKrcFHhDhDC2 r7C7Nhzy2i5Tn9sSiZu/YmFyzL0CYzIGXGfgbnS7ImlMBAPy4kamtVpl4N29P7xik/g6 XNa47fDD1j/y1hHurVJv5xTBPCfzRC2RaPVApZPv+I8HpepTeDxmdeuGSHS6t5QLHo/5 xxEXhCB0ZjKOu+7Hi0fOvlOYQdIDupu9O59i9lnAeZ9PzKlIN/ZLr69jLKCj+SU6o85F zyPLpMmgl1XaBjwAGyfRsUvzlbGINk2gWZ9SyZbOOsV7/04NvkMfIMqxoJwOA/AYdtYg bHAw== 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=IbfR3287t8UmuYvErRw1lmNXK3q4Bi02GyAxUGflIZ0=; b=AQ7srE0bCI01yD2vhJ0Ol6NjUqm5aXl1it0joDm9rTjptIQkdgI6GHZrngGCq7hBNA kVmseKgLnUww3NfmFGHYBIQ37mtQoIGYhT+wB14PvwTrjwGUK3zlEycxhXvBY01CNG0r WDBlpusP1z9pMX1E20nJcVXxQf3l5M+p1fUCGXfkeALMCdbeBudA/6nfIvJYEAmNkVKv dcR9w7PNfG8EdgGkX8RwhBMe2Z9o7jLebqCYJ3MpSuD9fs4IuwSeEdxnjnT6JJBJe3EN 1ElMixby+eZZpADugSkLz4KKZFoAMHUovn/hFlX4YWp8Z+E8trFSFf1K+4Nc4F41QYRa Kr5g== 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 d81si6914048pfj.222.2018.03.23.09.05.56; Fri, 23 Mar 2018 09:06:10 -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 S1752282AbeCWQEX (ORCPT + 99 others); Fri, 23 Mar 2018 12:04:23 -0400 Received: from orcrist.hmeau.com ([104.223.48.154]:36260 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751798AbeCWQEW (ORCPT ); Fri, 23 Mar 2018 12:04:22 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtp (Exim 4.84_2 #2 (Debian)) id 1ezPAs-0002kK-5r; Sat, 24 Mar 2018 00:04:14 +0800 Received: from herbert by gondobar with local (Exim 4.84_2) (envelope-from ) id 1ezPAp-0000eL-Vg; Sat, 24 Mar 2018 00:04:12 +0800 Date: Sat, 24 Mar 2018 00:04:11 +0800 From: Herbert Xu To: Jia-Ju Bai Cc: george.cherian@cavium.com, davem@davemloft.net, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] crypto: cavium: cpt: Replace mdelay with msleep in cpt_device_init Message-ID: <20180323160411.GG2186@gondor.apana.org.au> References: <1521384638-23251-1-git-send-email-baijiaju1990@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1521384638-23251-1-git-send-email-baijiaju1990@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 18, 2018 at 10:50:38PM +0800, Jia-Ju Bai wrote: > cpt_device_init() is never called in atomic context. > > The call chain ending up at cpt_device_init() is: > [1] cpt_device_init() <- cpt_probe() > cpt_probe() is only set as ".probe" in pci_driver structure > "cpt_pci_driver". > > Despite never getting called from atomic context, cpt_device_init() calls > mdelay(100), i.e. busy wait for 100ms. > That is not necessary and can be replaced with msleep to > avoid busy waiting. > > This is found by a static analysis tool named DCNS written by myself. > > Signed-off-by: Jia-Ju Bai Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt