From: "Jose A. Perez de Azpillaga" <azpijr@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ethan Tidmore <ethantidmore06@gmail.com>,
"Jose A . Perez de Azpillaga" <azpijr@gmail.com>,
Minu Jin <s9430939@naver.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH v2] staging: rtl8723bs: replace msleep() with fsleep() in rtw_cmd.c
Date: Fri, 27 Feb 2026 09:46:12 +0100 [thread overview]
Message-ID: <20260227084623.209913-1-azpijr@gmail.com> (raw)
In-Reply-To: <20260226010536.179729-1-azpijr@gmail.com>
Replace msleep() with fsleep() in rtw_cmd.c to improve delay
precision and follow modern kernel practices.
Specifically, this fixes a checkpatch warning for the 10ms delay
in _rtw_free_evt_priv() and updates the 100ms polling loops in
rtw_chk_hi_queue_hdl() and rtw_free_cmd_priv() for consistency.
Signed-off-by: Jose A. Perez de Azpillaga <azpijr@gmail.com>
---
v2: changed to USEC_PER_MSEC instead of magic numbers
---
drivers/staging/rtl8723bs/core/rtw_cmd.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index abb84f8aecbe..c689d3744ad4 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -8,6 +8,7 @@
#include <hal_btcoex.h>
#include <linux/jiffies.h>
#include <linux/align.h>
+#include <linux/delay.h>
static struct _cmd_callback rtw_cmd_callback[] = {
{GEN_CMD_CODE(_Read_MACREG), NULL}, /*0*/
@@ -214,7 +215,7 @@ void _rtw_free_evt_priv(struct evt_priv *pevtpriv)
{
_cancel_workitem_sync(&pevtpriv->c2h_wk);
while (pevtpriv->c2h_wk_alive)
- msleep(10);
+ fsleep(10 * USEC_PER_MSEC);
while (!rtw_cbuf_empty(pevtpriv->c2h_queue)) {
void *c2h = rtw_cbuf_pop(pevtpriv->c2h_queue);
@@ -1495,7 +1496,7 @@ static void rtw_chk_hi_queue_hdl(struct adapter *padapter)
rtw_hal_get_hwreg(padapter, HW_VAR_CHK_HI_QUEUE_EMPTY, &empty);
while (!empty && jiffies_to_msecs(jiffies - start) < g_wait_hiq_empty) {
- msleep(100);
+ fsleep(100 * USEC_PER_MSEC);
rtw_hal_get_hwreg(padapter, HW_VAR_CHK_HI_QUEUE_EMPTY, &empty);
}
--
2.53.0
next prev parent reply other threads:[~2026-02-27 8:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-26 1:05 [PATCH] staging: rtl8723bs: replace msleep() with fsleep() in rtw_cmd.c Jose A. Perez de Azpillaga
2026-02-27 2:03 ` Ethan Tidmore
2026-02-27 8:46 ` Jose A. Perez de Azpillaga [this message]
2026-02-27 15:18 ` [PATCH v2] " Ethan Tidmore
2026-02-27 16:39 ` Dan Carpenter
2026-02-27 17:16 ` Ethan Tidmore
2026-02-28 4:46 ` Ethan Tidmore
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=20260227084623.209913-1-azpijr@gmail.com \
--to=azpijr@gmail.com \
--cc=ethantidmore06@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=s9430939@naver.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox