public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v2 00/11] staging: stl8723bs: Various cleanups
@ 2026-02-21 19:01 Priit Laes
  2026-02-21 19:01 ` [PATCH v2 01/11] staging: stl8723bs: Use common round_up macro Priit Laes
                   ` (10 more replies)
  0 siblings, 11 replies; 25+ messages in thread
From: Priit Laes @ 2026-02-21 19:01 UTC (permalink / raw)
  Cc: Priit Laes, Greg Kroah-Hartman, Archit Anant, Minu Jin,
	Andy Shevchenko, Bryant Boatright, Ignacio Pena, JJ Strnad,
	Dan Carpenter, Ethan Tidmore, Randy Dunlap, Tanjim Kamal,
	Navaneeth K, Abraham Samuel Adekunle, Rodrigo Gobbi, Artur Stupa,
	Michael Straube, Hans de Goede, Vivek BalachandharTN, Zhuoheng Li,
	Michael Huang, Nino Zhang, Rogério Fernandes Pereira,
	Ingo Molnar, Thomas Gleixner, Omer El Idrissi,
	William Hansen-Baird, Diksha Kumari, Khushal Chitturi,
	Karthikey D Kadati, Akiyoshi Kurita, SeungJu Cheon, Erick Karanja,
	Sun Jian, Yuvraj Singh Chauhan, linux-staging, linux-kernel

Various cleanups for rtl8723bs driver, mostly targeting unused code and
definitions.

Changes since v1:
* Include description in commit body as well
* Fix warnings introduced in patch 11.

Priit Laes (11):
  staging: stl8723bs: Use common round_up macro
  staging: rtl8723bs: Remove unused BIT32..BIT36 definitions
  staging: rtl8723bs: Drop empty rtw_bug_check function
  staging: rtl8723bs: Remove unused rtw_sprintf macro
  staging: rtl8723bs: Drop unused _kfree(...) declaration.
  staging: rtl8723bs: Get rid of unused _rtw_init_queue
  staging: rtl8723bs: Drop unused NDEV-related formatting macros
  staging: rtl8723bs: Drop workqueue wrapper functions
  staging: rtl8273bs: Simplify regulatory initialization functions
  staging: rtl8723bs: Clean up wrapper functions
  staging: rtl8723bs: rtw_ieee80211: Reduce global symbols

 drivers/staging/rtl8723bs/core/rtw_cmd.c      | 90 ++++++++-----------
 .../staging/rtl8723bs/core/rtw_ieee80211.c    | 41 ++++-----
 drivers/staging/rtl8723bs/core/rtw_mlme.c     | 10 ---
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c  |  6 +-
 drivers/staging/rtl8723bs/core/rtw_recv.c     |  3 -
 drivers/staging/rtl8723bs/core/rtw_sta_mgt.c  |  1 -
 drivers/staging/rtl8723bs/core/rtw_xmit.c     |  4 -
 .../staging/rtl8723bs/hal/rtl8723bs_xmit.c    |  6 +-
 drivers/staging/rtl8723bs/hal/sdio_ops.c      |  8 +-
 drivers/staging/rtl8723bs/include/cmd_osdep.h |  7 +-
 drivers/staging/rtl8723bs/include/ieee80211.h | 30 -------
 .../staging/rtl8723bs/include/osdep_service.h | 25 ------
 .../rtl8723bs/include/osdep_service_linux.h   | 18 ----
 drivers/staging/rtl8723bs/os_dep/wifi_regd.c  | 27 +-----
 14 files changed, 73 insertions(+), 203 deletions(-)

-- 
2.53.0


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH v2 01/11] staging: stl8723bs: Use common round_up macro
  2026-02-21 19:01 [PATCH v2 00/11] staging: stl8723bs: Various cleanups Priit Laes
@ 2026-02-21 19:01 ` Priit Laes
  2026-02-21 19:41   ` Vivek BalachandharTN
  2026-02-21 19:01 ` [PATCH v2 02/11] staging: rtl8723bs: Remove unused BIT32..BIT36 definitions Priit Laes
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 25+ messages in thread
From: Priit Laes @ 2026-02-21 19:01 UTC (permalink / raw)
  Cc: Priit Laes, Greg Kroah-Hartman, Archit Anant, Minu Jin,
	Andy Shevchenko, Thomas Gleixner, Yuvraj Singh Chauhan, JJ Strnad,
	Dan Carpenter, Julia Lawall, William Hansen-Baird, Randy Dunlap,
	Abraham Samuel Adekunle, Rodrigo Gobbi, Navaneeth K, Artur Stupa,
	Michael Straube, Hans de Goede, Vivek BalachandharTN,
	Ethan Tidmore, Zhuoheng Li, Michael Huang, Nino Zhang,
	Ingo Molnar, Rogério Fernandes Pereira, Diksha Kumari,
	yingche, Khushal Chitturi, Karthikey D Kadati, Akiyoshi Kurita,
	Erick Karanja, SeungJu Cheon, Sun Jian, linux-staging,
	linux-kernel

Get rid of driver-specific _RND macro in favor of kernel one.

Signed-off-by: Priit Laes <plaes@plaes.org>
---
 drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c    | 6 +++---
 drivers/staging/rtl8723bs/hal/sdio_ops.c          | 4 ++--
 drivers/staging/rtl8723bs/include/osdep_service.h | 2 --
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
index a1f2cbf2cf55..c5b172c2f839 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
@@ -232,7 +232,7 @@ 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) ||
+					((round_up(pxmitbuf->len, 8) + txlen) > max_xmit_len) ||
 					(k >= (rtw_hal_sdio_max_txoqt_free_space(padapter) - 1))
 				) {
 					if (pxmitbuf) {
@@ -303,8 +303,8 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv
 					txlen = txdesc_size + pxmitframe->attrib.last_txcmdsz;
 					pxmitframe->pg_num = (txlen + 127) / 128;
 					pxmitbuf->pg_num += (txlen + 127) / 128;
-					pxmitbuf->ptail += _RND(txlen, 8); /*  round to 8 bytes alignment */
-					pxmitbuf->len = _RND(pxmitbuf->len, 8) + txlen;
+					pxmitbuf->ptail += round_up(txlen, 8);
+					pxmitbuf->len = round_up(pxmitbuf->len, 8) + txlen;
 				}
 
 				if (k != 1)
diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c
index c9cb20c61a2b..6bfb8c0e519c 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_ops.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c
@@ -401,7 +401,7 @@ static u32 sdio_read_port(
 	hal_sdio_get_cmd_addr_8723b(adapter, addr, hal->SdioRxFIFOCnt++, &addr);
 
 	if (cnt > psdio->block_transfer_len)
-		cnt = _RND(cnt, psdio->block_transfer_len);
+		cnt = round_up(cnt, psdio->block_transfer_len);
 
 	err = _sd_read(intfhdl, addr, cnt, mem);
 
@@ -448,7 +448,7 @@ static u32 sdio_write_port(
 	hal_sdio_get_cmd_addr_8723b(adapter, addr, cnt >> 2, &addr);
 
 	if (cnt > psdio->block_transfer_len)
-		cnt = _RND(cnt, psdio->block_transfer_len);
+		cnt = round_up(cnt, psdio->block_transfer_len);
 
 	err = sd_write(intfhdl, addr, cnt, xmitbuf->pdata);
 
diff --git a/drivers/staging/rtl8723bs/include/osdep_service.h b/drivers/staging/rtl8723bs/include/osdep_service.h
index 955e8678dc26..404f81756b27 100644
--- a/drivers/staging/rtl8723bs/include/osdep_service.h
+++ b/drivers/staging/rtl8723bs/include/osdep_service.h
@@ -78,8 +78,6 @@ static inline int rtw_bug_check(void *parg1, void *parg2, void *parg3, void *par
 
 }
 
-#define _RND(sz, r) ((((sz)+((r)-1))/(r))*(r))
-
 extern void rtw_free_netdev(struct net_device *netdev);
 
 /* Macros for handling unaligned memory accesses */
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 02/11] staging: rtl8723bs: Remove unused BIT32..BIT36 definitions
  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:01 ` Priit Laes
  2026-02-21 19:01 ` [PATCH v2 03/11] staging: rtl8723bs: Drop empty rtw_bug_check function Priit Laes
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 25+ messages in thread
From: Priit Laes @ 2026-02-21 19:01 UTC (permalink / raw)
  Cc: Priit Laes, Greg Kroah-Hartman, Archit Anant, Minu Jin,
	Andy Shevchenko, JJ Strnad, Bryant Boatright, Dan Carpenter,
	William Hansen-Baird, Randy Dunlap, Abraham Samuel Adekunle,
	Navaneeth K, Artur Stupa, Michael Straube, Hans de Goede,
	Vivek BalachandharTN, Ethan Tidmore, Zhuoheng Li, Michael Huang,
	Nino Zhang, Ingo Molnar, Thomas Gleixner, Diksha Kumari, yingche,
	Khushal Chitturi, Akiyoshi Kurita, Erick Karanja, SeungJu Cheon,
	Sun Jian, Yuvraj Singh Chauhan, linux-staging, linux-kernel

BIT32..BIT36 seem to be not used anywhere.

Signed-off-by: Priit Laes <plaes@plaes.org>
---
 drivers/staging/rtl8723bs/include/osdep_service.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/osdep_service.h b/drivers/staging/rtl8723bs/include/osdep_service.h
index 404f81756b27..f7b647db1a75 100644
--- a/drivers/staging/rtl8723bs/include/osdep_service.h
+++ b/drivers/staging/rtl8723bs/include/osdep_service.h
@@ -46,11 +46,6 @@
 #define BIT29	0x20000000
 #define BIT30	0x40000000
 #define BIT31	0x80000000
-#define BIT32	0x0100000000
-#define BIT33	0x0200000000
-#define BIT34	0x0400000000
-#define BIT35	0x0800000000
-#define BIT36	0x1000000000
 
 extern int RTW_STATUS_CODE(int error_code);
 
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 03/11] staging: rtl8723bs: Drop empty rtw_bug_check function
  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:01 ` [PATCH v2 02/11] staging: rtl8723bs: Remove unused BIT32..BIT36 definitions Priit Laes
