From: Tobias Alam <tobiasalam@gmail.com>
To: Manish Chopra <manishc@marvell.com>,
GR-Linux-NIC-Dev@marvell.com, Coiby Xu <coiby.xu@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
netdev@vger.kernel.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: [PATCH] staging: qlge: change msleep to usleep_range
Date: Sun, 13 Jun 2021 22:11:30 -0400 [thread overview]
Message-ID: <YMa60p5dl0LMV/9D@tobias-VirtualBox> (raw)
This patch changes msleep() to usleep_range() based on
Documentation/timers/timers-howto.txt. It suggests using usleep_range()
for small msec(1ms - 20ms) because msleep() will often sleep longer than
the desired value. Issue found by checkpatch.
Signed-off-by: Tobias Alam <tobiasalam@gmail.com>
---
drivers/staging/qlge/qlge_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/qlge/qlge_ethtool.c b/drivers/staging/qlge/qlge_ethtool.c
index b70570b7b467..87d60115ac67 100644
--- a/drivers/staging/qlge/qlge_ethtool.c
+++ b/drivers/staging/qlge/qlge_ethtool.c
@@ -553,7 +553,7 @@ static int qlge_run_loopback_test(struct qlge_adapter *qdev)
atomic_inc(&qdev->lb_count);
}
/* Give queue time to settle before testing results. */
- msleep(2);
+ usleep_range(2000, 2100);
qlge_clean_lb_rx_ring(&qdev->rx_ring[0], 128);
return atomic_read(&qdev->lb_count) ? -EIO : 0;
}
--
2.30.2
reply other threads:[~2021-06-14 2:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=YMa60p5dl0LMV/9D@tobias-VirtualBox \
--to=tobiasalam@gmail.com \
--cc=GR-Linux-NIC-Dev@marvell.com \
--cc=coiby.xu@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=manishc@marvell.com \
--cc=netdev@vger.kernel.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).