Linux kernel staging patches
 help / color / mirror / Atom feed
* [PATCH 0/9] remove unused code and simplify if-else blocks
@ 2026-05-10 13:43 Andrei Khomenkov
  2026-05-10 13:43 ` [PATCH 1/9] staging: rtl8723bs: remove unused DBG_FIXED_CHAN code Andrei Khomenkov
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: Andrei Khomenkov @ 2026-05-10 13:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-staging

This series of patches removes dead code hidden behind unused
ifdefs and simplifies if-else blocks to improve readability.

Andrei Khomenkov (9):
  staging: rtl8723bs: remove unused DBG_FIXED_CHAN code
  staging: rtl8723bs: remove unused DBG_RX_DUMP_EAP code
  staging: rtl8723bs: remove unused CONSISTENT_PN_ORDER code
  staging: rtl8723bs: remove unused DBG_CH_SWITCH code
  staging: rtl8723bs: remove unused REMOVE_PACK code
  staging: rtl8723bs: remove unused RTW_DVOBJ_CHIP_HW_TYPE code
  staging: rtl8723bs: remove unused RTW_MLME_EXT_C_ code
  staging: rtl8723bs: remove commented out code in rtw_mlme_ext.c
  staging: rtl8723bs: simplify if-else blocks in rtw_mlme_ext.c

 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 28 ++++---------------
 drivers/staging/rtl8723bs/core/rtw_recv.c     | 11 --------
 drivers/staging/rtl8723bs/core/rtw_security.c | 10 -------
 .../staging/rtl8723bs/core/rtw_wlan_util.c    | 26 -----------------
 drivers/staging/rtl8723bs/hal/odm.h           |  4 ---
 drivers/staging/rtl8723bs/include/drv_types.h |  3 --
 .../staging/rtl8723bs/include/rtw_mlme_ext.h  |  9 ------
 7 files changed, 5 insertions(+), 86 deletions(-)

-- 
2.47.3


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

* [PATCH 1/9] staging: rtl8723bs: remove unused DBG_FIXED_CHAN code
  2026-05-10 13:43 [PATCH 0/9] remove unused code and simplify if-else blocks Andrei Khomenkov
@ 2026-05-10 13:43 ` Andrei Khomenkov
  2026-05-10 13:43 ` [PATCH 2/9] staging: rtl8723bs: remove unused DBG_RX_DUMP_EAP code Andrei Khomenkov
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Andrei Khomenkov @ 2026-05-10 13:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-staging

Remove the DBG_FIXED_CHAN code since it is not used as the macro
is not defined anywhere.

Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org>
---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c    | 14 --------------
 drivers/staging/rtl8723bs/include/rtw_mlme_ext.h |  4 ----
 2 files changed, 18 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index 67570b81034f..c966527c0ca5 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -398,10 +398,6 @@ void init_mlme_ext_priv(struct adapter *padapter)
 	pmlmeext->chan_scan_time = SURVEY_TO;
 	pmlmeext->mlmeext_init = true;
 	pmlmeext->active_keep_alive_check = true;
-
-#ifdef DBG_FIXED_CHAN
-	pmlmeext->fixed_chan = 0xFF;
-#endif
 }
 
 void free_mlme_ext_priv(struct mlme_ext_priv *pmlmeext)
@@ -3750,18 +3746,8 @@ void site_survey(struct adapter *padapter)
 		/* val8 |= 0x0f; */
 		/* rtw_hal_set_hwreg(padapter, HW_VAR_TXPAUSE, (u8 *)(&val8)); */
 		if (pmlmeext->sitesurvey_res.channel_idx == 0) {
-#ifdef DBG_FIXED_CHAN
-			if (pmlmeext->fixed_chan != 0xff)
-				set_channel_bwmode(padapter, pmlmeext->fixed_chan, HAL_PRIME_CHNL_OFFSET_DONT_CARE, CHANNEL_WIDTH_20);
-			else
-#endif
 				set_channel_bwmode(padapter, survey_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, CHANNEL_WIDTH_20);
 		} else {
-#ifdef DBG_FIXED_CHAN
-			if (pmlmeext->fixed_chan != 0xff)
-				r8723bs_select_channel(padapter, pmlmeext->fixed_chan);
-			else
-#endif
 				r8723bs_select_channel(padapter, survey_channel);
 		}
 
diff --git a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
index 95769f90d196..b37d08bd5a59 100644
--- a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
+++ b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
@@ -416,10 +416,6 @@ struct mlme_ext_priv {
 	u16  action_public_rxseq;
 
 	u8 active_keep_alive_check;
-#ifdef DBG_FIXED_CHAN
-	u8 fixed_chan;
-#endif
-
 };
 
 void init_mlme_default_rate_set(struct adapter *padapter);
-- 
2.47.3


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

* [PATCH 2/9] staging: rtl8723bs: remove unused DBG_RX_DUMP_EAP code
  2026-05-10 13:43 [PATCH 0/9] remove unused code and simplify if-else blocks Andrei Khomenkov
  2026-05-10 13:43 ` [PATCH 1/9] staging: rtl8723bs: remove unused DBG_FIXED_CHAN code Andrei Khomenkov