@ 2026-02-21 19:01 ` Priit Laes
  2026-02-21 19:01 ` [PATCH v2 04/11] staging: rtl8723bs: Remove unused rtw_sprintf macro Priit Laes
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 25+ messages in thread
From: Priit Laes @ 2026-02-21 19:01 UTC (permalink / raw)
  Cc: Priit Laes, Greg Kroah-Hartman, Archit Anant, Minu Jin,
	Andy Shevchenko, JJ Strnad, Thomas Gleixner, Dan Carpenter,
	Randy Dunlap, Ethan Tidmore, William Hansen-Baird, Navaneeth K,
	Tanjim Kamal, Artur Stupa, Abraham Samuel Adekunle,
	Michael Straube, Hans de Goede, Vivek BalachandharTN, Zhuoheng Li,
	Michael Huang, Nino Zhang, Rogério Fernandes Pereira,
	Ingo Molnar, Diksha Kumari, Milos Puric, Karthikey D Kadati,
	Khushal Chitturi, Akiyoshi Kurita, SeungJu Cheon, Erick Karanja,
	Sun Jian, Yuvraj Singh Chauhan, linux-staging, linux-kernel

The rtw_bug_check was no-op returing true, so get rid of it
and remove calls to it.

Signed-off-by: Priit Laes <plaes@plaes.org>
---
 drivers/staging/rtl8723bs/core/rtw_mlme.c         | 10 ----------
 drivers/staging/rtl8723bs/include/osdep_service.h |  8 --------
 2 files changed, 18 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 22dc36e8e38a..7a346cbf2708 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -358,9 +358,6 @@ int is_same_network(struct wlan_bssid_ex *src, struct wlan_bssid_ex *dst, u8 fea
 	u16 s_cap, d_cap;
 	__le16 tmps, tmpd;
 
-	if (rtw_bug_check(dst, src, &s_cap, &d_cap) == false)
-		return false;
-
 	memcpy((u8 *)&tmps, rtw_get_capability_from_ie(src->ies), 2);
 	memcpy((u8 *)&tmpd, rtw_get_capability_from_ie(dst->ies), 2);
 
@@ -464,11 +461,6 @@ static void update_current_network(struct adapter *adapter, struct wlan_bssid_ex
 {
 	struct	mlme_priv *pmlmepriv = &adapter->mlmepriv;
 
-	rtw_bug_check(&pmlmepriv->cur_network.network,
-		&pmlmepriv->cur_network.network,
-		&pmlmepriv->cur_network.network,
-		&pmlmepriv->cur_network.network);
-
 	if (check_fwstate(pmlmepriv, _FW_LINKED) && (is_same_network(&pmlmepriv->cur_network.network, pnetwork, 0))) {
 		update_network(&pmlmepriv->cur_network.network, pnetwork, adapter, true);
 		rtw_update_protection(adapter, (pmlmepriv->cur_network.network.ies) + sizeof(struct ndis_802_11_fix_ie),
@@ -493,8 +485,6 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
 	list_for_each(plist, phead) {
 		pnetwork = list_entry(plist, struct wlan_network, list);
 
-		rtw_bug_check(pnetwork, pnetwork, pnetwork, pnetwork);
-
 		if (is_same_network(&pnetwork->network, target, feature)) {
 			target_find = 1;
 			break;
diff --git a/drivers/staging/rtl8723bs/include/osdep_service.h b/drivers/staging/rtl8723bs/include/osdep_service.h
index f7b647db1a75..d6710e5835f0 100644
--- a/drivers/staging/rtl8723bs/include/osdep_service.h
+++ b/drivers/staging/rtl8723bs/include/osdep_service.h
@@ -65,14 +65,6 @@ static inline void flush_signals_thread(void)
 
 #define rtw_warn_on(condition) WARN_ON(condition)
 
-static inline int rtw_bug_check(void *parg1, void *parg2, void *parg3, void *parg4)
-{
-	int ret = true;
-
-	return ret;
-
-}
-
 extern void rtw_free_netdev(struct net_device *netdev);
 
 /* Macros for handling unaligned memory accesses */
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 04/11] staging: rtl8723bs: Remove unused rtw_sprintf macro
  2026-02-21 19:01 [PATCH v2 00/11] staging: stl8723bs: Various cleanups Priit Laes
                   ` (2 preceding siblings ...)
  2026-02-21 19:01 ` [PATCH v2 03/11] staging: rtl8723bs: Drop empty rtw_bug_check function Priit Laes
@ 2026-02-21 19:01 ` Priit Laes
  2026-02-21 19:01 ` [PATCH v2 05/11] staging: rtl8723bs: Drop unused _kfree(...) declaration Priit Laes
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 25+ messages in thread
From: Priit Laes @ 2026-02-21 19:01 UTC (permalink / raw)
  Cc: Priit Laes, Greg Kroah-Hartman, Archit Anant, Minu Jin,
	Andy Shevchenko, Yuvraj Singh Chauhan, Thomas Gleixner, JJ Strnad,
	Dan Carpenter, Abraham Samuel Adekunle, Navaneeth K,
	Ethan Tidmore, Artur Stupa, Tanjim Kamal, Rodrigo Gobbi,
	Michael Straube, Hans de Goede, Vivek BalachandharTN, Zhuoheng Li,
	Michael Huang, Nino Zhang, Rogério Fernandes Pereira,
	Ingo Molnar, William Hansen-Baird, Diksha Kumari, Milos Puric,
	yingche, Karthikey D Kadati, Khushal Chitturi, Erick Karanja,
	Akiyoshi Kurita, SeungJu Cheon, Sun Jian, linux-staging,
	linux-kernel

Remove unused `rtw_sprintf` macro.

Signed-off-by: Priit Laes <plaes@plaes.org>
---
 drivers/staging/rtl8723bs/include/osdep_service.h | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/osdep_service.h b/drivers/staging/rtl8723bs/include/osdep_service.h
index d6710e5835f0..cf75760d364a 100644
--- a/drivers/staging/rtl8723bs/include/osdep_service.h
+++ b/drivers/staging/rtl8723bs/include/osdep_service.h
@@ -85,10 +85,4 @@ bool rtw_cbuf_push(struct rtw_cbuf *cbuf, void *buf);
 void *rtw_cbuf_pop(struct rtw_cbuf *cbuf);
 struct rtw_cbuf *rtw_cbuf_alloc(u32 size);
 
-/*  String handler */
-/*
- * Write formatted output to sized buffer
- */
-#define rtw_sprintf(buf, size, format, arg...)	snprintf(buf, size, format, ##arg)
-
 #endif
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 05/11] staging: rtl8723bs: Drop unused _kfree(...) declaration.
  2026-02-21 19:01 [PATCH v2 00/11] staging: stl8723bs: Various cleanups Priit Laes
                   ` (3 preceding siblings ...)
  2026-02-21 19:01 ` [PATCH v2 04/11] staging: rtl8723bs: Remove unused rtw_sprintf macro Priit Laes
@ 2026-02-21 19:01 ` Priit Laes
  2026-02-21 19:01 ` [PATCH v2 06/11] staging: rtl8723bs: Get rid of unused _rtw_init_queue Priit Laes
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 25+ messages in thread
From: Priit Laes @ 2026-02-21 19:01 UTC (permalink / raw)
  Cc: Priit Laes, Greg Kroah-Hartman, Archit Anant, Minu Jin,
	Andy Shevchenko, Thomas Gleixner, Bryant Boatright, JJ Strnad,
	Dan Carpenter, Abraham Samuel Adekunle, Julia Lawall,
	Rodrigo Gobbi, Navaneeth K, Tanjim Kamal, Artur Stupa,
	Michael Straube, Hans de Goede, Ethan Tidmore,
	Vivek BalachandharTN, Zhuoheng Li, Michael Huang, Nino Zhang,
	Ingo Molnar, Rogério Fernandes Pereira, William Hansen-Baird,
	Omer El Idrissi, Diksha Kumari, Milos Puric, Khushal Chitturi,
	SeungJu Cheon, Erick Karanja, Akiyoshi Kurita, Sun Jian,
	Yuvraj Singh Chauhan, linux-staging, linux-kernel

Drop unused `_kfree()` definition from header file.

Signed-off-by: Priit Laes <plaes@plaes.org>
---
 drivers/staging/rtl8723bs/include/osdep_service.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/osdep_service.h b/drivers/staging/rtl8723bs/include/osdep_service.h
index cf75760d364a..59fc2cdb195d 100644
--- a/drivers/staging/rtl8723bs/include/osdep_service.h
+++ b/drivers/staging/rtl8723bs/include/osdep_service.h
@@ -49,8 +49,6 @@
 
 extern int RTW_STATUS_CODE(int error_code);
 
-void _kfree(u8 *pbuf, u32 sz);
-
 int _rtw_netif_rx(struct net_device *ndev, struct sk_buff *skb);
 
 #define rtw_netif_rx(ndev, skb) _rtw_netif_rx(ndev, skb)
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 06/11] staging: rtl8723bs: Get rid of unused _rtw_init_queue
  2026-02-21 19:01 [PATCH v2 00/11] staging: stl8723bs: Various cleanups Priit Laes
                   ` (4 preceding siblings ...)
  2026-02-21 19:01 ` [PATCH v2 05/11] staging: rtl8723bs: Drop unused _kfree(...) declaration Priit Laes
@ 2026-02-21 19:01 ` Priit Laes
  2026-02-21 19:01 ` [PATCH v2 07/11] staging: rtl8723bs: Drop unused NDEV-related formatting macros Priit Laes
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 25+ messages in thread
From: Priit Laes @ 2026-02-21 19:01 UTC (permalink / raw)
  Cc: Priit Laes, Greg Kroah-Hartman, Minu Jin, Archit Anant,
	Andy Shevchenko, Thomas Gleixner, Philip Thayer, JJ Strnad,
	Dan Carpenter, Tanjim Kamal, Ethan Tidmore,
	Abraham Samuel Adekunle, Navaneeth K, William Hansen-Baird,
	Artur Stupa, Randy Dunlap, Michael Straube, Hans de Goede,
	Vivek BalachandharTN, Zhuoheng Li, Michael Huang, Nino Zhang,
	Rogério Fernandes Pereira, Ingo Molnar, Omer El Idrissi,
	Diksha Kumari, yingche, Milos Puric, Khushal Chitturi,
	Erick Karanja, SeungJu Cheon, Akiyoshi Kurita, Sun Jian,
	Yuvraj Singh Chauhan, linux-staging, linux-kernel

While `_rtw_init_queue` function was reworked ~4 years ago,
there were still some leftovers in commented out code and also
header file.

Signed-off-by: Priit Laes <plaes@plaes.org>
---
 drivers/staging/rtl8723bs/core/rtw_recv.c         | 3 ---
 drivers/staging/rtl8723bs/core/rtw_sta_mgt.c      | 1 -
 drivers/staging/rtl8723bs/core/rtw_xmit.c         | 4 ----
 drivers/staging/rtl8723bs/include/osdep_service.h | 2 --
 4 files changed, 10 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
index 337671b1211f..e0c901a5459e 100644
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
@@ -21,9 +21,6 @@ void _rtw_init_sta_recv_priv(struct sta_recv_priv *psta_recvpriv)
 
 	spin_lock_init(&psta_recvpriv->lock);
 
-	/* for (i = 0; i<MAX_RX_NUMBLKS; i++) */
-	/* _rtw_init_queue(&psta_recvpriv->blk_strms[i]); */
-
 	INIT_LIST_HEAD(&psta_recvpriv->defrag_q.queue);
 	spin_lock_init(&psta_recvpriv->defrag_q.lock);
 }
diff --git a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
index bdd4b6d8fd2e..76d32ae8ac9e 100644
--- a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
+++ b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
@@ -67,7 +67,6 @@ u32 _rtw_init_sta_priv(struct	sta_priv *pstapriv)
 
 	spin_lock_init(&pstapriv->sta_hash_lock);
 
-	/* _rtw_init_queue(&pstapriv->asoc_q); */
 	pstapriv->asoc_sta_count = 0;
 	INIT_LIST_HEAD(&pstapriv->sleep_q.queue);
 	spin_lock_init(&pstapriv->sleep_q.lock);
diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index 222851e8d985..c2833f3cd10b 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -43,10 +43,6 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
 	init_completion(&pxmitpriv->xmit_comp);
 	init_completion(&pxmitpriv->terminate_xmitthread_comp);
 
-	/*
-	 * Please insert all the queue initialization using _rtw_init_queue below
-	 */
-
 	pxmitpriv->adapter = padapter;
 
 	INIT_LIST_HEAD(&pxmitpriv->be_pending.queue);
diff --git a/drivers/staging/rtl8723bs/include/osdep_service.h b/drivers/staging/rtl8723bs/include/osdep_service.h
index 59fc2cdb195d..37e8ddb01dcd 100644
--- a/drivers/staging/rtl8723bs/include/osdep_service.h
+++ b/drivers/staging/rtl8723bs/include/osdep_service.h
@@ -53,8 +53,6 @@ int _rtw_netif_rx(struct net_device *ndev, struct sk_buff *skb);
 
 #define rtw_netif_rx(ndev, skb) _rtw_netif_rx(ndev, skb)
 
-extern void _rtw_init_queue(struct __queue	*pqueue);
-
 static inline void flush_signals_thread(void)
 {
 	if (signal_pending(current))
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 07/11] staging: rtl8723bs: Drop unused NDEV-related formatting macros
  2026-02-21 19:01 [PATCH v2 00/11] staging: stl8723bs: Various cleanups Priit Laes
                   ` (5 preceding siblings ...)
  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 ` Priit Laes
  2026-02-21 19:01 ` [PATCH v2 08/11] staging: rtl8723bs: Drop workqueue wrapper functions Priit Laes
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 25+ messages in thread
From: Priit Laes @ 2026-02-21 19:01 UTC (permalink / raw)
  Cc: Priit Laes, Greg Kroah-Hartman, Minu Jin, Archit Anant,
	Andy Shevchenko, Yuvraj Singh Chauhan, Bryant Boatright,
	JJ Strnad, Dan Carpenter, Rodrigo Gobbi, Tanjim Kamal,
	Navaneeth K, Abraham Samuel Adekunle, Randy Dunlap,
	William Hansen-Baird, Artur Stupa, Michael Straube, Hans de Goede,
	Ethan Tidmore, Vivek BalachandharTN, Zhuoheng Li, Michael Huang,
	Nino Zhang, Ingo Molnar, Omer El Idrissi, Thomas Gleixner,
	Diksha Kumari, yingche, Milos Puric, Khushal Chitturi,
	Akiyoshi Kurita, SeungJu Cheon, Erick Karanja, Sun Jian,
	linux-staging, linux-kernel

Drop unused NDEV_ARG, FUNC_NDEV_FMT and FUNC_NDEV_ARG macros.

Signed-off-by: Priit Laes <plaes@plaes.org>
---
 drivers/staging/rtl8723bs/include/osdep_service_linux.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/osdep_service_linux.h b/drivers/staging/rtl8723bs/include/osdep_service_linux.h
index 2ec54f9e180c..c8274da940ff 100644
--- a/drivers/staging/rtl8723bs/include/osdep_service_linux.h
+++ b/drivers/staging/rtl8723bs/include/osdep_service_linux.h
@@ -98,10 +98,7 @@ static inline void rtw_netif_stop_queue(struct net_device *pnetdev)
 
 #define rtw_signal_process(pid, sig) kill_pid(find_vpid((pid)), (sig), 1)
 
-#define NDEV_ARG(ndev) ndev->name
 #define ADPT_ARG(adapter) adapter->pnetdev->name
-#define FUNC_NDEV_FMT "%s(%s)"
-#define FUNC_NDEV_ARG(ndev) __func__, ndev->name
 #define FUNC_ADPT_FMT "%s(%s)"
 #define FUNC_ADPT_ARG(adapter) __func__, adapter->pnetdev->name
 
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 08/11] staging: rtl8723bs: Drop workqueue wrapper functions
  2026-02-21 19:01 [PATCH v2 00/11] staging: stl8723bs: Various cleanups Priit Laes
                   ` (6 preceding siblings ...)
  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
  2026-02-21 19:01 ` [PATCH v2 09/11] staging: rtl8273bs: Simplify regulatory initialization functions Priit Laes
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 25+ messages in thread
From: Priit Laes @ 2026-02-21 19:01 UTC (permalink / raw)
  Cc: Priit Laes, Greg Kroah-Hartman, Minu Jin, Archit Anant,
	Andy Shevchenko, Yuvraj Singh Chauhan, Philip Thayer, JJ Strnad,
	Dan Carpenter, Rodrigo Gobbi, Navaneeth K,
	Abraham Samuel Adekunle, Randy Dunlap, William Hansen-Baird,
	Tanjim Kamal, Artur Stupa, Michael Straube, Hans de Goede,
	Ingo Molnar, Vivek BalachandharTN, Ethan Tidmore, Zhuoheng Li,
	Michael Huang, Nino Zhang, Rogério Fernandes Pereira,
	Thomas Gleixner, Diksha Kumari, yingche, Khushal Chitturi,
	Akiyoshi Kurita, SeungJu Cheon, Erick Karanja, Sun Jian,
	linux-staging, linux-kernel

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


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 09/11] staging: rtl8273bs: Simplify regulatory initialization functions
  2026-02-21 19:01 [PATCH v2 00/11] staging: stl8723bs: Various cleanups Priit Laes
                   ` (7 preceding siblings ...)
  2026-02-21 19:01 ` [PATCH v2 08/11] staging: rtl8723bs: Drop workqueue wrapper functions Priit Laes
@ 2026-02-21 19:01 ` 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 19:01 ` [PATCH v2 11/11] staging: rtl8723bs: rtw_ieee80211: Reduce global symbols Priit Laes
  10 siblings, 1 reply; 25+ messages in thread
From: Priit Laes @ 2026-02-21 19:01 UTC (permalink / raw)
  Cc: Priit Laes, Greg Kroah-Hartman, Minu Jin, Archit Anant,
	Andy Shevchenko, Bryant Boatright, Philip Thayer, JJ Strnad,
	Dan Carpenter, Tanjim Kamal, Artur Stupa, Abraham Samuel Adekunle,
	Rodrigo Gobbi, Navaneeth K, William Hansen-Baird, Michael Straube,
	Hans de Goede, Vivek BalachandharTN, Ethan Tidmore, Zhuoheng Li,
	Michael Huang, Nino Zhang, Thomas Gleixner,
	Rogério Fernandes Pereira, Ingo Molnar, Omer El Idrissi,
	Diksha Kumari, yingche, Milos Puric, Khushal Chitturi,
	SeungJu Cheon, Akiyoshi Kurita, Erick Karanja, Sun Jian,
	Yuvraj Singh Chauhan, linux-staging, linux-kernel

Simplify code, by cutting out wrapper function in regulatory
initialization code.

Signed-off-by: Priit Laes <plaes@plaes.org>
---
 drivers/staging/rtl8723bs/os_dep/wifi_regd.c | 27 +++-----------------
 1 file changed, 4 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/wifi_regd.c b/drivers/staging/rtl8723bs/os_dep/wifi_regd.c
index f9c4d487badf..878a2ee08d25 100644
--- a/drivers/staging/rtl8723bs/os_dep/wifi_regd.c
+++ b/drivers/staging/rtl8723bs/os_dep/wifi_regd.c
@@ -91,40 +91,21 @@ static int _rtw_reg_notifier_apply(struct wiphy *wiphy,
 	return 0;
 }
 
-static const struct ieee80211_regdomain *_rtw_regdomain_select(struct
-							       rtw_regulatory
-							       *reg)
-{
-	return &rtw_regdom_rd;
-}
-
-static void _rtw_regd_init_wiphy(struct rtw_regulatory *reg,
-				 struct wiphy *wiphy,
-				 void (*reg_notifier)(struct wiphy *wiphy,
-						      struct
-						      regulatory_request *
-						      request))
+void rtw_regd_init(struct wiphy *wiphy,
+		   void (*reg_notifier)(struct wiphy *wiphy,
+					struct regulatory_request *request))
 {
-	const struct ieee80211_regdomain *regd;
-
 	wiphy->reg_notifier = reg_notifier;
 
 	wiphy->regulatory_flags |= REGULATORY_CUSTOM_REG;
 	wiphy->regulatory_flags &= ~REGULATORY_STRICT_REG;
 	wiphy->regulatory_flags &= ~REGULATORY_DISABLE_BEACON_HINTS;
 
-	regd = _rtw_regdomain_select(reg);
-	wiphy_apply_custom_regulatory(wiphy, regd);
+	wiphy_apply_custom_regulatory(wiphy, &rtw_regdom_rd);
 
 	/* Hard code flags */
 	_rtw_reg_apply_flags(wiphy);
-}
 
-void rtw_regd_init(struct wiphy *wiphy,
-		   void (*reg_notifier)(struct wiphy *wiphy,
-					struct regulatory_request *request))
-{
-	_rtw_regd_init_wiphy(NULL, wiphy, reg_notifier);
 }
 
 void rtw_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request)
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 10/11] staging: rtl8723bs: Clean up wrapper functions
  2026-02-21 19:01 [PATCH v2 00/11] staging: stl8723bs: Various cleanups Priit Laes
                   ` (8 preceding siblings ...)
  2026-02-21 19:01 ` [PATCH v2 09/11] staging: rtl8273bs: Simplify regulatory initialization functions Priit Laes
@ 2026-02-21 19:01 ` Priit Laes
  2026-02-21 20:20   ` Vivek BalachandharTN
                     ` (2 more replies)
  2026-02-21 19:01 ` [PATCH v2 11/11] staging: rtl8723bs: rtw_ieee80211: Reduce global symbols Priit Laes
  10 siblings, 3 replies; 25+ messages in thread
From: Priit Laes @ 2026-02-21 19:01 UTC (permalink / raw)
  Cc: Priit Laes, Greg Kroah-Hartman, Minu Jin, Archit Anant,
	Andy Shevchenko, Philip Thayer, Bryant Boatright, JJ Strnad,
	Dan Carpenter, William Hansen-Baird, Navaneeth K, Julia Lawall,
	Tanjim Kamal, Randy Dunlap, Rodrigo Gobbi, Artur Stupa,
	Abraham Samuel Adekunle, Michael Straube, Hans de Goede,
	Ingo Molnar, Ethan Tidmore, Vivek BalachandharTN, Zhuoheng Li,
	Michael Huang, Nino Zhang, Thomas Gleixner,
	Rogério Fernandes Pereira, Diksha Kumari, yingche,
	Karthikey D Kadati, Khushal Chitturi, SeungJu Cheon,
	Akiyoshi Kurita, Erick Karanja, Sun Jian, Yuvraj Singh Chauhan,
	linux-staging, linux-kernel

Remove wrapper functions in cmd queue handling.

Signed-off-by: Priit Laes <plaes@plaes.org>
---
 drivers/staging/rtl8723bs/core/rtw_cmd.c      | 88 ++++++++-----------
 drivers/staging/rtl8723bs/include/cmd_osdep.h |  7 +-
 2 files changed, 39 insertions(+), 56 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index d0694a659259..60e2de7991d4 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -210,32 +210,6 @@ int rtw_init_evt_priv(struct evt_priv *pevtpriv)
 	return 0;
 }
 
-void _rtw_free_evt_priv(struct	evt_priv *pevtpriv)
-{
-	cancel_work_sync(&pevtpriv->c2h_wk);
-	while (pevtpriv->c2h_wk_alive)
-		msleep(10);
-
-	while (!rtw_cbuf_empty(pevtpriv->c2h_queue)) {
-		void *c2h = rtw_cbuf_pop(pevtpriv->c2h_queue);
-
-		if (c2h && c2h != (void *)pevtpriv)
-			kfree(c2h);
-	}
-	kfree(pevtpriv->c2h_queue);
-}
-
-void _rtw_free_cmd_priv(struct	cmd_priv *pcmdpriv)
-{
-	if (pcmdpriv) {
-		kfree(pcmdpriv->cmd_allocated_buf);
-
-		kfree(pcmdpriv->rsp_allocated_buf);
-
-		mutex_destroy(&pcmdpriv->sctx_mutex);
-	}
-}
-
 /*
  * Calling Context:
  *
@@ -246,7 +220,7 @@ void _rtw_free_cmd_priv(struct	cmd_priv *pcmdpriv)
  *
  */
 
-int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj)
+static int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj)
 {
 	unsigned long irqL;
 
@@ -265,38 +239,35 @@ int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj)
 	return _SUCCESS;
 }
 
-struct	cmd_obj	*_rtw_dequeue_cmd(struct __queue *queue)
+void rtw_free_evt_priv(struct	evt_priv *pevtpriv)
 {
-	unsigned long irqL;
-	struct cmd_obj *obj;
-
-	/* spin_lock_bh(&(queue->lock)); */
-	spin_lock_irqsave(&queue->lock, irqL);
-	if (list_empty(&queue->queue)) {
-		obj = NULL;
-	} else {
-		obj = container_of(get_next(&queue->queue), struct cmd_obj, list);
-		list_del_init(&obj->list);
-	}
+	cancel_work_sync(&pevtpriv->c2h_wk);
+	while (pevtpriv->c2h_wk_alive)
+		msleep(10);
 
-	/* spin_unlock_bh(&(queue->lock)); */
-	spin_unlock_irqrestore(&queue->lock, irqL);
+	while (!rtw_cbuf_empty(pevtpriv->c2h_queue)) {
+		void *c2h = rtw_cbuf_pop(pevtpriv->c2h_queue);
 
-	return obj;
-}
+		if (c2h && c2h != (void *)pevtpriv)
+			kfree(c2h);
+	}
+	kfree(pevtpriv->c2h_queue);
 
-void rtw_free_evt_priv(struct	evt_priv *pevtpriv)
-{
-	_rtw_free_evt_priv(pevtpriv);
 }
 
 void rtw_free_cmd_priv(struct	cmd_priv *pcmdpriv)
 {
-	_rtw_free_cmd_priv(pcmdpriv);
+	if (pcmdpriv) {
+		kfree(pcmdpriv->cmd_allocated_buf);
+
+		kfree(pcmdpriv->rsp_allocated_buf);
+
+		mutex_destroy(&pcmdpriv->sctx_mutex);
+	}
+
 }
 
-int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj);
-int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
+static int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
 {
 	u8 bAllow = false; /* set to true to allow enqueuing cmd when hw_init_completed is false */
 
@@ -337,7 +308,24 @@ int rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
 
 struct	cmd_obj	*rtw_dequeue_cmd(struct cmd_priv *pcmdpriv)
 {
-	return _rtw_dequeue_cmd(&pcmdpriv->cmd_queue);
+	unsigned long irqL;
+	struct cmd_obj *obj;
+	struct __queue *queue = &pcmdpriv->cmd_queue;
+
+	/* spin_lock_bh(&(queue->lock)); */
+	spin_lock_irqsave(&queue->lock, irqL);
+	if (list_empty(&queue->queue)) {
+		obj = NULL;
+	} else {
+		obj = container_of(get_next(&queue->queue), struct cmd_obj, list);
+		list_del_init(&obj->list);
+	}
+
+	/* spin_unlock_bh(&(queue->lock)); */
+	spin_unlock_irqrestore(&queue->lock, irqL);
+
+	return obj;
+
 }
 
 void rtw_free_cmd_obj(struct cmd_obj *pcmd)
diff --git a/drivers/staging/rtl8723bs/include/cmd_osdep.h b/drivers/staging/rtl8723bs/include/cmd_osdep.h
index 5506f513dc01..b0ac41d2be24 100644
--- a/drivers/staging/rtl8723bs/include/cmd_osdep.h
+++ b/drivers/staging/rtl8723bs/include/cmd_osdep.h
@@ -7,12 +7,7 @@
 #ifndef __CMD_OSDEP_H_
 #define __CMD_OSDEP_H_
 
-
-int rtw_init_cmd_priv(struct	cmd_priv *pcmdpriv);
+int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv);
 int rtw_init_evt_priv(struct evt_priv *pevtpriv);
-extern void _rtw_free_evt_priv(struct	evt_priv *pevtpriv);
-extern void _rtw_free_cmd_priv(struct	cmd_priv *pcmdpriv);
-int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj);
-extern struct	cmd_obj	*_rtw_dequeue_cmd(struct __queue *queue);
 
 #endif
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH v2 11/11] staging: rtl8723bs: rtw_ieee80211: Reduce global symbols
  2026-02-21 19:01 [PATCH v2 00/11] staging: stl8723bs: Various cleanups Priit Laes
                   ` (9 preceding siblings ...)
  2026-02-21 19:01 ` [PATCH v2 10/11] staging: rtl8723bs: Clean up wrapper functions Priit Laes
@ 2026-02-21 19:01 ` Priit Laes
  2026-02-23  7:32   ` Dan Carpenter
  10 siblings, 1 reply; 25+ messages in thread
From: Priit Laes @ 2026-02-21 19:01 UTC (permalink / raw)
  Cc: Priit Laes, Greg Kroah-Hartman, Minu Jin, Archit Anant,
	Andy Shevchenko, Yuvraj Singh Chauhan, JJ Strnad, Dan Carpenter,
	Julia Lawall, Ethan Tidmore, Navaneeth K, Artur Stupa,
	William Hansen-Baird, Randy Dunlap, Tanjim Kamal,
	Abraham Samuel Adekunle, Michael Straube, Hans de Goede,
	Vivek BalachandharTN, Zhuoheng Li, Michael Huang, Nino Zhang,
	Thomas Gleixner, Rogério Fernandes Pereira, Ingo Molnar,
	Diksha Kumari, Karthikey D Kadati, Khushal Chitturi,
	SeungJu Cheon, Akiyoshi Kurita, Erick Karanja, Sun Jian,
	linux-staging, linux-kernel

Mark internally used symbols/functions as static and drop some unused
ones.
WPA_CIPHER_SUITE_WRAP/RSN_CIPHER_SUITE_WRAP are left as commented, as
these might be actually useful for understanding the code.

Changes since v1:
* Comment out unused variables WPA_CIPHER_SUITE_WRAP/RSN_CIPHER_SUITE_WRAP

Signed-off-by: Priit Laes <plaes@plaes.org>
---
 .../staging/rtl8723bs/core/rtw_ieee80211.c    | 41 +++++++++----------
 drivers/staging/rtl8723bs/include/ieee80211.h | 30 --------------
 2 files changed, 19 insertions(+), 52 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
index 6cf217e21593..61280c349d9a 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
@@ -11,26 +11,23 @@
 #include <linux/unaligned.h>
 
 u8 RTW_WPA_OUI_TYPE[] = { 0x00, 0x50, 0xf2, 1 };
-u16 RTW_WPA_VERSION = 1;
-u8 WPA_AUTH_KEY_MGMT_NONE[] = { 0x00, 0x50, 0xf2, 0 };
-u8 WPA_AUTH_KEY_MGMT_UNSPEC_802_1X[] = { 0x00, 0x50, 0xf2, 1 };
-u8 WPA_AUTH_KEY_MGMT_PSK_OVER_802_1X[] = { 0x00, 0x50, 0xf2, 2 };
-u8 WPA_CIPHER_SUITE_NONE[] = { 0x00, 0x50, 0xf2, 0 };
-u8 WPA_CIPHER_SUITE_WEP40[] = { 0x00, 0x50, 0xf2, 1 };
-u8 WPA_CIPHER_SUITE_TKIP[] = { 0x00, 0x50, 0xf2, 2 };
-u8 WPA_CIPHER_SUITE_WRAP[] = { 0x00, 0x50, 0xf2, 3 };
-u8 WPA_CIPHER_SUITE_CCMP[] = { 0x00, 0x50, 0xf2, 4 };
-u8 WPA_CIPHER_SUITE_WEP104[] = { 0x00, 0x50, 0xf2, 5 };
-
-u16 RSN_VERSION_BSD = 1;
-u8 RSN_AUTH_KEY_MGMT_UNSPEC_802_1X[] = { 0x00, 0x0f, 0xac, 1 };
-u8 RSN_AUTH_KEY_MGMT_PSK_OVER_802_1X[] = { 0x00, 0x0f, 0xac, 2 };
-u8 RSN_CIPHER_SUITE_NONE[] = { 0x00, 0x0f, 0xac, 0 };
-u8 RSN_CIPHER_SUITE_WEP40[] = { 0x00, 0x0f, 0xac, 1 };
-u8 RSN_CIPHER_SUITE_TKIP[] = { 0x00, 0x0f, 0xac, 2 };
-u8 RSN_CIPHER_SUITE_WRAP[] = { 0x00, 0x0f, 0xac, 3 };
-u8 RSN_CIPHER_SUITE_CCMP[] = { 0x00, 0x0f, 0xac, 4 };
-u8 RSN_CIPHER_SUITE_WEP104[] = { 0x00, 0x0f, 0xac, 5 };
+
+#define WPA_SELECTOR_LEN 4
+static const u8 WPA_CIPHER_SUITE_NONE[] = { 0x00, 0x50, 0xf2, 0 };
+static const u8 WPA_CIPHER_SUITE_WEP40[] = { 0x00, 0x50, 0xf2, 1 };
+static const u8 WPA_CIPHER_SUITE_TKIP[] = { 0x00, 0x50, 0xf2, 2 };
+// static const u8 WPA_CIPHER_SUITE_WRAP[] = { 0x00, 0x50, 0xf2, 3 };
+static const u8 WPA_CIPHER_SUITE_CCMP[] = { 0x00, 0x50, 0xf2, 4 };
+static const u8 WPA_CIPHER_SUITE_WEP104[] = { 0x00, 0x50, 0xf2, 5 };
+
+#define RSN_SELECTOR_LEN 4
+static const u8 RSN_CIPHER_SUITE_NONE[] = { 0x00, 0x0f, 0xac, 0 };
+static const u8 RSN_CIPHER_SUITE_WEP40[] = { 0x00, 0x0f, 0xac, 1 };
+static const u8 RSN_CIPHER_SUITE_TKIP[] = { 0x00, 0x0f, 0xac, 2 };
+// static const u8 RSN_CIPHER_SUITE_WRAP[] = { 0x00, 0x0f, 0xac, 3 };
+static const u8 RSN_CIPHER_SUITE_CCMP[] = { 0x00, 0x0f, 0xac, 4 };
+static const u8 RSN_CIPHER_SUITE_WEP104[] = { 0x00, 0x0f, 0xac, 5 };
+
 /*  */
 /*  for adhoc-master to generate ie and provide supported-rate to fw */
 /*  */
@@ -406,7 +403,7 @@ unsigned char *rtw_get_wpa2_ie(unsigned char *pie, int *rsn_ie_len, int limit)
 	return rtw_get_ie(pie, WLAN_EID_RSN, rsn_ie_len, limit);
 }
 
-int rtw_get_wpa_cipher_suite(u8 *s)
+static int rtw_get_wpa_cipher_suite(u8 *s)
 {
 	if (!memcmp(s, WPA_CIPHER_SUITE_NONE, WPA_SELECTOR_LEN))
 		return WPA_CIPHER_NONE;
@@ -422,7 +419,7 @@ int rtw_get_wpa_cipher_suite(u8 *s)
 	return 0;
 }
 
-int rtw_get_wpa2_cipher_suite(u8 *s)
+static int rtw_get_wpa2_cipher_suite(u8 *s)
 {
 	if (!memcmp(s, RSN_CIPHER_SUITE_NONE, RSN_SELECTOR_LEN))
 		return WPA_CIPHER_NONE;
diff --git a/drivers/staging/rtl8723bs/include/ieee80211.h b/drivers/staging/rtl8723bs/include/ieee80211.h
index 0f28c904a714..7e6858c712c0 100644
--- a/drivers/staging/rtl8723bs/include/ieee80211.h
+++ b/drivers/staging/rtl8723bs/include/ieee80211.h
@@ -94,35 +94,7 @@ enum {
 #define WPA_CIPHER_TKIP		BIT(3)
 #define WPA_CIPHER_CCMP		BIT(4)
 
-
-
-#define WPA_SELECTOR_LEN 4
-extern u8 RTW_WPA_OUI_TYPE[];
-extern u16 RTW_WPA_VERSION;
-extern u8 WPA_AUTH_KEY_MGMT_NONE[];
-extern u8 WPA_AUTH_KEY_MGMT_UNSPEC_802_1X[];
-extern u8 WPA_AUTH_KEY_MGMT_PSK_OVER_802_1X[];
-extern u8 WPA_CIPHER_SUITE_NONE[];
-extern u8 WPA_CIPHER_SUITE_WEP40[];
-extern u8 WPA_CIPHER_SUITE_TKIP[];
-extern u8 WPA_CIPHER_SUITE_WRAP[];
-extern u8 WPA_CIPHER_SUITE_CCMP[];
-extern u8 WPA_CIPHER_SUITE_WEP104[];
-
-
 #define RSN_HEADER_LEN 4
-#define RSN_SELECTOR_LEN 4
-
-extern u16 RSN_VERSION_BSD;
-extern u8 RSN_AUTH_KEY_MGMT_UNSPEC_802_1X[];
-extern u8 RSN_AUTH_KEY_MGMT_PSK_OVER_802_1X[];
-extern u8 RSN_CIPHER_SUITE_NONE[];
-extern u8 RSN_CIPHER_SUITE_WEP40[];
-extern u8 RSN_CIPHER_SUITE_TKIP[];
-extern u8 RSN_CIPHER_SUITE_WRAP[];
-extern u8 RSN_CIPHER_SUITE_CCMP[];
-extern u8 RSN_CIPHER_SUITE_WEP104[];
-
 
 enum {
 	RATEID_IDX_BGN_40M_2SS = 0,
@@ -740,8 +712,6 @@ void rtw_set_supported_rate(u8 *SupportedRates, uint mode);
 
 unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit);
 unsigned char *rtw_get_wpa2_ie(unsigned char *pie, int *rsn_ie_len, int limit);
-int rtw_get_wpa_cipher_suite(u8 *s);
-int rtw_get_wpa2_cipher_suite(u8 *s);
 int rtw_get_wapi_ie(u8 *in_ie, uint in_len, u8 *wapi_ie, u16 *wapi_len);
 int rtw_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwise_cipher, int *is_8021x);
 int rtw_parse_wpa2_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwise_cipher, int *is_8021x);
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: [PATCH v2 01/11] staging: stl8723bs: Use common round_up macro
  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
  0 siblings, 1 reply; 25+ messages in thread
From: Vivek BalachandharTN @ 2026-02-21 19:41 UTC (permalink / raw)
  To: Priit Laes
  Cc: Greg Kroah-Hartman, Archit Anant, Minu Jin, Andy Shevchenko,
	Thomas Gleixner, Yuvraj Singh Chauhan, JJ Strnad, Dan Carpenter,
	Julia Lawall, William Hansen-Baird, Randy Dunlap,
	Abraham Samuel Adekunle, Rodrigo Gobbi, Navaneeth K, Artur Stupa,
	Michael Straube, Hans de Goede, Ethan Tidmore, Zhuoheng Li,
	Michael Huang, Nino Zhang, Ingo Molnar,
	Rogério Fernandes Pereira, Diksha Kumari, yingche,
	Khushal Chitturi, Karthikey D Kadati, Akiyoshi Kurita,
	Erick Karanja, SeungJu Cheon, Sun Jian, linux-staging,
	linux-kernel

Subject has a typo. Please correct it.

How did you test this? The driver code appears largely AI-generated 
unless it has been validated on actual hardware, such as Pine64 Wi-Fi 
module or another board compatible with rtl8723bs considering these 
changes are not just indentation based.

Best,
Vivek

On 2026-02-21 3:01 p.m., Priit Laes wrote:
> Get rid of driver-specific _RND macro in favor of kernel one.
>
> Signed-off-by: Priit Laes <plaes@plaes.org>
> ---
>   drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c    | 6 +++---
>   drivers/staging/rtl8723bs/hal/sdio_ops.c          | 4 ++--
>   drivers/staging/rtl8723bs/include/osdep_service.h | 2 --
>   3 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
> index a1f2cbf2cf55..c5b172c2f839 100644
> --- a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
> +++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
> @@ -232,7 +232,7 @@ 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) ||
> +					((round_up(pxmitbuf->len, 8) + txlen) > max_xmit_len) ||
>   					(k >= (rtw_hal_sdio_max_txoqt_free_space(padapter) - 1))
>   				) {
>   					if (pxmitbuf) {
> @@ -303,8 +303,8 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv
>   					txlen = txdesc_size + pxmitframe->attrib.last_txcmdsz;
>   					pxmitframe->pg_num = (txlen + 127) / 128;
>   					pxmitbuf->pg_num += (txlen + 127) / 128;
> -					pxmitbuf->ptail += _RND(txlen, 8); /*  round to 8 bytes alignment */
> -					pxmitbuf->len = _RND(pxmitbuf->len, 8) + txlen;
> +					pxmitbuf->ptail += round_up(txlen, 8);
> +					pxmitbuf->len = round_up(pxmitbuf->len, 8) + txlen;
>   				}
>   
>   				if (k != 1)
> diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c
> index c9cb20c61a2b..6bfb8c0e519c 100644
> --- a/drivers/staging/rtl8723bs/hal/sdio_ops.c
> +++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c
> @@ -401,7 +401,7 @@ static u32 sdio_read_port(
>   	hal_sdio_get_cmd_addr_8723b(adapter, addr, hal->SdioRxFIFOCnt++, &addr);
>   
>   	if (cnt > psdio->block_transfer_len)
> -		cnt = _RND(cnt, psdio->block_transfer_len);
> +		cnt = round_up(cnt, psdio->block_transfer_len);
>   
>   	err = _sd_read(intfhdl, addr, cnt, mem);
>   
> @@ -448,7 +448,7 @@ static u32 sdio_write_port(
>   	hal_sdio_get_cmd_addr_8723b(adapter, addr, cnt >> 2, &addr);
>   
>   	if (cnt > psdio->block_transfer_len)
> -		cnt = _RND(cnt, psdio->block_transfer_len);
> +		cnt = round_up(cnt, psdio->block_transfer_len);
>   
>   	err = sd_write(intfhdl, addr, cnt, xmitbuf->pdata);
>   
> diff --git a/drivers/staging/rtl8723bs/include/osdep_service.h b/drivers/staging/rtl8723bs/include/osdep_service.h
> index 955e8678dc26..404f81756b27 100644
> --- a/drivers/staging/rtl8723bs/include/osdep_service.h
> +++ b/drivers/staging/rtl8723bs/include/osdep_service.h
> @@ -78,8 +78,6 @@ static inline int rtw_bug_check(void *parg1, void *parg2, void *parg3, void *par
>   
>   }
>   
> -#define _RND(sz, r) ((((sz)+((r)-1))/(r))*(r))
> -
>   extern void rtw_free_netdev(struct net_device *netdev);
>   
>   /* Macros for handling unaligned memory accesses */

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v2 10/11] staging: rtl8723bs: Clean up wrapper functions
  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>
  2 siblings, 0 replies; 25+ messages in thread
From: Vivek BalachandharTN @ 2026-02-21 20:20 UTC (permalink / raw)
  To: Priit Laes
  Cc: Greg Kroah-Hartman, Minu Jin, Archit Anant, Andy Shevchenko,
	Philip Thayer, Bryant Boatright, JJ Strnad, Dan Carpenter,
	William Hansen-Baird, Navaneeth K, Julia Lawall, Tanjim Kamal,
	Randy Dunlap, Rodrigo Gobbi, Artur Stupa, Abraham Samuel Adekunle,
	Michael Straube, Hans de Goede, Ingo Molnar, Ethan Tidmore,
	Zhuoheng Li, Michael Huang, Nino Zhang, Thomas Gleixner,
	Rogério Fernandes Pereira, Diksha Kumari, yingche,
	Karthikey D Kadati, Khushal Chitturi, SeungJu Cheon,
	Akiyoshi Kurita, Erick Karanja, Sun Jian, Yuvraj Singh Chauhan,
	linux-staging, linux-kernel

This change doesn’t really “remove wrapper functions” so much as it 
moves the wrapper bodies into the public APIs, and inlines 
|_rtw_dequeue_cmd()| into |rtw_dequeue_cmd()|.

Minor: the |if (pcmdpriv)| guard in |rtw_free_cmd_priv()| looks 
unnecessary if callers guarantee non-NULL. If you keep it, please point 
to call sites that can pass NULL (or drop the check).

Best, Vivek

On 2026-02-21 3:01 p.m., Priit Laes wrote:
> Remove wrapper functions in cmd queue handling.
>
> Signed-off-by: Priit Laes <plaes@plaes.org>
> ---
>   drivers/staging/rtl8723bs/core/rtw_cmd.c      | 88 ++++++++-----------
>   drivers/staging/rtl8723bs/include/cmd_osdep.h |  7 +-
>   2 files changed, 39 insertions(+), 56 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
> index d0694a659259..60e2de7991d4 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
> @@ -210,32 +210,6 @@ int rtw_init_evt_priv(struct evt_priv *pevtpriv)
>   	return 0;
>   }
>   
> -void _rtw_free_evt_priv(struct	evt_priv *pevtpriv)
> -{
> -	cancel_work_sync(&pevtpriv->c2h_wk);
> -	while (pevtpriv->c2h_wk_alive)
> -		msleep(10);
> -
> -	while (!rtw_cbuf_empty(pevtpriv->c2h_queue)) {
> -		void *c2h = rtw_cbuf_pop(pevtpriv->c2h_queue);
> -
> -		if (c2h && c2h != (void *)pevtpriv)
> -			kfree(c2h);
> -	}
> -	kfree(pevtpriv->c2h_queue);
> -}
> -
> -void _rtw_free_cmd_priv(struct	cmd_priv *pcmdpriv)
> -{
> -	if (pcmdpriv) {
> -		kfree(pcmdpriv->cmd_allocated_buf);
> -
> -		kfree(pcmdpriv->rsp_allocated_buf);
> -
> -		mutex_destroy(&pcmdpriv->sctx_mutex);
> -	}
> -}
> -
>   /*
>    * Calling Context:
>    *
> @@ -246,7 +220,7 @@ void _rtw_free_cmd_priv(struct	cmd_priv *pcmdpriv)
>    *
>    */
>   
> -int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj)
> +static int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj)
>   {
>   	unsigned long irqL;
>   
> @@ -265,38 +239,35 @@ int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj)
>   	return _SUCCESS;
>   }
>   
> -struct	cmd_obj	*_rtw_dequeue_cmd(struct __queue *queue)
> +void rtw_free_evt_priv(struct	evt_priv *pevtpriv)
>   {
> -	unsigned long irqL;
> -	struct cmd_obj *obj;
> -
> -	/* spin_lock_bh(&(queue->lock)); */
> -	spin_lock_irqsave(&queue->lock, irqL);
> -	if (list_empty(&queue->queue)) {
> -		obj = NULL;
> -	} else {
> -		obj = container_of(get_next(&queue->queue), struct cmd_obj, list);
> -		list_del_init(&obj->list);
> -	}
> +	cancel_work_sync(&pevtpriv->c2h_wk);
> +	while (pevtpriv->c2h_wk_alive)
> +		msleep(10);
>   
> -	/* spin_unlock_bh(&(queue->lock)); */
> -	spin_unlock_irqrestore(&queue->lock, irqL);
> +	while (!rtw_cbuf_empty(pevtpriv->c2h_queue)) {
> +		void *c2h = rtw_cbuf_pop(pevtpriv->c2h_queue);
>   
> -	return obj;
> -}
> +		if (c2h && c2h != (void *)pevtpriv)
> +			kfree(c2h);
> +	}
> +	kfree(pevtpriv->c2h_queue);
>   
> -void rtw_free_evt_priv(struct	evt_priv *pevtpriv)
> -{
> -	_rtw_free_evt_priv(pevtpriv);
>   }
>   
>   void rtw_free_cmd_priv(struct	cmd_priv *pcmdpriv)
>   {
> -	_rtw_free_cmd_priv(pcmdpriv);
> +	if (pcmdpriv) {
> +		kfree(pcmdpriv->cmd_allocated_buf);
> +
> +		kfree(pcmdpriv->rsp_allocated_buf);
> +
> +		mutex_destroy(&pcmdpriv->sctx_mutex);
> +	}
> +
>   }
>   
> -int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj);
> -int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
> +static int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
>   {
>   	u8 bAllow = false; /* set to true to allow enqueuing cmd when hw_init_completed is false */
>   
> @@ -337,7 +308,24 @@ int rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
>   
>   struct	cmd_obj	*rtw_dequeue_cmd(struct cmd_priv *pcmdpriv)
>   {
> -	return _rtw_dequeue_cmd(&pcmdpriv->cmd_queue);
> +	unsigned long irqL;
> +	struct cmd_obj *obj;
> +	struct __queue *queue = &pcmdpriv->cmd_queue;
> +
> +	/* spin_lock_bh(&(queue->lock)); */
> +	spin_lock_irqsave(&queue->lock, irqL);
> +	if (list_empty(&queue->queue)) {
> +		obj = NULL;
> +	} else {
> +		obj = container_of(get_next(&queue->queue), struct cmd_obj, list);
> +		list_del_init(&obj->list);
> +	}
> +
> +	/* spin_unlock_bh(&(queue->lock)); */
> +	spin_unlock_irqrestore(&queue->lock, irqL);
> +
> +	return obj;
> +
>   }
>   
>   void rtw_free_cmd_obj(struct cmd_obj *pcmd)
> diff --git a/drivers/staging/rtl8723bs/include/cmd_osdep.h b/drivers/staging/rtl8723bs/include/cmd_osdep.h
> index 5506f513dc01..b0ac41d2be24 100644
> --- a/drivers/staging/rtl8723bs/include/cmd_osdep.h
> +++ b/drivers/staging/rtl8723bs/include/cmd_osdep.h
> @@ -7,12 +7,7 @@
>   #ifndef __CMD_OSDEP_H_
>   #define __CMD_OSDEP_H_
>   
> -
> -int rtw_init_cmd_priv(struct	cmd_priv *pcmdpriv);
> +int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv);
>   int rtw_init_evt_priv(struct evt_priv *pevtpriv);
> -extern void _rtw_free_evt_priv(struct	evt_priv *pevtpriv);
> -extern void _rtw_free_cmd_priv(struct	cmd_priv *pcmdpriv);
> -int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj);
> -extern struct	cmd_obj	*_rtw_dequeue_cmd(struct __queue *queue);
>   
>   #endif

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v2 01/11] staging: stl8723bs: Use common round_up macro
  2026-02-21 19:41   ` Vivek BalachandharTN
@ 2026-02-23  7:09     ` Dan Carpenter
  2026-02-23 10:43       ` Priit Laes
  0 siblings, 1 reply; 25+ messages in thread
From: Dan Carpenter @ 2026-02-23  7:09 UTC (permalink / raw)
  To: Vivek BalachandharTN
  Cc: Priit Laes, Greg Kroah-Hartman, Archit Anant, Minu Jin,
	Andy Shevchenko, Thomas Gleixner, Yuvraj Singh Chauhan, JJ Strnad,
	Julia Lawall, William Hansen-Baird, Randy Dunlap,
	Abraham Samuel Adekunle, Rodrigo Gobbi, Navaneeth K, Artur Stupa,
	Michael Straube, Hans de Goede, Ethan Tidmore, Zhuoheng Li,
	Michael Huang, Nino Zhang, Ingo Molnar,
	Rogério Fernandes Pereira, Diksha Kumari, yingche,
	Khushal Chitturi, Karthikey D Kadati, Akiyoshi Kurita,
	Erick Karanja, SeungJu Cheon, Sun Jian, linux-staging,
	linux-kernel

On Sat, Feb 21, 2026 at 03:41:27PM -0400, Vivek BalachandharTN wrote:
> Subject has a typo. Please correct it.
> 
> How did you test this? The driver code appears largely AI-generated unless
> it has been validated on actual hardware, such as Pine64 Wi-Fi module or
> another board compatible with rtl8723bs considering these changes are not
> just indentation based.
> 

The patch doesn't introduce any bugs.

#define _RND(sz, r) ((((sz)+((r)-1))/(r))*(r))

This is the canonical way to implement a round up macro.  It's how
roundup() is implemented in the kernel.

The patch uses round_up() instead which is a faster version but it only
works for power of 2 rounds.  psdio->block_transfer_len is 512 so it's
fine.  I probably would prefer to use roundup() for that even though
round_up() works as well.

We maybe should create a static checker rule to warn about using
round_up() for non-power of 2 values:

KTODO: create a Smatch rule to use roundup() instead of round_up()
       for user supplied values, or non-power of 2.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v2 09/11] staging: rtl8273bs: Simplify regulatory initialization functions
  2026-02-21 19:01 ` [PATCH v2 09/11] staging: rtl8273bs: Simplify regulatory initialization functions Priit Laes
@ 2026-02-23  7:17   ` Dan Carpenter
  0 siblings, 0 replies; 25+ messages in thread
From: Dan Carpenter @ 2026-02-23  7:17 UTC (permalink / raw)
  To: Priit Laes
  Cc: Greg Kroah-Hartman, Minu Jin, Archit Anant, Andy Shevchenko,
	Bryant Boatright, Philip Thayer, JJ Strnad, Tanjim Kamal,
	Artur Stupa, Abraham Samuel Adekunle, Rodrigo Gobbi, Navaneeth K,
	William Hansen-Baird, Michael Straube, Hans de Goede,
	Vivek BalachandharTN, Ethan Tidmore, Zhuoheng Li, Michael Huang,
	Nino Zhang, Thomas Gleixner, Rogério Fernandes Pereira,
	Ingo Molnar, Omer El Idrissi, Diksha Kumari, yingche, Milos Puric,
	Khushal Chitturi, SeungJu Cheon, Akiyoshi Kurita, Erick Karanja,
	Sun Jian, Yuvraj Singh Chauhan, linux-staging, linux-kernel

On Sat, Feb 21, 2026 at 09:01:39PM +0200, Priit Laes wrote:
> Simplify code, by cutting out wrapper function in regulatory
> initialization code.
> 
> Signed-off-by: Priit Laes <plaes@plaes.org>
> ---

This would be easier to review if you did it in two patches:
[patch 1] delete _rtw_regdomain_select()
[patch 2] delete rtw_regd_init()

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v2 10/11] staging: rtl8723bs: Clean up wrapper functions
  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>
  2 siblings, 0 replies; 25+ messages in thread
From: Dan Carpenter @ 2026-02-23  7:25 UTC (permalink / raw)
  To: Priit Laes
  Cc: Greg Kroah-Hartman, Minu Jin, Archit Anant, Andy Shevchenko,
	Philip Thayer, Bryant Boatright, JJ Strnad, William Hansen-Baird,
	Navaneeth K, Julia Lawall, Tanjim Kamal, Randy Dunlap,
	Rodrigo Gobbi, Artur Stupa, Abraham Samuel Adekunle,
	Michael Straube, Hans de Goede, Ingo Molnar, Ethan Tidmore,
	Vivek BalachandharTN, Zhuoheng Li, Michael Huang, Nino Zhang,
	Thomas Gleixner, Rogério Fernandes Pereira, Diksha Kumari,
	yingche, Karthikey D Kadati, Khushal Chitturi, SeungJu Cheon,
	Akiyoshi Kurita, Erick Karanja, Sun Jian, Yuvraj Singh Chauhan,
	linux-staging, linux-kernel

On Sat, Feb 21, 2026 at 09:01:40PM +0200, Priit Laes wrote:
> Remove wrapper functions in cmd queue handling.
> 
> Signed-off-by: Priit Laes <plaes@plaes.org>
> ---

Again, this would be easier to review if it were split into
multiple patches.

[patch 1] delete commented out code
[patch 2] move _rtw_free_evt_priv()
[patch 3] move _rtw_free_cmd_priv()
[patch 4] move _rtw_dequeue_cmd()

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v2 11/11] staging: rtl8723bs: rtw_ieee80211: Reduce global symbols
  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
  0 siblings, 0 replies; 25+ messages in thread
