netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Jia-Ju Bai <baijiaju1990@gmail.com>
Cc: mlindner@marvell.com, shemminger@linux-foundation.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sky2: Replace mdelay with msleep in sky2_vpd_wait
Date: Sat, 30 Dec 2017 09:19:06 -0800	[thread overview]
Message-ID: <20171230091906.6eabcf39@xeon-e3> (raw)
In-Reply-To: <1514632187-14849-1-git-send-email-baijiaju1990@gmail.com>

On Sat, 30 Dec 2017 19:09:47 +0800
Jia-Ju Bai <baijiaju1990@gmail.com> wrote:

> 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 <baijiaju1990@gmail.com>
> ---
>  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;

When sky2 was written mdelay was equivalent to current msleep.

Acked-by: Stephen Hemminger <stephen@networkplumber.org>

  reply	other threads:[~2017-12-30 17:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-30 11:09 [PATCH] sky2: Replace mdelay with msleep in sky2_vpd_wait Jia-Ju Bai
2017-12-30 17:19 ` Stephen Hemminger [this message]
2018-01-02 17:27 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2017-12-24  3:54 Jia-Ju Bai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171230091906.6eabcf39@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=baijiaju1990@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mlindner@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).