Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757139AbdLXDvn (ORCPT ); Sat, 23 Dec 2017 22:51:43 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:45772 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752042AbdLXDvl (ORCPT ); Sat, 23 Dec 2017 22:51:41 -0500 X-Google-Smtp-Source: ACJfBotw4j86QrUgnF8bgGceqOJp66pneSMXg71vBDubjOeVjg1DiWJOuI+KB0ah5mvZD2UCiBk1Cw== From: Jia-Ju Bai To: mlindner@marvell.com, stephen@networkplumber.org, shemminger@linux-foundation.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jia-Ju Bai Subject: [PATCH] sky2: Replace mdelay with msleep in sky2_vpd_wait Date: Sun, 24 Dec 2017 11:54:33 +0800 Message-Id: <1514087673-7091-1-git-send-email-baijiaju1990@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 736 Lines: 23 sky2_vpd_wait is not called in an interrupt handler nor holding a spinlock. The function mdelay in it can be replaced with msleep, to reduce busy wait. Signed-off-by: Jia-Ju Bai --- drivers/net/ethernet/marvell/sky2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c index 9efe177..9fe8530 100644 --- a/drivers/net/ethernet/marvell/sky2.c +++ b/drivers/net/ethernet/marvell/sky2.c @@ -4287,7 +4287,7 @@ static int sky2_vpd_wait(const struct sky2_hw *hw, int cap, u16 busy) dev_err(&hw->pdev->dev, "VPD cycle timed out\n"); return -ETIMEDOUT; } - mdelay(1); + msleep(1); } return 0; -- 1.7.9.5