From: Dan Carpenter @ 2026-02-23  7:32 UTC (permalink / raw)
  To: Priit Laes
  Cc: Greg Kroah-Hartman, Minu Jin, Archit Anant, Andy Shevchenko,
	Yuvraj Singh Chauhan, JJ Strnad, Julia Lawall, Ethan Tidmore,
	Navaneeth K, Artur Stupa, William Hansen-Baird, Randy Dunlap,
	Tanjim Kamal, Abraham Samuel Adekunle, Michael Straube,
	Hans de Goede, Vivek BalachandharTN, Zhuoheng Li, Michael Huang,
	Nino Zhang, Thomas Gleixner, Rogério Fernandes Pereira,
	Ingo Molnar, Diksha Kumari, Karthikey D Kadati, Khushal Chitturi,
	SeungJu Cheon, Akiyoshi Kurita, Erick Karanja, Sun Jian,
	linux-staging, linux-kernel

On Sat, Feb 21, 2026 at 09:01:41PM +0200, Priit Laes wrote:
> Mark internally used symbols/functions as static and drop some unused
> ones.
> WPA_CIPHER_SUITE_WRAP/RSN_CIPHER_SUITE_WRAP are left as commented, as
> these might be actually useful for understanding the code.
> 
> Changes since v1:
> * Comment out unused variables WPA_CIPHER_SUITE_WRAP/RSN_CIPHER_SUITE_WRAP

