Skip to content

Commit

Permalink
staging: qlge: change msleep to usleep_range
Browse files Browse the repository at this point in the history
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>
Link: https://lore.kernel.org/r/YMa60p5dl0LMV/9D@tobias-VirtualBox
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Tobias Alam authored and Greg Kroah-Hartman committed Jun 14, 2021
1 parent 9866b31 commit 7c0ae9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/qlge/qlge_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7c0ae9e

Please sign in to comment.