All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Eric LI (Honggang)" <eric.lee0305@gmail.com>
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: Re: [PATCH] staging: rtl8723bs: refactor xmit_xmitframe
Date: Thu, 1 Oct 2026 11:34:30 +0200	[thread overview]
Message-ID: <2026100121-chirpy-stomp-9fbe@gregkh> (raw)
In-Reply-To: <20260924151606.333467-1-eric.lee0305@gmail.com>

On Thu, Sep 24, 2026 at 11:16:06PM +0800, Eric LI (Honggang) wrote:
> Refactor the function xmit_xmitframe in rtl8723bs_xmit.c to
> reduce the leading tabs

Refactor it how?

And is the output the same before/after?

> 
> 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;

This jumped out at me, why add this new line?

thanks,

greg k-h

  reply	other threads:[~2026-10-01  9:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-24 15:16 [PATCH] staging: rtl8723bs: refactor xmit_xmitframe Eric LI (Honggang)
2026-10-01  9:34 ` Greg Kroah-Hartman [this message]
2026-10-01 10:42   ` Dan Carpenter
2026-10-01 15:28   ` Eric Lee

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=2026100121-chirpy-stomp-9fbe@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=dennylin0707@gmail.com \
    --cc=eric.lee0305@gmail.com \
    --cc=ethantidmore06@gmail.com \
    --cc=fliegbert2@gmail.com \
    --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 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.