Put this under the --- cut off line

> 
> Signed-off-by: Priit Laes <plaes@plaes.org>
> ---
  ^^^
Here.

But really we're not going to allow commented out code.  Just delete
it.  There are reasons why people would merge dead code, such as for
example, in some cases code needs legal approval and it's easier to get
everything approved at once even when it's not needed immediately.  But
here we're not going to allow it.

This would be easier to review as separate patches:
[patch 1] Delete dead code.
[patch 2] make functions static
[patch 3] move the arrays and make them static const

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v2 10/11] staging: rtl8723bs: Clean up wrapper functions
       [not found]   ` <CAPsOcukZNc3oR=FmAjCdC6NrUV=1CaggQNGPoC2oxuH_P2R0hQ@mail.gmail.com>
@ 2026-02-23  7:50     ` Andy Shevchenko
  0 siblings, 0 replies; 25+ messages in thread
From: Andy Shevchenko @ 2026-02-23  7:50 UTC (permalink / raw)
  To: Karthikey Kadati
  Cc: Priit Laes, Greg Kroah-Hartman, Minu Jin, Archit Anant,
	Philip Thayer, Bryant Boatright, JJ Strnad, Dan Carpenter,
	William Hansen-Baird, Navaneeth K, Julia Lawall, Tanjim Kamal,
	Randy Dunlap, Rodrigo Gobbi, Artur Stupa, Abraham Samuel Adekunle,
	Michael Straube, Hans de Goede, Ingo Molnar, Ethan Tidmore,
	Vivek BalachandharTN, Zhuoheng Li, Michael Huang, Nino Zhang,
	Thomas Gleixner, Rogério Fernandes Pereira, Diksha Kumari,
	yingche, Khushal Chitturi, SeungJu Cheon, Akiyoshi Kurita,
	Erick Karanja, Sun Jian, Yuvraj Singh Chauhan, linux-staging,
	linux-kernel

