From: Hungyu Lin <dennylin0707@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Dan Carpenter <error27@gmail.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Hungyu Lin <dennylin0707@gmail.com>
Subject: [PATCH v2 5/5] staging: rtl8723bs: propagate errno through hal xmit path
Date: Thu, 14 May 2026 10:07:08 +0000 [thread overview]
Message-ID: <20260514100708.25031-6-dennylin0707@gmail.com> (raw)
In-Reply-To: <20260514100708.25031-1-dennylin0707@gmail.com>
Propagate errno values from rtl8723bs_hal_xmitframe_enqueue()
through rtw_hal_xmitframe_enqueue() by returning the error code
directly.
Update rtw_hal_xmit() to explicitly map the boolean return
value of rtl8723bs_hal_xmit() to _SUCCESS/_FAIL, clarifying
the return semantics at the HAL boundary.
None of the callers of rtw_hal_xmitframe_enqueue() check the
return value, so they do not need to be updated. This change
does not affect runtime behavior.
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
---
v2:
- Clarify commit message per Dan Carpenter's review
drivers/staging/rtl8723bs/hal/hal_intf.c | 7 +++++--
drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 2 +-
drivers/staging/rtl8723bs/include/hal_intf.h | 2 +-
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/hal_intf.c b/drivers/staging/rtl8723bs/hal/hal_intf.c
index 03f23b75d532..77fa6e67530a 100644
--- a/drivers/staging/rtl8723bs/hal/hal_intf.c
+++ b/drivers/staging/rtl8723bs/hal/hal_intf.c
@@ -99,14 +99,17 @@ u8 rtw_hal_check_ips_status(struct adapter *padapter)
return CheckIPSStatus(padapter);
}
-s32 rtw_hal_xmitframe_enqueue(struct adapter *padapter, struct xmit_frame *pxmitframe)
+int rtw_hal_xmitframe_enqueue(struct adapter *padapter, struct xmit_frame *pxmitframe)
{
return rtl8723bs_hal_xmitframe_enqueue(padapter, pxmitframe);
}
s32 rtw_hal_xmit(struct adapter *padapter, struct xmit_frame *pxmitframe)
{
- return rtl8723bs_hal_xmit(padapter, pxmitframe);
+ if (rtl8723bs_hal_xmit(padapter, pxmitframe))
+ return _FAIL;
+
+ return _SUCCESS;
}
/*
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
index ff82b6efefc7..ea7c9f4ac0f4 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
@@ -519,7 +519,7 @@ s32 rtl8723bs_hal_xmitframe_enqueue(
complete(&pxmitpriv->SdioXmitStart);
}
- return err ? _FAIL : _SUCCESS;
+ return err;
}
diff --git a/drivers/staging/rtl8723bs/include/hal_intf.h b/drivers/staging/rtl8723bs/include/hal_intf.h
index 9b000681ff80..ee8ad26325b5 100644
--- a/drivers/staging/rtl8723bs/include/hal_intf.h
+++ b/drivers/staging/rtl8723bs/include/hal_intf.h
@@ -195,7 +195,7 @@ void rtw_hal_set_odm_var(struct adapter *padapter, enum hal_odm_variable eVariab
u8 rtw_hal_check_ips_status(struct adapter *padapter);
-s32 rtw_hal_xmitframe_enqueue(struct adapter *padapter, struct xmit_frame *pxmitframe);
+int rtw_hal_xmitframe_enqueue(struct adapter *padapter, struct xmit_frame *pxmitframe);
s32 rtw_hal_xmit(struct adapter *padapter, struct xmit_frame *pxmitframe);
s32 rtw_hal_mgnt_xmit(struct adapter *padapter, struct xmit_frame *pmgntframe);
--
2.34.1
prev parent reply other threads:[~2026-05-14 10:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 10:07 [PATCH v2 0/5] staging: rtl8723bs: clean up xmit classifier and propagate errno Hungyu Lin
2026-05-14 10:07 ` [PATCH v2 1/5] staging: rtl8723bs: simplify rtw_xmit_classifier control flow Hungyu Lin
2026-05-14 10:07 ` [PATCH v2 2/5] staging: rtl8723bs: make rtw_xmit_classifier static Hungyu Lin
2026-05-14 10:07 ` [PATCH v2 3/5] staging: rtl8723bs: convert rtw_xmit_classifier to return errno Hungyu Lin
2026-05-14 10:07 ` [PATCH v2 4/5] staging: rtl8723bs: propagate errno through xmit enqueue path Hungyu Lin
2026-05-14 10:07 ` 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=20260514100708.25031-6-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 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.