From: Priit Laes <plaes@plaes.org>
Cc: "Priit Laes" <plaes@plaes.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Minu Jin" <s9430939@naver.com>,
"Archit Anant" <architanant5@gmail.com>,
"Andy Shevchenko" <andriy.shevchenko@intel.com>,
"Yuvraj Singh Chauhan" <ysinghcin@gmail.com>,
"Philip Thayer" <thayerscirez@gmail.com>,
"JJ Strnad" <strnad.jj@gmail.com>,
"Dan Carpenter" <dan.carpenter@linaro.org>,
"Rodrigo Gobbi" <rodrigo.gobbi.7@gmail.com>,
"Navaneeth K" <knavaneeth786@gmail.com>,
"Abraham Samuel Adekunle" <abrahamadekunle50@gmail.com>,
"Randy Dunlap" <rdunlap@infradead.org>,
"William Hansen-Baird" <william.hansen.baird@gmail.com>,
"Tanjim Kamal" <tanjimkamal1@gmail.com>,
"Artur Stupa" <arthur.stupa@gmail.com>,
"Michael Straube" <straube.linux@gmail.com>,
"Hans de Goede" <hansg@kernel.org>,
"Ingo Molnar" <mingo@kernel.org>,
"Vivek BalachandharTN" <vivek.balachandhar@gmail.com>,
"Ethan Tidmore" <ethantidmore06@gmail.com>,
"Zhuoheng Li" <lizhuoheng@kylinos.cn>,
"Michael Huang" <tehsiu.huang@gmail.com>,
"Nino Zhang" <ninozhang001@gmail.com>,
"Rogério Fernandes Pereira" <rfp2005@gmail.com>,
"Thomas Gleixner" <tglx@kernel.org>,
"Diksha Kumari" <dikshakdevgan@gmail.com>,
yingche <zxcv2569763104@gmail.com>,
"Khushal Chitturi" <khushalchitturi@gmail.com>,
"Akiyoshi Kurita" <weibu@redadmin.org>,
"SeungJu Cheon" <suunj1331@gmail.com>,
"Erick Karanja" <karanja99erick@gmail.com>,
"Sun Jian" <sun.jian.kdev@gmail.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH v2 08/11] staging: rtl8723bs: Drop workqueue wrapper functions
Date: Sat, 21 Feb 2026 21:01:38 +0200 [thread overview]
Message-ID: <20260221190628.50273-9-plaes@plaes.org> (raw)
In-Reply-To: <20260221190628.50273-1-plaes@plaes.org>
Replace custom workqueue wrapper functions:
* _init_workitem -> INIT_WORK
* _cancel_workitem_sync -> cancel_work_sync
* _set_workitem -> schedule_work
Signed-off-by: Priit Laes <plaes@plaes.org>
---
drivers/staging/rtl8723bs/core/rtw_cmd.c | 4 ++--
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 6 +++---
drivers/staging/rtl8723bs/hal/sdio_ops.c | 4 ++--
.../rtl8723bs/include/osdep_service_linux.h | 15 ---------------
4 files changed, 7 insertions(+), 22 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index b2e7f479f72b..d0694a659259 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -201,7 +201,7 @@ int rtw_init_evt_priv(struct evt_priv *pevtpriv)
atomic_set(&pevtpriv->event_seq, 0);
pevtpriv->evt_done_cnt = 0;
- _init_workitem(&pevtpriv->c2h_wk, c2h_wk_callback, NULL);
+ INIT_WORK(&pevtpriv->c2h_wk, c2h_wk_callback);
pevtpriv->c2h_wk_alive = false;
pevtpriv->c2h_queue = rtw_cbuf_alloc(C2H_QUEUE_MAX_LEN + 1);
if (!pevtpriv->c2h_queue)
@@ -212,7 +212,7 @@ int rtw_init_evt_priv(struct evt_priv *pevtpriv)
void _rtw_free_evt_priv(struct evt_priv *pevtpriv)
{
- _cancel_workitem_sync(&pevtpriv->c2h_wk);
+ cancel_work_sync(&pevtpriv->c2h_wk);
while (pevtpriv->c2h_wk_alive)
msleep(10);
diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index 1c9e02732687..c93c7357b3f0 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -670,7 +670,7 @@ static void pwr_rpwm_timeout_handler(struct timer_list *t)
if ((pwrpriv->rpwm == pwrpriv->cpwm) || (pwrpriv->cpwm >= PS_STATE_S2))
return;
- _set_workitem(&pwrpriv->rpwmtimeoutwi);
+ schedule_work(&pwrpriv->rpwmtimeoutwi);
}
static inline void register_task_alive(struct pwrctrl_priv *pwrctrl, u32 tag)
@@ -971,11 +971,11 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter)
rtw_hal_set_hwreg(padapter, HW_VAR_SET_RPWM, (u8 *)(&pwrctrlpriv->rpwm));
- _init_workitem(&pwrctrlpriv->cpwm_event, cpwm_event_callback, NULL);
+ INIT_WORK(&pwrctrlpriv->cpwm_event, cpwm_event_callback);
pwrctrlpriv->brpwmtimeout = false;
pwrctrlpriv->adapter = padapter;
- _init_workitem(&pwrctrlpriv->rpwmtimeoutwi, rpwmtimeout_workitem_callback, NULL);
+ INIT_WORK(&pwrctrlpriv->rpwmtimeoutwi, rpwmtimeout_workitem_callback);
timer_setup(&pwrctrlpriv->pwr_rpwm_timer, pwr_rpwm_timeout_handler, 0);
timer_setup(&pwrctrlpriv->pwr_state_check_timer,
pwr_state_check_handler, 0);
diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c
index 6bfb8c0e519c..ea373276f9cd 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_ops.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c
@@ -876,7 +876,7 @@ void sd_int_dpc(struct adapter *adapter)
SdioLocalCmd52Read1Byte(adapter, SDIO_REG_HCPWM1_8723B);
- _set_workitem(&(pwrctl->cpwm_event));
+ schedule_work(&(pwrctl->cpwm_event));
}
if (hal->sdio_hisr & SDIO_HISR_TXERR) {
@@ -912,7 +912,7 @@ void sd_int_dpc(struct adapter *adapter)
} else {
/* Error handling for malloc fail */
rtw_cbuf_push(adapter->evtpriv.c2h_queue, NULL);
- _set_workitem(&adapter->evtpriv.c2h_wk);
+ schedule_work(&adapter->evtpriv.c2h_wk);
}
}
diff --git a/drivers/staging/rtl8723bs/include/osdep_service_linux.h b/drivers/staging/rtl8723bs/include/osdep_service_linux.h
index c8274da940ff..ebaa2f1d4af7 100644
--- a/drivers/staging/rtl8723bs/include/osdep_service_linux.h
+++ b/drivers/staging/rtl8723bs/include/osdep_service_linux.h
@@ -58,21 +58,6 @@ static inline void _set_timer(struct timer_list *ptimer, u32 delay_time)
mod_timer(ptimer, (jiffies + (delay_time * HZ / 1000)));
}
-static inline void _init_workitem(struct work_struct *pwork, void *pfunc, void *cntx)
-{
- INIT_WORK(pwork, pfunc);
-}
-
-static inline void _set_workitem(struct work_struct *pwork)
-{
- schedule_work(pwork);
-}
-
-static inline void _cancel_workitem_sync(struct work_struct *pwork)
-{
- cancel_work_sync(pwork);
-}
-
static inline int rtw_netif_queue_stopped(struct net_device *pnetdev)
{
return (netif_tx_queue_stopped(netdev_get_tx_queue(pnetdev, 0)) &&
--
2.53.0
next prev parent reply other threads:[~2026-02-21 19:10 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-21 19:01 [PATCH v2 00/11] staging: stl8723bs: Various cleanups Priit Laes
2026-02-21 19:01 ` [PATCH v2 01/11] staging: stl8723bs: Use common round_up macro Priit Laes
2026-02-21 19:41 ` Vivek BalachandharTN
2026-02-23 7:09 ` Dan Carpenter
2026-02-23 10:43 ` Priit Laes
2026-02-23 11:40 ` Julia Lawall
2026-02-23 11:50 ` Andy Shevchenko
2026-02-23 12:16 ` Julia Lawall
2026-02-23 13:48 ` Andy Shevchenko
2026-02-23 14:43 ` Dan Carpenter
2026-02-21 19:01 ` [PATCH v2 02/11] staging: rtl8723bs: Remove unused BIT32..BIT36 definitions Priit Laes
2026-02-21 19:01 ` [PATCH v2 03/11] staging: rtl8723bs: Drop empty rtw_bug_check function Priit Laes
2026-02-21 19:01 ` [PATCH v2 04/11] staging: rtl8723bs: Remove unused rtw_sprintf macro Priit Laes
2026-02-21 19:01 ` [PATCH v2 05/11] staging: rtl8723bs: Drop unused _kfree(...) declaration Priit Laes
2026-02-21 19:01 ` [PATCH v2 06/11] staging: rtl8723bs: Get rid of unused _rtw_init_queue Priit Laes
2026-02-21 19:01 ` [PATCH v2 07/11] staging: rtl8723bs: Drop unused NDEV-related formatting macros Priit Laes
2026-02-21 19:01 ` Priit Laes [this message]
2026-02-21 19:01 ` [PATCH v2 09/11] staging: rtl8273bs: Simplify regulatory initialization functions Priit Laes
2026-02-23 7:17 ` Dan Carpenter
2026-02-21 19:01 ` [PATCH v2 10/11] staging: rtl8723bs: Clean up wrapper functions Priit Laes
2026-02-21 20:20 ` Vivek BalachandharTN
2026-02-23 7:25 ` Dan Carpenter
[not found] ` <CAPsOcukZNc3oR=FmAjCdC6NrUV=1CaggQNGPoC2oxuH_P2R0hQ@mail.gmail.com>
2026-02-23 7:50 ` Andy Shevchenko
2026-02-21 19:01 ` [PATCH v2 11/11] staging: rtl8723bs: rtw_ieee80211: Reduce global symbols Priit Laes
2026-02-23 7:32 ` 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=20260221190628.50273-9-plaes@plaes.org \
--to=plaes@plaes.org \
--cc=abrahamadekunle50@gmail.com \
--cc=andriy.shevchenko@intel.com \
--cc=architanant5@gmail.com \
--cc=arthur.stupa@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=dikshakdevgan@gmail.com \
--cc=ethantidmore06@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hansg@kernel.org \
--cc=karanja99erick@gmail.com \
--cc=khushalchitturi@gmail.com \
--cc=knavaneeth786@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=lizhuoheng@kylinos.cn \
--cc=mingo@kernel.org \
--cc=ninozhang001@gmail.com \
--cc=rdunlap@infradead.org \
--cc=rfp2005@gmail.com \
--cc=rodrigo.gobbi.7@gmail.com \
--cc=s9430939@naver.com \
--cc=straube.linux@gmail.com \
--cc=strnad.jj@gmail.com \
--cc=sun.jian.kdev@gmail.com \
--cc=suunj1331@gmail.com \
--cc=tanjimkamal1@gmail.com \
--cc=tehsiu.huang@gmail.com \
--cc=tglx@kernel.org \
--cc=thayerscirez@gmail.com \
--cc=vivek.balachandhar@gmail.com \
--cc=weibu@redadmin.org \
--cc=william.hansen.baird@gmail.com \
--cc=ysinghcin@gmail.com \
--cc=zxcv2569763104@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.