On Sun, Feb 22, 2026 at 12:46:51AM +0530, Karthikey Kadati wrote:
> This looks like AI-generated nonsense. Please stop wasting the community's
> time.

Please, do not top-post (top-reply).

> On Sun, 22 Feb 2026, 12:41 am Priit Laes, <plaes@plaes.org> wrote:
> 
> > Remove wrapper functions in cmd queue handling.

If so, this breaks AI/tools guidelines in the Linux kernel and must be NAKed,
but how do you prove that this is AI?

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v2 01/11] staging: stl8723bs: Use common round_up macro
  2026-02-23  7:09     ` Dan Carpenter
@ 2026-02-23 10:43       ` Priit Laes
  2026-02-23 11:40         ` Julia Lawall
  2026-02-23 14:43         ` Dan Carpenter
  0 siblings, 2 replies; 25+ messages in thread
From: Priit Laes @ 2026-02-23 10:43 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Vivek BalachandharTN, Greg Kroah-Hartman, Archit Anant, Minu Jin,
	Andy Shevchenko, Thomas Gleixner, Yuvraj Singh Chauhan, JJ Strnad,
	Julia Lawall, William Hansen-Baird, Randy Dunlap,
	Abraham Samuel Adekunle, Rodrigo Gobbi, Navaneeth K, Artur Stupa,
	Michael Straube, Hans de Goede, Ethan Tidmore, Zhuoheng Li,
	Michael Huang, Nino Zhang, Ingo Molnar,
	Rogério Fernandes Pereira, Diksha Kumari, yingche,
	Khushal Chitturi, Karthikey D Kadati, Akiyoshi Kurita,
	Erick Karanja, SeungJu Cheon, Sun Jian, linux-staging,
	linux-kernel