@ 2026-05-10 13:43 ` Andrei Khomenkov
  2026-05-10 13:43 ` [PATCH 3/9] staging: rtl8723bs: remove unused CONSISTENT_PN_ORDER code Andrei Khomenkov
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Andrei Khomenkov @ 2026-05-10 13:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-staging

Remove the DBG_RX_DUMP_EAP code since it is not used as the macro
is not defined anywhere.

Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org>
---
 drivers/staging/rtl8723bs/core/rtw_recv.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
index b3a38ffa6ef7..f6eeb134acdd 100644
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
@@ -1515,17 +1515,6 @@ static signed int validate_recv_frame(struct adapter *adapter, union recv_frame
 			struct recv_priv *precvpriv = &adapter->recvpriv;
 
 			precvpriv->rx_drop++;
-		} else if (retval == _SUCCESS) {
-#ifdef DBG_RX_DUMP_EAP
-			u8 bDumpRxPkt;
-			u16 eth_type;
-
-			/*  dump eapol */
-			rtw_hal_get_def_var(adapter, HAL_DEF_DBG_DUMP_RXPKT, &(bDumpRxPkt));
-			/*  get ether_type */
-			memcpy(&eth_type, ptr + pattrib->hdrlen + pattrib->iv_len + LLC_HEADER_LENGTH, 2);
-			eth_type = ntohs((unsigned short) eth_type);
-#endif
 		}
 		break;
 	default:
-- 
2.47.3


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

* [PATCH 3/9] staging: rtl8723bs: remove unused CONSISTENT_PN_ORDER code
  2026-05-10 13:43 [PATCH 0/9] remove unused code and simplify if-else blocks Andrei Khomenkov
  2026-05-10 13:43 ` [PATCH 1/9] staging: rtl8723bs: remove unused DBG_FIXED_CHAN code Andrei Khomenkov
  2026-05-10 13:43 ` [PATCH 2/9] staging: rtl8723bs: remove unused DBG_RX_DUMP_EAP code Andrei Khomenkov
@ 2026-05-10 13:43 ` Andrei Khomenkov
  2026-05-10 13:43 ` [PATCH 4/9] staging: rtl8723bs: remove unused DBG_CH_SWITCH code Andrei Khomenkov
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Andrei Khomenkov @ 2026-05-10 13:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-staging

Remove the CONSISTENT_PN_ORDER code since it is not used as the macro
is not defined anywhere.

Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org>
---
 drivers/staging/rtl8723bs/core/rtw_security.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
index 2a5a4c0de9b1..50d8e30f7eda 100644
--- a/drivers/staging/rtl8723bs/core/rtw_security.c
+++ b/drivers/staging/rtl8723bs/core/rtw_security.c
@@ -649,13 +649,8 @@ static void construct_mic_iv(u8 *mic_iv,
 
 		for (i = 2; i < 8; i++)
 			mic_iv[i] = mpdu[i + 8];   /* mic_iv[2:7] = A2[0:5] = mpdu[10:15] */
-		#ifdef CONSISTENT_PN_ORDER
-		for (i = 8; i < 14; i++)
-			mic_iv[i] = pn_vector[i - 8];           /* mic_iv[8:13] = PN[0:5] */
-		#else
 		for (i = 8; i < 14; i++)
 			mic_iv[i] = pn_vector[13 - i];          /* mic_iv[8:13] = PN[5:0] */
-		#endif
 		mic_iv[14] = (unsigned char)(payload_length / 256);
 		mic_iv[15] = (unsigned char)(payload_length % 256);
 }
