From: Dan Carpenter <error27@gmail.com>
To: Serhat Kumral <serhatkumral1@gmail.com>
Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] staging: rtl8723bs: use usleep_range instead of msleep for short delays
Date: Mon, 22 Jun 2026 12:07:33 +0300 [thread overview]
Message-ID: <ajj7VWARSs8bO0Zd@stanley.mountain> (raw)
In-Reply-To: <20260621104058.7408-3-serhatkumral1@gmail.com>
On Sun, Jun 21, 2026 at 01:40:58PM +0300, Serhat Kumral wrote:
> Replace msleep(10) and msleep(1) with usleep_range(10000, 20000) and
> usleep_range(1000, 2000) respectively in os_intfs.c, because msleep is
> imprecise and discouraged for short delays under 20ms.
> This fixes the checkpatch.pl warnings:
> WARNING: msleep < 20ms can sleep for up to 20ms; see function description of msleep().
>
> Signed-off-by: Serhat Kumral <serhatkumral1@gmail.com>
> ---
> drivers/staging/rtl8723bs/os_dep/os_intfs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
> index 89e41c26e..5e41f518a 100644
> --- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
> +++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
> @@ -986,7 +986,7 @@ void rtw_dev_unload(struct adapter *padapter)
> if (cnt > 5)
> break;
> cnt++;
> - msleep(10);
> + usleep_range(10000, 20000);
The first two are fine but this isn't. Do a search on lore for
the reasons.
regards,
dan carpenter
prev parent reply other threads:[~2026-06-22 9:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-21 10:40 [PATCH 1/3] staging: rtl8723bs: remove multiple blank lines Serhat Kumral
2026-06-21 10:40 ` [PATCH 2/3] staging: rtl8723bs: put logical continuation on previous line Serhat Kumral
2026-06-21 10:40 ` [PATCH 3/3] staging: rtl8723bs: use usleep_range instead of msleep for short delays Serhat Kumral
2026-06-22 9:07 ` Dan Carpenter [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=ajj7VWARSs8bO0Zd@stanley.mountain \
--to=error27@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=serhatkumral1@gmail.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.