On Mon, Feb 23, 2026 at 10:09:31AM +0300, Dan Carpenter wrote:
> On Sat, Feb 21, 2026 at 03:41:27PM -0400, Vivek BalachandharTN wrote:
> > Subject has a typo. Please correct it.
> > 
> > How did you test this? The driver code appears largely AI-generated unless
> > it has been validated on actual hardware, such as Pine64 Wi-Fi module or
> > another board compatible with rtl8723bs considering these changes are not
> > just indentation based.
> > 
> 
> The patch doesn't introduce any bugs.
> 
> #define _RND(sz, r) ((((sz)+((r)-1))/(r))*(r))
> 
> This is the canonical way to implement a round up macro.  It's how
> roundup() is implemented in the kernel.
> 
> The patch uses round_up() instead which is a faster version but it only
> works for power of 2 rounds.  psdio->block_transfer_len is 512 so it's
> fine.  I probably would prefer to use roundup() for that even though
> round_up() works as well.
> 
> We maybe should create a static checker rule to warn about using
> round_up() for non-power of 2 values:
> 
> KTODO: create a Smatch rule to use roundup() instead of round_up()
>        for user supplied values, or non-power of 2.
> 

Firstly, thanks for the kind words, Dan.

It's kinda annoying how things have changed since the old days.
Apparently if someone now attempts to improve the low-hanging fruit, it gets
instantly accused of doing something awful...