@@ -772,13 +767,8 @@ static void construct_ctr_preload(u8 *ctr_preload,
 
 	for (i = 2; i < 8; i++)
 		ctr_preload[i] = mpdu[i + 8];                       /* ctr_preload[2:7] = A2[0:5] = mpdu[10:15] */
-#ifdef CONSISTENT_PN_ORDER
-	for (i = 8; i < 14; i++)
-		ctr_preload[i] =    pn_vector[i - 8];           /* ctr_preload[8:13] = PN[0:5] */
-#else
 	for (i = 8; i < 14; i++)
 		ctr_preload[i] =    pn_vector[13 - i];          /* ctr_preload[8:13] = PN[5:0] */
-#endif
 	ctr_preload[14] = (unsigned char)(c / 256); /* Ctr */
 	ctr_preload[15] = (unsigned char)(c % 256);
 }
-- 
2.47.3


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

* [PATCH 4/9] staging: rtl8723bs: remove unused DBG_CH_SWITCH code
  2026-05-10 13:43 [PATCH 0/9] remove unused code and simplify if-else blocks Andrei Khomenkov
                   ` (2 preceding siblings ...)
  2026-05-10 13:43 ` [PATCH 3/9] staging: rtl8723bs: remove unused CONSISTENT_PN_ORDER code Andrei Khomenkov
@ 2026-05-10 13:43 ` Andrei Khomenkov
  2026-05-10 13:43 ` [PATCH 5/9] staging: rtl8723bs: remove unused REMOVE_PACK code Andrei Khomenkov
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Andrei Khomenkov @ 2026-05-10 13:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-staging

