From: "Eric LI (Honggang)" <eric.lee0305@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Hungyu Lin <dennylin0707@gmail.com>,
Andrei Khomenkov <khomenkov@mailbox.org>,
Khushal Chitturi <khushalchitturi@gmail.com>,
Ethan Tidmore <ethantidmore06@gmail.com>,
Oskar Ray-Frayssinet <rayfraytech@gmail.com>,
SeungJu Cheon <suunj1331@gmail.com>,
Dalvin-Ehinoma Noah Aiguobas <fliegbert2@gmail.com>,
Jennifer Guo <guojy.bj@gmail.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH] staging: rtl8723bs: refactor xmit_xmitframe
Date: Thu, 24 Sep 2026 23:16:06 +0800 [thread overview]
Message-ID: <20260924151606.333467-1-eric.lee0305@gmail.com> (raw)
Refactor the function xmit_xmitframe in rtl8723bs_xmit.c to
reduce the leading tabs
Signed-off-by: Eric LI (Honggang) <eric.lee0305@gmail.com>
---
.../staging/rtl8723bs/hal/rtl8723bs_xmit.c | 43 ++++++++++---------
1 file changed, 22 insertions(+), 21 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
index 7f55448d544e..46895b05538d 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
@@ -231,29 +231,30 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv
/* check xmit_buf size enough or not */
txlen = txdesc_size + rtw_wlan_pkt_size(pxmitframe);
- if (!pxmitbuf ||
- ((_RND(pxmitbuf->len, 8) + txlen) > max_xmit_len) ||
- (k >= (rtw_hal_sdio_max_txoqt_free_space(padapter) - 1))
+ if (pxmitbuf &&
+ (((_RND(pxmitbuf->len, 8) + txlen) > max_xmit_len) ||
+ (k >= (rtw_hal_sdio_max_txoqt_free_space(padapter) - 1)))
) {
- if (pxmitbuf) {
- /* pxmitbuf->priv_data will be NULL, and will crash here */
- if (pxmitbuf->len > 0 &&
- pxmitbuf->priv_data) {
- struct xmit_frame *pframe;
-
- pframe = (struct xmit_frame *)pxmitbuf->priv_data;
- pframe->agg_num = k;
- pxmitbuf->agg_num = k;
- rtl8723b_update_txdesc(pframe, pframe->buf_addr);
- rtw_free_xmitframe(pxmitpriv, pframe);
- pxmitbuf->priv_data = NULL;
- enqueue_pending_xmitbuf(pxmitpriv, pxmitbuf);
- /* can not yield under lock */
- /* yield(); */
- } else
- rtw_free_xmitbuf(pxmitpriv, pxmitbuf);
- }
+ if (pxmitbuf->len > 0 &&
+ pxmitbuf->priv_data) {
+ struct xmit_frame *pframe;
+
+ pframe = (struct xmit_frame *)pxmitbuf->priv_data;
+ pframe->agg_num = k;
+ pxmitbuf->agg_num = k;
+ rtl8723b_update_txdesc(pframe, pframe->buf_addr);
+ rtw_free_xmitframe(pxmitpriv, pframe);
+ pxmitbuf->priv_data = NULL;
+ enqueue_pending_xmitbuf(pxmitpriv, pxmitbuf);
+ /* can not yield under lock */
+ /* yield(); */
+ } else
+ rtw_free_xmitbuf(pxmitpriv, pxmitbuf);
+
+ pxmitbuf = NULL;
+ }
+ if (!pxmitbuf) {
pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv);
if (!pxmitbuf) {
err = -2;
--
2.34.1
reply other threads:[~2026-09-24 15:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260924151606.333467-1-eric.lee0305@gmail.com \
--to=eric.lee0305@gmail.com \
--cc=dennylin0707@gmail.com \
--cc=ethantidmore06@gmail.com \
--cc=fliegbert2@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=guojy.bj@gmail.com \
--cc=khomenkov@mailbox.org \
--cc=khushalchitturi@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=rayfraytech@gmail.com \
--cc=suunj1331@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®