Anyway, meanwhile I actually discovered some better versions of out-of-tree
drivers for rtl8732bs based on existing rtw888 driver [1], [2], therefore I
have no motivation left to fix up my "own brain slop".

And on more thing - whats the proper way to use get_maintainers.pl script
with `git send-email` when sending patch series? Apparently I used it wrongly
and managed to agitate lots of people in the process..

[1] https://github.com/jernejsk/linux-1/tree/8723b
[2] https://github.com/MocLG/rtw88-rtl8723bs

Päikest,
Priit

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v2 01/11] staging: stl8723bs: Use common round_up macro
  2026-02-23 10:43       ` Priit Laes
@ 2026-02-23 11:40         ` Julia Lawall
  2026-02-23 11:50           ` Andy Shevchenko
  2026-02-23 14:43         ` Dan Carpenter
  1 sibling, 1 reply; 25+ messages in thread
From: Julia Lawall @ 2026-02-23 11:40 UTC (permalink / raw)
  To: Priit Laes
  Cc: Dan Carpenter, Vivek BalachandharTN, Greg Kroah-Hartman,
	Archit Anant, Minu Jin, Andy Shevchenko, Thomas Gleixner,
	Yuvraj Singh Chauhan, JJ Strnad, Julia Lawall,
	William Hansen-Baird, Randy Dunlap, Abraham Samuel Adekunle,
	Rodrigo Gobbi, Navaneeth K, Artur Stupa, Michael Straube,
	Hans de Goede, Ethan Tidmore, Zhuoheng Li, Michael Huang,
	Nino Zhang, Ingo Molnar, Rogério Fernandes Pereira,
	Diksha Kumari, yingche, Khushal Chitturi, Karthikey D Kadati,
	Akiyoshi Kurita, Erick Karanja, SeungJu Cheon, Sun Jian,
	linux-staging, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2151 bytes --]