Remove the DBG_CH_SWITCH code since it is not used as the macro
is not defined anywhere.

Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org>
---
 .../staging/rtl8723bs/core/rtw_wlan_util.c    | 26 -------------------
 1 file changed, 26 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index 4f41f88908d7..917b80cbdc6a 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -254,36 +254,10 @@ inline u8 rtw_get_oper_ch(struct adapter *adapter)
 
 inline void rtw_set_oper_ch(struct adapter *adapter, u8 ch)
 {
-#ifdef DBG_CH_SWITCH
-	const int len = 128;
-	char msg[128] = {0};
-	int cnt = 0;
-	int i = 0;
-#endif  /* DBG_CH_SWITCH */
 	struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
 
 	if (dvobj->oper_channel != ch) {
 		dvobj->on_oper_ch_time = jiffies;
-
-#ifdef DBG_CH_SWITCH
-		cnt += scnprintf(msg + cnt, len - cnt, "switch to ch %3u", ch);
-
-		for (i = 0; i < dvobj->iface_nums; i++) {
-			struct adapter *iface = dvobj->padapters[i];
-
-			cnt += scnprintf(msg + cnt, len - cnt, " [%s:", ADPT_ARG(iface));
-			if (iface->mlmeextpriv.cur_channel == ch)
-				cnt += scnprintf(msg + cnt, len - cnt, "C");
-			else
-				cnt += scnprintf(msg + cnt, len - cnt, "_");
-			if (iface->wdinfo.listen_channel == ch && !rtw_p2p_chk_state(&iface->wdinfo, P2P_STATE_NONE))
-				cnt += scnprintf(msg + cnt, len - cnt, "L");
-			else
-				cnt += scnprintf(msg + cnt, len - cnt, "_");
-			cnt += scnprintf(msg + cnt, len - cnt, "]");
-		}
-
-#endif /* DBG_CH_SWITCH */
 	}
 
 	dvobj->oper_channel = ch;
-- 
2.47.3


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

* [PATCH 5/9] staging: rtl8723bs: remove unused REMOVE_PACK code
  2026-05-10 13:43 [PATCH 0/9] remove unused code and simplify if-else blocks Andrei Khomenkov
                   ` (3 preceding siblings ...)
  2026-05-10 13:43 ` [PATCH 4/9] staging: rtl8723bs: remove unused DBG_CH_SWITCH code Andrei Khomenkov
@ 2026-05-10 13:43 ` Andrei Khomenkov
  2026-05-10 13:43 ` [PATCH 6/9] staging: rtl8723bs: remove unused RTW_DVOBJ_CHIP_HW_TYPE code Andrei Khomenkov
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Andrei Khomenkov @ 2026-05-10 13:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-staging

Remove the REMOVE_PACK code since it is not used as the macro
is not defined anywhere.

Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org>
---
 drivers/staging/rtl8723bs/hal/odm.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm.h b/drivers/staging/rtl8723bs/hal/odm.h
index aa4e36b6f2b4..3479eadde61f 100644
--- a/drivers/staging/rtl8723bs/hal/odm.h
+++ b/drivers/staging/rtl8723bs/hal/odm.h
@@ -975,10 +975,6 @@ enum ODM_FW_Config_Type {
 	CONFIG_FW_BT,
 };
 
-#ifdef REMOVE_PACK
-#pragma pack()
-#endif
-
 /* include "odm_function.h" */
 
 /* 3 =========================================================== */
-- 
2.47.3


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

* [PATCH 6/9] staging: rtl8723bs: remove unused RTW_DVOBJ_CHIP_HW_TYPE code
  2026-05-10 13:43 [PATCH 0/9] remove unused code and simplify if-else blocks Andrei Khomenkov
                   ` (4 preceding siblings ...)
  2026-05-10 13:43 ` [PATCH 5/9] staging: rtl8723bs: remove unused REMOVE_PACK code Andrei Khomenkov
@ 2026-05-10 13:43 ` Andrei Khomenkov
  2026-05-10 13:43 ` [PATCH 7/9] staging: rtl8723bs: remove unused RTW_MLME_EXT_C_ code Andrei Khomenkov
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Andrei Khomenkov @ 2026-05-10 13:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-staging

Remove the RTW_DVOBJ_CHIP_HW_TYPE code since it is not used as the
macro is not defined anywhere.

Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org>
---
 drivers/staging/rtl8723bs/include/drv_types.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/drv_types.h b/drivers/staging/rtl8723bs/include/drv_types.h
index 7ed375ba18d8..30183d502b69 100644
--- a/drivers/staging/rtl8723bs/include/drv_types.h
+++ b/drivers/staging/rtl8723bs/include/drv_types.h
@@ -258,9 +258,6 @@ static inline struct dvobj_priv *pwrctl_to_dvobj(struct pwrctrl_priv *pwrctl_pri
 static inline struct device *dvobj_to_dev(struct dvobj_priv *dvobj)
 {
 	/* todo: get interface type from dvobj and the return the dev accordingly */
-#ifdef RTW_DVOBJ_CHIP_HW_TYPE
-#endif
-
 	return &dvobj->intf_data.func->dev;
 }
 
-- 
2.47.3


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

* [PATCH 7/9] staging: rtl8723bs: remove unused RTW_MLME_EXT_C_ code
  2026-05-10 13:43 [PATCH 0/9] remove unused code and simplify if-else blocks Andrei Khomenkov
                   ` (5 preceding siblings ...)
  2026-05-10 13:43 ` [PATCH 6/9] staging: rtl8723bs: remove unused RTW_DVOBJ_CHIP_HW_TYPE code Andrei Khomenkov
@ 2026-05-10 13:43 ` Andrei Khomenkov
  2026-05-10 13:43 ` [PATCH 8/9] staging: rtl8723bs: remove commented out code in rtw_mlme_ext.c Andrei Khomenkov
  2026-05-10 13:43 ` [PATCH 9/9] staging: rtl8723bs: simplify if-else blocks " Andrei Khomenkov
  8 siblings, 0 replies; 14+ messages in thread
From: Andrei Khomenkov @ 2026-05-10 13:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-staging

Remove the RTW_MLME_EXT_C_ code since it is not used as the macro
is not defined anywhere.

Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org>
---
 drivers/staging/rtl8723bs/include/rtw_mlme_ext.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
index b37d08bd5a59..d64e533a63c0 100644
--- a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
+++ b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
@@ -705,9 +705,4 @@ enum {
 	MAX_C2HEVT
 };
 
-
-#ifdef _RTW_MLME_EXT_C_
-
-#endif/* _RTL8192C_CMD_C_ */
-
 #endif
-- 
2.47.3


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

* [PATCH 8/9] staging: rtl8723bs: remove commented out code in rtw_mlme_ext.c
  2026-05-10 13:43 [PATCH 0/9] remove unused code and simplify if-else blocks Andrei Khomenkov
                   ` (6 preceding siblings ...)
  2026-05-10 13:43 ` [PATCH 7/9] staging: rtl8723bs: remove unused RTW_MLME_EXT_C_ code Andrei Khomenkov
@ 2026-05-10 13:43 ` Andrei Khomenkov
  2026-05-11  4:07   ` Nikolay Kulikov
  2026-05-10 13:43 ` [PATCH 9/9] staging: rtl8723bs: simplify if-else blocks " Andrei Khomenkov
  8 siblings, 1 reply; 14+ messages in thread
From: Andrei Khomenkov @ 2026-05-10 13:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-staging

Remove commented out code in the site_survey function as it is not used.

Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org>
---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index c966527c0ca5..7ac23ccb39f7 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -3741,10 +3741,6 @@ void site_survey(struct adapter *padapter)
 	}
 
 	if (survey_channel != 0) {
-		/* PAUSE 4-AC Queue when site_survey */
-		/* rtw_hal_get_hwreg(padapter, HW_VAR_TXPAUSE, (u8 *)(&val8)); */
-		/* val8 |= 0x0f; */
-		/* rtw_hal_set_hwreg(padapter, HW_VAR_TXPAUSE, (u8 *)(&val8)); */
 		if (pmlmeext->sitesurvey_res.channel_idx == 0) {
 				set_channel_bwmode(padapter, survey_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, CHANNEL_WIDTH_20);
 		} else {
-- 
2.47.3


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

* [PATCH 9/9] staging: rtl8723bs: simplify if-else blocks in rtw_mlme_ext.c
  2026-05-10 13:43 [PATCH 0/9] remove unused code and simplify if-else blocks Andrei Khomenkov
                   ` (7 preceding siblings ...)
  2026-05-10 13:43 ` [PATCH 8/9] staging: rtl8723bs: remove commented out code in rtw_mlme_ext.c Andrei Khomenkov
@ 2026-05-10 13:43 ` Andrei Khomenkov
  2026-05-11  4:13   ` Nikolay Kulikov
  8 siblings, 1 reply; 14+ messages in thread
From: Andrei Khomenkov @ 2026-05-10 13:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-staging

Fix indentation, remove unnecessary braces, and wrap long lines
in if-else blocks inside the site_survey function.

Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org>
---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index 7ac23ccb39f7..2667adc30b00 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -3741,11 +3741,11 @@ void site_survey(struct adapter *padapter)
 	}
 
 	if (survey_channel != 0) {
-		if (pmlmeext->sitesurvey_res.channel_idx == 0) {
-				set_channel_bwmode(padapter, survey_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, CHANNEL_WIDTH_20);
-		} else {
-				r8723bs_select_channel(padapter, survey_channel);
-		}
+		if (pmlmeext->sitesurvey_res.channel_idx == 0)
+			set_channel_bwmode(padapter, survey_channel,
+					   HAL_PRIME_CHNL_OFFSET_DONT_CARE, CHANNEL_WIDTH_20);
+		else
+			r8723bs_select_channel(padapter, survey_channel);
 
 		if (ScanType == SCAN_ACTIVE) { /* obey the channel plan setting... */
 			{
-- 
2.47.3


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

* Re: [PATCH 8/9] staging: rtl8723bs: remove commented out code in rtw_mlme_ext.c
  2026-05-10 13:43 ` [PATCH 8/9] staging: rtl8723bs: remove commented out code in rtw_mlme_ext.c Andrei Khomenkov
@ 2026-05-11  4:07   ` Nikolay Kulikov
  2026-05-11  9:03     ` Dan Carpenter
  0 siblings, 1 reply; 14+ messages in thread
From: Nikolay Kulikov @ 2026-05-11  4:07 UTC (permalink / raw)
  To: Andrei Khomenkov; +Cc: Greg Kroah-Hartman, linux-staging

On Sun, May 10, 2026 at 04:43:14PM +0300, Andrei Khomenkov wrote:
> Remove commented out code in the site_survey function as it is not used.
				   ^^^^^^^^^^^
It is better to indicate function names with brackets: site_survey().

> 
> Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org>
> ---
>  drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> index c966527c0ca5..7ac23ccb39f7 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> @@ -3741,10 +3741,6 @@ void site_survey(struct adapter *padapter)
>  	}
>  
>  	if (survey_channel != 0) {
> -		/* PAUSE 4-AC Queue when site_survey */
> -		/* rtw_hal_get_hwreg(padapter, HW_VAR_TXPAUSE, (u8 *)(&val8)); */
> -		/* val8 |= 0x0f; */
> -		/* rtw_hal_set_hwreg(padapter, HW_VAR_TXPAUSE, (u8 *)(&val8)); */
>  		if (pmlmeext->sitesurvey_res.channel_idx == 0) {
>  				set_channel_bwmode(padapter, survey_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, CHANNEL_WIDTH_20);
>  		} else {
> -- 
> 2.47.3
> 

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

* Re: [PATCH 9/9] staging: rtl8723bs: simplify if-else blocks in rtw_mlme_ext.c
  2026-05-10 13:43 ` [PATCH 9/9] staging: rtl8723bs: simplify if-else blocks " Andrei Khomenkov
@ 2026-05-11  4:13   ` Nikolay Kulikov
  0 siblings, 0 replies; 14+ messages in thread
From: Nikolay Kulikov @ 2026-05-11  4:13 UTC (permalink / raw)
  To: Andrei Khomenkov; +Cc: Greg Kroah-Hartman, linux-staging

On Sun, May 10, 2026 at 04:43:15PM +0300, Andrei Khomenkov wrote:
> Fix indentation, remove unnecessary braces, and wrap long lines
> in if-else blocks inside the site_survey function.
			       ^^^^^^^^^^^
Again, better with brackets: site_survey().


Thanks,
Nikolay
> 
> Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org>
> ---
>  drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> index 7ac23ccb39f7..2667adc30b00 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> @@ -3741,11 +3741,11 @@ void site_survey(struct adapter *padapter)
>  	}
>  
>  	if (survey_channel != 0) {
> -		if (pmlmeext->sitesurvey_res.channel_idx == 0) {
> -				set_channel_bwmode(padapter, survey_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, CHANNEL_WIDTH_20);
> -		} else {
> -				r8723bs_select_channel(padapter, survey_channel);
> -		}
> +		if (pmlmeext->sitesurvey_res.channel_idx == 0)
> +			set_channel_bwmode(padapter, survey_channel,
> +					   HAL_PRIME_CHNL_OFFSET_DONT_CARE, CHANNEL_WIDTH_20);
> +		else
> +			r8723bs_select_channel(padapter, survey_channel);
>  
>  		if (ScanType == SCAN_ACTIVE) { /* obey the channel plan setting... */
>  			{
> -- 
> 2.47.3
> 

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

* Re: [PATCH 8/9] staging: rtl8723bs: remove commented out code in rtw_mlme_ext.c
  2026-05-11  4:07   ` Nikolay Kulikov
@ 2026-05-11  9:03     ` Dan Carpenter
  2026-05-11 12:59       ` Nikolay Kulikov
  0 siblings, 1 reply; 14+ messages in thread
From: Dan Carpenter @ 2026-05-11  9:03 UTC (permalink / raw)
  To: Nikolay Kulikov; +Cc: Andrei Khomenkov, Greg Kroah-Hartman, linux-staging

On Mon, May 11, 2026 at 07:07:04AM +0300, Nikolay Kulikov wrote:
> On Sun, May 10, 2026 at 04:43:14PM +0300, Andrei Khomenkov wrote:
> > Remove commented out code in the site_survey function as it is not used.
> 				   ^^^^^^^^^^^
> It is better to indicate function names with brackets: site_survey().
> 

I feel like we can go mad with these sorts of review comments.  I spent
five minute reviewing all these patches and now I have to review them
all again because of this really minor thing?

My trick for minor review comments, is that I try to find a real bug
and I tie the minor thing to a major comment.  "Sorry, you forgot to
add clean up on error and also you forgot a comma in your commit
message".

There a lot of minor stuff that I end up ignoring...

regards,
dan carpenter


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

* Re: [PATCH 8/9] staging: rtl8723bs: remove commented out code in rtw_mlme_ext.c
  2026-05-11  9:03     ` Dan Carpenter
@ 2026-05-11 12:59       ` Nikolay Kulikov
  0 siblings, 0 replies; 14+ messages in thread
From: Nikolay Kulikov @ 2026-05-11 12:59 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Andrei Khomenkov, Greg Kroah-Hartman, linux-staging

On Mon, May 11, 2026 at 12:03:53PM +0300, Dan Carpenter wrote:
> On Mon, May 11, 2026 at 07:07:04AM +0300, Nikolay Kulikov wrote:
> > On Sun, May 10, 2026 at 04:43:14PM +0300, Andrei Khomenkov wrote:
> > > Remove commented out code in the site_survey function as it is not used.
> > 				   ^^^^^^^^^^^
> > It is better to indicate function names with brackets: site_survey().
> > 
> 
> I feel like we can go mad with these sorts of review comments.  I spent
> five minute reviewing all these patches and now I have to review them
> all again because of this really minor thing?
> 
> My trick for minor review comments, is that I try to find a real bug
> and I tie the minor thing to a major comment.  "Sorry, you forgot to
> add clean up on error and also you forgot a comma in your commit
> message".
> 
> There a lot of minor stuff that I end up ignoring...

This is a really good trick, I will take note.


Thanks,
Nikolay

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

end of thread, other threads:[~2026-05-11 12:59 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-10 13:43 [PATCH 0/9] remove unused code and simplify if-else blocks Andrei Khomenkov
2026-05-10 13:43 ` [PATCH 1/9] staging: rtl8723bs: remove unused DBG_FIXED_CHAN code Andrei Khomenkov
2026-05-10 13:43 ` [PATCH 2/9] staging: rtl8723bs: remove unused DBG_RX_DUMP_EAP code Andrei Khomenkov
2026-05-10 13:43 ` [PATCH 3/9] staging: rtl8723bs: remove unused CONSISTENT_PN_ORDER code Andrei Khomenkov
2026-05-10 13:43 ` [PATCH 4/9] staging: rtl8723bs: remove unused DBG_CH_SWITCH code Andrei Khomenkov
2026-05-10 13:43 ` [PATCH 5/9] staging: rtl8723bs: remove unused REMOVE_PACK code Andrei Khomenkov
2026-05-10 13:43 ` [PATCH 6/9] staging: rtl8723bs: remove unused RTW_DVOBJ_CHIP_HW_TYPE code Andrei Khomenkov
2026-05-10 13:43 ` [PATCH 7/9] staging: rtl8723bs: remove unused RTW_MLME_EXT_C_ code Andrei Khomenkov
2026-05-10 13:43 ` [PATCH 8/9] staging: rtl8723bs: remove commented out code in rtw_mlme_ext.c Andrei Khomenkov
2026-05-11  4:07   ` Nikolay Kulikov
2026-05-11  9:03     ` Dan Carpenter
2026-05-11 12:59       ` Nikolay Kulikov
2026-05-10 13:43 ` [PATCH 9/9] staging: rtl8723bs: simplify if-else blocks " Andrei Khomenkov
2026-05-11  4:13   ` Nikolay Kulikov

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