From: Hungyu Lin <dennylin0707@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
error27@gmail.com, Hungyu Lin <dennylin0707@gmail.com>
Subject: [PATCH v2 3/3] staging: rtl8723bs: make dump_mgntframe_and_wait() return void
Date: Fri, 31 Jul 2026 15:52:28 +0000 [thread overview]
Message-ID: <20260731155228.22526-4-dennylin0707@gmail.com> (raw)
In-Reply-To: <20260731155228.22526-1-dennylin0707@gmail.com>
The return value of dump_mgntframe_and_wait() is ignored by all current
callers.
Keep using the return value of rtw_hal_mgnt_xmit() to determine whether
to wait for completion. Make dump_mgntframe_and_wait() return void
because no caller uses its return value.
Suggested-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 17 ++++-------------
.../staging/rtl8723bs/include/rtw_mlme_ext.h | 2 +-
2 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index 0027f9333738..ae760e9c655a 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -1971,9 +1971,8 @@ void dump_mgntframe(struct adapter *padapter, struct xmit_frame *pmgntframe)
rtw_hal_mgnt_xmit(padapter, pmgntframe);
}
-s32 dump_mgntframe_and_wait(struct adapter *padapter, struct xmit_frame *pmgntframe, int timeout_ms)
+void dump_mgntframe_and_wait(struct adapter *padapter, struct xmit_frame *pmgntframe, int timeout_ms)
{
- s32 ret = _FAIL;
unsigned long irqL;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
struct xmit_buf *pxmitbuf = pmgntframe->pxmitbuf;
@@ -1983,26 +1982,18 @@ s32 dump_mgntframe_and_wait(struct adapter *padapter, struct xmit_frame *pmgntfr
padapter->bDriverStopped) {
rtw_free_xmitbuf(&padapter->xmitpriv, pmgntframe->pxmitbuf);
rtw_free_xmitframe(&padapter->xmitpriv, pmgntframe);
- return ret;
+ return;
}
rtw_sctx_init(&sctx, timeout_ms);
pxmitbuf->sctx = &sctx;
- ret = rtw_hal_mgnt_xmit(padapter, pmgntframe);
- if (ret)
- ret = _FAIL;
- else
- ret = _SUCCESS;
-
- if (ret == _SUCCESS)
- ret = rtw_sctx_wait(&sctx);
+ if (!rtw_hal_mgnt_xmit(padapter, pmgntframe))
+ rtw_sctx_wait(&sctx);
spin_lock_irqsave(&pxmitpriv->lock_sctx, irqL);
pxmitbuf->sctx = NULL;
spin_unlock_irqrestore(&pxmitpriv->lock_sctx, irqL);
-
- return ret;
}
s32 dump_mgntframe_and_wait_ack(struct adapter *padapter, struct xmit_frame *pmgntframe)
diff --git a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
index 0c2bd51b6bc2..73b89832d27a 100644
--- a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
+++ b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
@@ -533,7 +533,7 @@ void update_mgnt_tx_rate(struct adapter *padapter, u8 rate);
void update_mgntframe_attrib(struct adapter *padapter, struct pkt_attrib *pattrib);
void update_mgntframe_attrib_addr(struct adapter *padapter, struct xmit_frame *pmgntframe);
void dump_mgntframe(struct adapter *padapter, struct xmit_frame *pmgntframe);
-s32 dump_mgntframe_and_wait(struct adapter *padapter, struct xmit_frame *pmgntframe, int timeout_ms);
+void dump_mgntframe_and_wait(struct adapter *padapter, struct xmit_frame *pmgntframe, int timeout_ms);
s32 dump_mgntframe_and_wait_ack(struct adapter *padapter, struct xmit_frame *pmgntframe);
void issue_beacon(struct adapter *padapter, int timeout_ms);
--
2.43.0
prev parent reply other threads:[~2026-07-31 15:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 15:52 [PATCH v2 0/3] staging: rtl8723bs: clean up management transmit return values Hungyu Lin
2026-07-31 15:52 ` [PATCH v2 1/3] staging: rtl8723bs: convert mgmt xmit coalesce to errno Hungyu Lin
2026-07-31 15:52 ` [PATCH v2 2/3] staging: rtl8723bs: propagate errno handling for mgmt xmit Hungyu Lin
2026-07-31 15:52 ` Hungyu Lin [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=20260731155228.22526-4-dennylin0707@gmail.com \
--to=dennylin0707@gmail.com \
--cc=error27@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/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