Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp569561imm; Fri, 27 Jul 2018 02:06:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf4KOByk3hri+MX3YCY9JNhm5fBYofcii+bhauX14zJ9mvplEI1UkWMeM4cPqcpDi7EjR4e X-Received: by 2002:a17:902:904c:: with SMTP id w12-v6mr5267814plz.95.1532682375482; Fri, 27 Jul 2018 02:06:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532682375; cv=none; d=google.com; s=arc-20160816; b=aceWwHJmOrxiSV2lTcT73p9Gaq0AB2bvPlTK2pJgXU7/MDn7baQrXlVFBKIf66D7KI nTNMRX5qx4a+kECbU3JOhdnkPJUgBqTkDd50VB8E2w0q3Uc5YX7jJpRMTPe18y0sFG+u PIjh6flJGrVMUfA7DEefIziw/y6PeqcCOYRGv9QtaPrrMWRAWbNu+SshgKLLhma29y9q 9lY+Gtg2/iniJzrTiy4Nb6dS+La2AKyLIGFYrSjKDOEKrv/6SNbe3AQsONHVtsV5GdUI mtUDeC70lwVb/YWyw6NvjWIEbYMtOOpzk8lTJVb5wJ8fpdHiuLwvQuSxzLtYAPlfVksN BHqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:mime-version:references :subject:cc:to:from:date:dkim-signature:arc-authentication-results; bh=wxqsaP9ewlb3wO3oumcYcKfSD5ctkYiick7zX0KcLSg=; b=E9SN61cEWAw2Asq0tbvOgL+0sycgZLYz1A0IMBFhWUQ8tMTM4x+7pK+8KI04IK5fSn ngnt1TkiPuPFDcwuLOd76duke30Cp67InPXTcWAlr33gJN96C0iOxHReY+Ccb8+aF600 ay9d8CnLMZ7GVoPXTFQQ/UqNRHy51knVZ2NU0LwOBTZF9jpDFWqXB0ZzNUzByu5DQWBW 1xzz2mx/Sv+gUZu7gKHPoCI6Zs3tqDInRByFWvgkxdR39/c2dtmeyO+igqsf8UA8i+da IJfln3n+DBVRhOurzwffrTDB7j6S9StUUFmtsw0GrNPchNnGcWyLELQNCP/rSMA+V/3G rBNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b="Pc/pVc7O"; 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 d3-v6si3352393pgl.583.2018.07.27.02.06.00; Fri, 27 Jul 2018 02:06:15 -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=pass header.i=@163.com header.s=s110527 header.b="Pc/pVc7O"; 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 S1730462AbeG0K0G (ORCPT + 99 others); Fri, 27 Jul 2018 06:26:06 -0400 Received: from m12-18.163.com ([220.181.12.18]:46941 "EHLO m12-18.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729498AbeG0K0G (ORCPT ); Fri, 27 Jul 2018 06:26:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Date:From:Subject:Mime-Version:Message-ID; bh=wxqsa P9ewlb3wO3oumcYcKfSD5ctkYiick7zX0KcLSg=; b=Pc/pVc7Oz2fDN0AK2+dop IJPsrJhOTMgSRKDpZr1PZc2hooocIwLdjZDt4vG6YECyytf7EydUFCR8gU9VzZSC Xr7g+t0k5kp7CIo6jiRWy6dB/cnkIN5VwMmbeDDUItlQLiHucUtRk42JGIOBdN9l Zvdcrgk8+nKIIVcaw20/rg= Received: from ljl-PC (unknown [119.139.198.65]) by smtp14 (Coremail) with SMTP id EsCowAAX+hc04FpbSKwVMw--.47260S2; Fri, 27 Jul 2018 17:04:53 +0800 (CST) Date: Fri, 27 Jul 2018 17:04:48 +0800 From: "liujunliang_ljl@163.com" To: "Jia-Ju Bai" Cc: linux-usb , netdev , linux-kernel , "Jia-Ju Bai" Subject: Re: [PATCH] net: usb: sr9700: Replace mdelay() with msleep() in sr9700_bind() References: <20180727084104.29726-1-baijiaju1990@gmail.com> X-Priority: 3 X-GUID: 8AD355D8-352E-4095-A448-F678B3E4E8F5 X-Has-Attach: no X-Mailer: Foxmail 7, 2, 6, 42[cn] Mime-Version: 1.0 Message-ID: <201807271704468308230@163.com> Content-Type: multipart/alternative; boundary="----=_001_NextPart884175411161_=----" X-CM-TRANSID: EsCowAAX+hc04FpbSKwVMw--.47260S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7Wr1xAF43Ww4fKF4rWFykZrb_yoWkAFc_WF 1Ivr1DJrn8Ar9I9r4jkr4SvrWaka18XFyxZFWSg34av347JF1fXrs5ZF93XFn0g3yxAr9r Crn0qFn5C3s2qjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU1zpBPUUUUU== X-Originating-IP: [119.139.198.65] X-CM-SenderInfo: xolxy3pqolt0hjboyzi6rwjhhfrp/1tbiwBWQX1Xlfj4gCQAAsD Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a multi-part message in MIME format. ------=_001_NextPart884175411161_=---- Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: base64 RGVhciBKaWEtSnUgQmFpIDoNCg0KICAgICAgICAgICAgT0suDQoNCiAgICAgICAgICAgIHRoZSBw YXRjaCBpcyBvay4NCg0KDQoNCmxpdWp1bmxpYW5nX2xqbEAxNjMuY29tDQogDQpGcm9tOiBKaWEt SnUgQmFpDQ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WNlICppbnRmKQ0KLyogcG93ZXIgdXAgYW5kIHJlc2V0IHBoeSAqLw0Kc3Jfd3JpdGVf cmVnKGRldiwgU1JfUFJSLCBQUlJfUEhZX1JTVCk7DQovKiBhdCBsZWFzdCAxMG1zLCBoZXJlIDIw bXMgZm9yIHNhZmUgKi8NCi0gbWRlbGF5KDIwKTsNCisgbXNsZWVwKDIwKTsNCnNyX3dyaXRlX3Jl ZyhkZXYsIFNSX1BSUiwgMCk7DQovKiBhdCBsZWFzdCAxbXMsIGhlcmUgMm1zIGZvciByZWFkaW5n IHJpZ2h0IHJlZ2lzdGVyICovDQp1ZGVsYXkoMiAqIDEwMDApOw0KLS0gDQoyLjE3LjANCg== ------=_001_NextPart884175411161_=---- Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable =0A
Dear Jia-Ju Bai :

  &n= bsp;     &= nbsp;   OK.

&nbs= p;           the patch is ok.
=0A


=0A
liujunliang_ljl@163.com
=0A
=  
From: Jia-Ju Bai
Date: 201= 8-07-27 16:41
Subject: [PATCH] net: usb: sr9700: Replace mdelay()= with msleep() in sr9700_bind()
sr9700_bind() i= s never called in atomic context.
=0A
It calls mdelay() to busily= wait, which is not necessary.
=0A
mdelay() can be replaced with = msleep().
=0A
 
=0A
This is found by a static analy= sis tool named DCNS written by myself.
=0A
 
=0A
Si= gned-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
=0A
---=0A
drivers/net/usb/sr9700.c | 2 +-
=0A
1 file changed, = 1 insertion(+), 1 deletion(-)
=0A
 
=0A
diff --git = a/drivers/net/usb/sr9700.c b/drivers/net/usb/sr9700.c
=0A
index 2= d316c1b851b..6ac232e52bf7 100644
=0A
--- a/drivers/net/usb/sr9700= .c
=0A
+++ b/drivers/net/usb/sr9700.c
=0A
@@ -358,7 +358= ,7 @@ static int sr9700_bind(struct usbnet *dev, struct usb_interface *int= f)
=0A
/* power up and reset phy */
=0A
sr_write_reg= (dev, SR_PRR, PRR_PHY_RST);
=0A
/* at least 10ms, here 20ms for= safe */
=0A
- mdelay(20);
=0A
+ msleep(20);
=0A sr_write_reg(dev, SR_PRR, 0);
=0A
/* at least 1ms, here 2ms= for reading right register */
=0A
udelay(2 * 1000);
=0A--
=0A
2.17.0
=0A=0A ------=_001_NextPart884175411161_=------