Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1268772imm; Fri, 27 Jul 2018 14:13:42 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdClK28taGKFtpohosRlYDiH1rz2IzpxsRFgGq0/dCnFSmfcs6QY1s74YmCGY177RwzAAtq X-Received: by 2002:a62:6d02:: with SMTP id i2-v6mr8145632pfc.218.1532726021924; Fri, 27 Jul 2018 14:13:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532726021; cv=none; d=google.com; s=arc-20160816; b=TyElLEcahs0koJZ0hd/z/+JuMtCqXkXnBS5JuvrSPsuf/vpfMaSx5UIOp2Wtp6qrDf lF5Ae7W2T9jVPCgq1NF7dekDi/te3j+AG6PAxa1c+8n5j6YdICTJJUTjBIbabrNG+tV0 yNAZlVsaX9ctIADbbiK8zL4H2aSPxtIAop9FgOGBL3CJs0JEoMCELeFKf221SaZBcWdE ecm5f7P9Qqz+ULycqKEsXoSFyFabM0Hrc10WBwJZ7xsvsZSPTRNBeJWgC4FGRixSsCNF tcNRRLZQNhETcOIkwhfXMPD75qAamIXr0bK5ONn0YPjafsQYwIe+fDV1CtruYkkddN+v 2zrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date :arc-authentication-results; bh=qhhEUi6+L/Y1OiLWeaZSF4QGH/yYPG/rQOpUlbuVnbQ=; b=tgtPU9OusmEf/5aNdMk7x7APrSzt4kYksLzVWMfdu49FrqWmQeY5XnkJJt3u2ZBgG+ X8upqkxyRND4Ct3uxQ90i2lVGU7kFDcfe/JIr0cAfT8e+i2m9sQpE/bIm1f+l7JMUSY8 vOAuXgp9UjUcWL+q5n6YE6AGLkm3Ko4YWB2/iZ7gIJEXz1U0Sb68AZoXAK6ZAREgAh8u lKdJzf+1OrV5QgTuoqycAgUepZo4kO4TgJPB6ygiIlMLfMUzKikkId8NrO/nNOxrMaMi mK3rFOV0cPhNqQ6RKUxRSvnH8vlK44EnwCGdidJrB2ePQ0ovqP3GWGMZxOUrTR+NTPI0 vkTg== 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 w10-v6si4981549pfk.162.2018.07.27.14.13.27; Fri, 27 Jul 2018 14:13:41 -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 S2389756AbeG0WgL (ORCPT + 99 others); Fri, 27 Jul 2018 18:36:11 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:39156 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389542AbeG0WgL (ORCPT ); Fri, 27 Jul 2018 18:36:11 -0400 Received: from localhost (unknown [172.56.44.110]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 618AA102B38BC; Fri, 27 Jul 2018 14:12:28 -0700 (PDT) Date: Fri, 27 Jul 2018 14:12:26 -0700 (PDT) Message-Id: <20180727.141226.1999188475085596310.davem@davemloft.net> To: baijiaju1990@gmail.com Cc: cooldavid@cooldavid.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: jme: Replace mdelay() with msleep() and usleep_range() in jme_wait_link() From: David Miller In-Reply-To: <20180727082507.3917-1-baijiaju1990@gmail.com> References: <20180727082507.3917-1-baijiaju1990@gmail.com> X-Mailer: Mew version 6.7 on Emacs 26 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 27 Jul 2018 14:12:31 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jia-Ju Bai Date: Fri, 27 Jul 2018 16:25:07 +0800 > jme_wait_link() is never called in atomic context. > It calls mdelay() to busily wait, which is not necessary. > mdelay() can be replaced with msleep() and usleep_range(). > > This is found by a static analysis tool named DCNS written by myself. > > Signed-off-by: Jia-Ju Bai Applied.