All of lore.kernel.org
 help / color / mirror / Atom feed
From: Egil Hjelmeland <privat@egil-hjelmeland.no>
To: andrew@lunn.ch, vivien.didelot@savoirfairelinux.com,
	f.fainelli@gmail.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: Egil Hjelmeland <privat@egil-hjelmeland.no>
Subject: [PATCH v2 net-next 3/4] net: dsa: lan9303: Replace msleep(1) with usleep_range()
Date: Mon,  6 Nov 2017 12:42:03 +0100	[thread overview]
Message-ID: <20171106114204.15083-4-privat@egil-hjelmeland.no> (raw)
In-Reply-To: <20171106114204.15083-1-privat@egil-hjelmeland.no>

Remove scripts/checkpatch.pl WARNING by replacing msleep(1) with usleep_range()

Signed-off-by: Egil Hjelmeland <privat@egil-hjelmeland.no>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
 drivers/net/dsa/lan9303-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c
index c4afc8f1a66d..70ecd18a5e7d 100644
--- a/drivers/net/dsa/lan9303-core.c
+++ b/drivers/net/dsa/lan9303-core.c
@@ -284,7 +284,7 @@ static int lan9303_indirect_phy_wait_for_completion(struct lan9303 *chip)
 		}
 		if (!(reg & LAN9303_PMI_ACCESS_MII_BUSY))
 			return 0;
-		msleep(1);
+		usleep_range(1000, 2000);
 	}
 
 	return -EIO;
@@ -376,7 +376,7 @@ static int lan9303_switch_wait_for_completion(struct lan9303 *chip)
 		}
 		if (!(reg & LAN9303_SWITCH_CSR_CMD_BUSY))
 			return 0;
-		msleep(1);
+		usleep_range(1000, 2000);
 	}
 
 	return -EIO;
-- 
2.11.0

  parent reply	other threads:[~2017-11-06 11:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-06 11:42 [PATCH v2 net-next 0/4] net: dsa: lan9303: Linting Egil Hjelmeland
2017-11-06 11:42 ` [PATCH v2 net-next 1/4] net: dsa: lan9303: Correct register names in comments Egil Hjelmeland
2017-11-06 11:42 ` [PATCH v2 net-next 2/4] net: dsa: lan9303: Fix syntax errors in device tree examples Egil Hjelmeland
2017-11-06 11:42 ` Egil Hjelmeland [this message]
2017-11-06 11:42 ` [PATCH v2 net-next 4/4] net: dsa: lan9303: Adjust indenting Egil Hjelmeland
2017-11-08  4:29 ` [PATCH v2 net-next 0/4] net: dsa: lan9303: Linting David Miller

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=20171106114204.15083-4-privat@egil-hjelmeland.no \
    --to=privat@egil-hjelmeland.no \
    --cc=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@savoirfairelinux.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.