On Mon, 23 Feb 2026, Priit Laes wrote:

> On Mon, Feb 23, 2026 at 10:09:31AM +0300, Dan Carpenter wrote:
> > On Sat, Feb 21, 2026 at 03:41:27PM -0400, Vivek BalachandharTN wrote:
> > > Subject has a typo. Please correct it.
> > >
> > > How did you test this? The driver code appears largely AI-generated unless
> > > it has been validated on actual hardware, such as Pine64 Wi-Fi module or
> > > another board compatible with rtl8723bs considering these changes are not
> > > just indentation based.
> > >
> >
> > The patch doesn't introduce any bugs.
> >
> > #define _RND(sz, r) ((((sz)+((r)-1))/(r))*(r))
> >
> > This is the canonical way to implement a round up macro.  It's how
> > roundup() is implemented in the kernel.
> >
> > The patch uses round_up() instead which is a faster version but it only
> > works for power of 2 rounds.  psdio->block_transfer_len is 512 so it's
> > fine.  I probably would prefer to use roundup() for that even though
> > round_up() works as well.
> >
> > We maybe should create a static checker rule to warn about using
> > round_up() for non-power of 2 values:
> >
> > KTODO: create a Smatch rule to use roundup() instead of round_up()
> >        for user supplied values, or non-power of 2.
> >
>
> Firstly, thanks for the kind words, Dan.
>
> It's kinda annoying how things have changed since the old days.
> Apparently if someone now attempts to improve the low-hanging fruit, it gets
> instantly accused of doing something awful...
>
> Anyway, meanwhile I actually discovered some better versions of out-of-tree
> drivers for rtl8732bs based on existing rtw888 driver [1], [2], therefore I
> have no motivation left to fix up my "own brain slop".
>
> And on more thing - whats the proper way to use get_maintainers.pl script
> with `git send-email` when sending patch series? Apparently I used it wrongly
> and managed to agitate lots of people in the process..

The outreachy tutorial suggests the arguments --separator , --nokeywords
--nogit --nogit-fallback --norolestats

julia

>
> [1] https://github.com/jernejsk/linux-1/tree/8723b
> [2] https://github.com/MocLG/rtw88-rtl8723bs
>
> Päikest,
> Priit
>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v2 01/11] staging: stl8723bs: Use common round_up macro
  2026-02-23 11:40         ` Julia Lawall
@ 2026-02-23 11:50           ` Andy Shevchenko
  2026-02-23 12:16             ` Julia Lawall
  0 siblings, 1 reply; 25+ messages in thread
From: Andy Shevchenko @ 2026-02-23 11:50 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Priit Laes, Dan Carpenter, Vivek BalachandharTN,
	Greg Kroah-Hartman, Archit Anant, Minu Jin, Thomas Gleixner,
	Yuvraj Singh Chauhan, JJ Strnad, William Hansen-Baird,
	Randy Dunlap, Abraham Samuel Adekunle, Rodrigo Gobbi, Navaneeth K,
	Artur Stupa, Michael Straube, Hans de Goede, Ethan Tidmore,
	Zhuoheng Li, Michael Huang, Nino Zhang, Ingo Molnar,
	Rog�rio Fernandes Pereira, Diksha Kumari, yingche,
	Khushal Chitturi, Karthikey D Kadati, Akiyoshi Kurita,
	Erick Karanja, SeungJu Cheon, Sun Jian, linux-staging,
	linux-kernel

On Mon, Feb 23, 2026 at 12:40:44PM +0100, Julia Lawall wrote:
> On Mon, 23 Feb 2026, Priit Laes wrote:

...

> The outreachy tutorial suggests the arguments --separator , --nokeywords
> --nogit --nogit-fallback --norolestats

Wondering if you have a new chapter to suggest `b4` to be used for that.
Maybe it's time to have two ways explained?

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v2 01/11] staging: stl8723bs: Use common round_up macro
  2026-02-23 11:50           ` Andy Shevchenko
@ 2026-02-23 12:16             ` Julia Lawall
  2026-02-23 13:48               ` Andy Shevchenko
  0 siblings, 1 reply; 25+ messages in thread
From: Julia Lawall @ 2026-02-23 12:16 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Julia Lawall, Priit Laes, Dan Carpenter, Vivek BalachandharTN,
	Greg Kroah-Hartman, Archit Anant, Minu Jin, Thomas Gleixner,
	Yuvraj Singh Chauhan, JJ Strnad, William Hansen-Baird,
	Randy Dunlap, Abraham Samuel Adekunle, Rodrigo Gobbi, Navaneeth K,
	Artur Stupa, Michael Straube, Hans de Goede, Ethan Tidmore,
	Zhuoheng Li, Michael Huang, Nino Zhang, Ingo Molnar,
	Rog�rio Fernandes Pereira, Diksha Kumari, yingche,
	Khushal Chitturi, Karthikey D Kadati, Akiyoshi Kurita,
	Erick Karanja, SeungJu Cheon, Sun Jian, linux-staging,
	linux-kernel



On Mon, 23 Feb 2026, Andy Shevchenko wrote:

> On Mon, Feb 23, 2026 at 12:40:44PM +0100, Julia Lawall wrote:
> > On Mon, 23 Feb 2026, Priit Laes wrote:
>
> ...
>
> > The outreachy tutorial suggests the arguments --separator , --nokeywords
> > --nogit --nogit-fallback --norolestats
>
> Wondering if you have a new chapter to suggest `b4` to be used for that.
> Maybe it's time to have two ways explained?

If you have a few minutes to add an explanation, I would be happy to add
it.

thanks,
julia

>
> --
> With Best Regards,
> Andy Shevchenko
>
>
>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v2 01/11] staging: stl8723bs: Use common round_up macro
  2026-02-23 12:16             ` Julia Lawall
@ 2026-02-23 13:48               ` Andy Shevchenko
  0 siblings, 0 replies; 25+ messages in thread
From: Andy Shevchenko @ 2026-02-23 13:48 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Priit Laes, Dan Carpenter, Vivek BalachandharTN,
	Greg Kroah-Hartman, Archit Anant, Minu Jin, Thomas Gleixner,
	Yuvraj Singh Chauhan, JJ Strnad, William Hansen-Baird,
	Randy Dunlap, Abraham Samuel Adekunle, Rodrigo Gobbi, Navaneeth K,
	Artur Stupa, Michael Straube, Hans de Goede, Ethan Tidmore,
	Zhuoheng Li, Michael Huang, Nino Zhang, Ingo Molnar,
	Rog�rio Fernandes Pereira, Diksha Kumari, yingche,
	Khushal Chitturi, Karthikey D Kadati, Akiyoshi Kurita,
	Erick Karanja, SeungJu Cheon, Sun Jian, linux-staging,
	linux-kernel

On Mon, Feb 23, 2026 at 01:16:53PM +0100, Julia Lawall wrote:
> On Mon, 23 Feb 2026, Andy Shevchenko wrote:
> > On Mon, Feb 23, 2026 at 12:40:44PM +0100, Julia Lawall wrote:
> > > On Mon, 23 Feb 2026, Priit Laes wrote:

...

> > > The outreachy tutorial suggests the arguments --separator , --nokeywords
> > > --nogit --nogit-fallback --norolestats
> >
> > Wondering if you have a new chapter to suggest `b4` to be used for that.
> > Maybe it's time to have two ways explained?
> 
> If you have a few minutes to add an explanation, I would be happy to add
> it.

I would be glad to, if I was an advanced user of `b4`. It's still in my TODO
list to play with it more (currently I have my own script to prepare and send
patches).

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v2 01/11] staging: stl8723bs: Use common round_up macro
  2026-02-23 10:43       ` Priit Laes
  2026-02-23 11:40         ` Julia Lawall
@ 2026-02-23 14:43         ` Dan Carpenter
  1 sibling, 0 replies; 25+ messages in thread
From: Dan Carpenter @ 2026-02-23 14:43 UTC (permalink / raw)
  To: Priit Laes
  Cc: Vivek BalachandharTN, Greg Kroah-Hartman, Archit Anant, Minu Jin,
	Andy Shevchenko, Thomas Gleixner, Yuvraj Singh Chauhan, JJ Strnad,
	Julia Lawall, William Hansen-Baird, Randy Dunlap,
	Abraham Samuel Adekunle, Rodrigo Gobbi, Navaneeth K, Artur Stupa,
	Michael Straube, Hans de Goede, Ethan Tidmore, Zhuoheng Li,
	Michael Huang, Nino Zhang, Ingo Molnar,
	Rogério Fernandes Pereira, Diksha Kumari, yingche,
	Khushal Chitturi, Karthikey D Kadati, Akiyoshi Kurita,
	Erick Karanja, SeungJu Cheon, Sun Jian, linux-staging,
	linux-kernel

On Mon, Feb 23, 2026 at 10:43:31AM +0000, Priit Laes wrote:
>
> And on more thing - whats the proper way to use get_maintainers.pl script
> with `git send-email` when sending patch series? Apparently I used it wrongly
> and managed to agitate lots of people in the process..
> 

I don't know how you got so many people on your CC list.  When I try
running get_maintainter on your patch this is what I get.

$ ./scripts/get_maintainer.pl --no-roles --no-rolestats ~/var/mail/tmp/patch
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Minu Jin <s9430939@naver.com>
Akiyoshi Kurita <weibu@redadmin.org>
Erick Karanja <karanja99erick@gmail.com>
SeungJu Cheon <suunj1331@gmail.com>
Andy Shevchenko <andriy.shevchenko@intel.com>
Sun Jian <sun.jian.kdev@gmail.com>
Thomas Gleixner <tglx@kernel.org>
Yuvraj Singh Chauhan <ysinghcin@gmail.com>
linux-staging@lists.linux.dev
linux-kernel@vger.kernel.org

I normally don't add --nogit --nogit-fallback like Julia does but
I sometimes remove people like Kees and Thomas by hand since I know
they are included because of --git and aren't interested in tracking
everything.  On the other hand, people like Kees and Thomas are good
at ignoring email they don't care about so I doubt they will get
annoyed with you.

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2026-02-23 14:43 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v2 08/11] staging: rtl8723bs: Drop workqueue wrapper functions Priit Laes
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox