From: Dan Carpenter <error27@gmail.com>
To: Hungyu Lin <dennylin0707@gmail.com>
Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] staging: rtl8723bs: propagate errno handling for mgmt xmit
Date: Fri, 31 Jul 2026 14:02:35 +0300 [thread overview]
Message-ID: <amyAy1GO98r6wV9T@stanley.mountain> (raw)
In-Reply-To: <20260731070546.20959-3-dennylin0707@gmail.com>
On Fri, Jul 31, 2026 at 07:05:45AM +0000, Hungyu Lin wrote:
> Convert rtw_hal_mgnt_xmit() to return errno-style values and update
> dump_mgntframe_and_wait() to translate the result back to the existing
> _SUCCESS/_FAIL flow. Update the prototype in hal_intf.h accordingly
>
> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
> ---
> drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 4 ++++
> drivers/staging/rtl8723bs/hal/hal_intf.c | 9 +++++++--
> drivers/staging/rtl8723bs/include/hal_intf.h | 2 +-
> 3 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> index f5ab94a2d0a0..0027f9333738 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> @@ -1990,6 +1990,10 @@ s32 dump_mgntframe_and_wait(struct adapter *padapter, struct xmit_frame *pmgntfr
> 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);
This is awkward. I would have allowed it either way, but it's good
to note this kind of thing in the commit message:
"After this change the error checking in dump_mgntframe_and_wait()
becomes quite awkward because we need to convert zero to _SUCCESS (1)
and negative error codes to _FAIL (0). A follow on patch will
change the dump_mgntframe_and_wait() to use kernel error codes
consistently."
regards,
dan carpenter
next prev parent reply other threads:[~2026-07-31 11:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 7:05 [PATCH 0/3] staging: rtl8723bs: convert management transmit path to errno Hungyu Lin
2026-07-31 7:05 ` [PATCH 1/3] staging: rtl8723bs: convert mgmt xmit coalesce " Hungyu Lin
2026-07-31 11:03 ` Dan Carpenter
2026-07-31 7:05 ` [PATCH 2/3] staging: rtl8723bs: propagate errno handling for mgmt xmit Hungyu Lin
2026-07-31 11:02 ` Dan Carpenter [this message]
2026-07-31 7:05 ` [PATCH 3/3] staging: rtl8723bs: convert dump mgnt path to errno Hungyu Lin
2026-07-31 11:04 ` Dan Carpenter
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=amyAy1GO98r6wV9T@stanley.mountain \
--to=error27@gmail.com \
--cc=dennylin0707@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