Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1269261imm; Fri, 27 Jul 2018 14:14:18 -0700 (PDT) X-Google-Smtp-Source: AAOMgpezCxhXzwNw5b/zHRJwq/yQKdXQsWXakB5lgb6r0LIizHUxpozv1wpJbM8J6Wf6cgnkzxxJ X-Received: by 2002:a17:902:9695:: with SMTP id n21-v6mr7504027plp.6.1532726058065; Fri, 27 Jul 2018 14:14:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532726058; cv=none; d=google.com; s=arc-20160816; b=TpZ1aKoDdgmwY+DwEIVbk+zsQlcCkqU0BkpxWYVxyG5mBXZXzm/e/5MxcOdZ1renRd KygzNJrhcD5PvCz54IoJRgwW6SXc2CDQbF+KF1emYo0vgR2C2pSaMlqB7qQQhUEHFDRU ZM7aD6VF+bOGM2JfEtrSuItbU53OkT/CB7sOCmj18OrtpC1BunVT7xFBbyeddXRdslXi c4kO5tiA1jwH1iS+qK1cMT46gDflQ4J8hSkEm80wjgzSBtggC4a6xkpWePgi3xxmEoQx XNr/YWu6+n4JEpqJnd4hZXKbMHpYKncWUbN031RxSO1dILSzNxZsk6f3QaMuOXzOsOPH 6UBQ== 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=UOMZ/bZA1niFUuNvVkaC8R13vKgAbDJ4N6EUHM/qWo8=; b=YmohjmiHBYx5+ykQyWOwBruFDz+whmttv6spUkUJqksaR6fZ/Tl3zB0DXCCINaGQnc HigB1JgdXqvnEQjEHg+mP2rJcLecj85Df14mKtzTTerjqrXdsf8PUbWx1z1+G5ZBnPqY IkgK3O+A5GvaOIGzSxcVXqZ1lvj4zsu8rduAnvoFO+yWbaB1NgeqB2e8nJnxpz9cepaH 4KcNVuy6E9cF974NxJOubEaAfIeLN8q487PmreFfgqXYyVH+ZSC+fJRyeurP0s9lvkBg FkW58EH5CsqwZqxGJ5/Uv8MZdwctHVuV9XkeqoASVj+dvWmesUczTZXvYAHR/6Z0cbOv tDJg== 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 c1-v6si4350739pli.145.2018.07.27.14.14.03; Fri, 27 Jul 2018 14:14:18 -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 S2389821AbeG0Wgf (ORCPT + 99 others); Fri, 27 Jul 2018 18:36:35 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:39186 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389373AbeG0Wge (ORCPT ); Fri, 27 Jul 2018 18:36:34 -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 3FF16108A9043; Fri, 27 Jul 2018 14:12:52 -0700 (PDT) Date: Fri, 27 Jul 2018 14:12:49 -0700 (PDT) Message-Id: <20180727.141249.2268355680445612136.davem@davemloft.net> To: baijiaju1990@gmail.com Cc: petkan@nucleusys.com, linux-usb@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: usb: pegasus: Replace mdelay() with msleep() in setup_pegasus_II() From: David Miller In-Reply-To: <20180727083629.18663-1-baijiaju1990@gmail.com> References: <20180727083629.18663-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:54 -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:36:29 +0800 > setup_pegasus_II() 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.