Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1269421imm; Fri, 27 Jul 2018 14:14:30 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd4BL0kMAoWQrAPRjE+4zH2GiBqkDO8a91YTlLVmQE5PX2DWJA52fP/0wbg3e92mufkz1Cd X-Received: by 2002:a63:3e0a:: with SMTP id l10-v6mr7601767pga.355.1532726070578; Fri, 27 Jul 2018 14:14:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532726070; cv=none; d=google.com; s=arc-20160816; b=hYWV215wunBoPjaVOO0auL864TANxO/nbB2Er1cAAGKcHd8tEiBzMm1MSvdtwHUM5L p6Rb/SQBKpcWRHu5IoUcNQbK6GGmAklEi4/yvWfk6gUFJPDIDUOROznU/ojWRVYXJp7C C4DqbjCkoBa987qlmyVa/p5r+tyzXvDd/ITkS4yoHay6xub3HGBcHPMhJOig4RJ8ev4m vdkH9+P5QcPRckvdwizGf82rwiZnZ5MVL5GE0rb8o0aYklnZBrekXTJ03BMQZ+nrqMyz 8IRJc0OYH/KRVgJnWk2LSMlYg/4XvK4uwosmPkIwmw9KAvuHFnRibM1U+fnrj0b44uh5 2b8Q== 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=+RUhaqLF7UWQip6Jr5VboJUFqFyshwh44N1rW+qatos=; b=wwDjiUcdCzM3jvRvPRzU8XmhrcUxRm9DK3BzOhT0YNGwo5Pz5bMV2x0O+mdd9dRssE 0QbJpWyeiISXTKZztq+uJZgBuZ/0cnlO7C7bzrVGqqtraezvLyyONEwaIPiQJjUVS9O/ /7NIwV+D3IJrF3diD12vWq++/H64BTi/9Ee1cNMZCEJ0n1I8NUir79P9emhKoaCW6VEo HyYctgdiS74QJYlVWvcg254sMcRPXG3/qU2UlNe2q7wZjmKCzgFBvy6DrSUriPsbWtqL FEQD0t5jSY60PKOduJOgzFToFEv48AnUjrhvdDWhbcyzFVJGQ6nl7itDUYRV0oySXEpR QiJg== 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 h11-v6si4605264pgf.558.2018.07.27.14.14.16; Fri, 27 Jul 2018 14:14:30 -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 S2389852AbeG0Wgn (ORCPT + 99 others); Fri, 27 Jul 2018 18:36:43 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:39196 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389373AbeG0Wgm (ORCPT ); Fri, 27 Jul 2018 18:36:42 -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 08F10102B38BC; Fri, 27 Jul 2018 14:13:00 -0700 (PDT) Date: Fri, 27 Jul 2018 14:12:57 -0700 (PDT) Message-Id: <20180727.141257.1707349045689741399.davem@davemloft.net> To: baijiaju1990@gmail.com Cc: liujunliang_ljl@163.com, linux-usb@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: usb: sr9700: Replace mdelay() with msleep() in sr9700_bind() From: David Miller In-Reply-To: <20180727084104.29726-1-baijiaju1990@gmail.com> References: <20180727084104.29726-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:13:02 -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:41:04 +0800 > sr9700_bind() is never called in atomic context. > It calls mdelay() to busily wait, which is not necessary. > mdelay() can be replaced with msleep(). > > This is found by a static analysis tool named DCNS written by myself. > > Signed-off-by: Jia-Ju Bai Applied.