From: Joe Perches <joe@perches.com>
To: Janani Sankara Babu <jananis37@gmail.com>, gregkh@linuxfoundation.org
Cc: goudapatilk@gmail.com, insafonov@gmail.com,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging:rtl8188eu Fix msleep < 20ms can sleep upto 20ms
Date: Tue, 05 Sep 2017 07:16:50 -0700 [thread overview]
Message-ID: <1504621010.28899.6.camel@perches.com> (raw)
In-Reply-To: <1504606001-31970-1-git-send-email-jananis37@gmail.com>
On Tue, 2017-09-05 at 15:36 +0530, Janani Sankara Babu wrote:
> This patch solves the following warning shown by checkpatch script
> Warning: msleep < 20ms can sleep for up to 20ms
[]
> diff --git a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c
[]
> @@ -436,7 +436,7 @@ s32 LPS_RF_ON_check(struct adapter *padapter, u32 delay_ms)
> DBG_88E("%s: Wait for FW LPS leave more than %u ms!!!\n", __func__, delay_ms);
> break;
> }
> - msleep(1);
> + usleep_range(0, 1000);
No, that would sleep a random time up to 1 ms.
usleep_range(1000, 2000) might be OK but please
check the value passed as delay_ms.
It's only used as LPS_LEAVE_TIMEOUT_MS (100 here)
so it seems just fine to keep using msleep.
prev parent reply other threads:[~2017-09-05 14:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-05 10:06 [PATCH] staging:rtl8188eu Fix msleep < 20ms can sleep upto 20ms Janani Sankara Babu
2017-09-05 14:14 ` Greg KH
2017-09-05 14:16 ` Joe Perches [this message]
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=1504621010.28899.6.camel@perches.com \
--to=joe@perches.com \
--cc=devel@driverdev.osuosl.org \
--cc=goudapatilk@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=insafonov@gmail.com \
--cc=jananis37@gmail.com \
--cc=linux-kernel@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