public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Khushal Chitturi <khushalchitturi@gmail.com>
To: gregkh@linuxfoundation.org
Cc: dan.carpenter@linaro.org, straube.linux@gmail.com,
	hansg@kernel.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org,
	Khushal Chitturi <khushalchitturi@gmail.com>
Subject: [PATCH v6 2/4] staging: rtl8723bs: convert traffic status variables to bool
Date: Sun,  1 Feb 2026 17:08:35 +0530	[thread overview]
Message-ID: <20260201113837.8531-3-khushalchitturi@gmail.com> (raw)
In-Reply-To: <20260201113837.8531-1-khushalchitturi@gmail.com>

This patch replaces u8 variables in traffic_status_watchdog() and its
callers with bool to reflect their usage.

Signed-off-by: Khushal Chitturi <khushalchitturi@gmail.com>

---
Changelog:
v5 -> v6: Add new patch to convert traffic_status_watchdog variables
from u8 to bool

 drivers/staging/rtl8723bs/core/rtw_cmd.c         | 16 ++++++++--------
 drivers/staging/rtl8723bs/core/rtw_mlme.c        |  7 +++----
 drivers/staging/rtl8723bs/include/rtw_mlme_ext.h |  2 +-
 3 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index ab3c7d3846b5..a8254616cd36 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -1128,18 +1128,18 @@ static void collect_traffic_statistics(struct adapter *padapter)
 	pdvobjpriv->traffic_stat.cur_rx_tp = (u32)(pdvobjpriv->traffic_stat.cur_rx_bytes * 8 / 2 / 1024 / 1024);
 }
 
-u8 traffic_status_watchdog(struct adapter *padapter, u8 from_timer)
+bool traffic_status_watchdog(struct adapter *padapter, u8 from_timer)
 {
-	u8 should_enter_ps = false;
+	bool should_enter_ps = false;
 	u16 busy_threshold_high = 25;
 	u16 busy_threshold_low = 10;
 	u16 busy_threshold = busy_threshold_high;
-	u8 busy_traffic = false;
-	u8 tx_busy_traffic = false;
-	u8 rx_busy_traffic = false;
-	u8 higher_busy_traffic = false;
-	u8 higher_busy_rx_traffic = false;
-	u8 higher_busy_tx_traffic = false;
+	bool busy_traffic = false;
+	bool tx_busy_traffic = false;
+	bool rx_busy_traffic = false;
+	bool higher_busy_traffic = false;
+	bool higher_busy_rx_traffic = false;
+	bool higher_busy_tx_traffic = false;
 	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
 
 	collect_traffic_statistics(padapter);
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 4088a1aaae3c..e9287e2b2eee 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -1652,10 +1652,9 @@ void rtw_dynamic_check_timer_handler(struct adapter *adapter)
 	if (adapter->net_closed)
 		return;
 
-	if ((adapter_to_pwrctl(adapter)->fw_current_in_ps_mode)
-		&& !(hal_btcoex_IsBtControlLps(adapter))
-		) {
-		u8 should_enter_ps;
+	if (adapter_to_pwrctl(adapter)->fw_current_in_ps_mode &&
+	    !hal_btcoex_IsBtControlLps(adapter)) {
+		bool should_enter_ps;
 
 		linked_status_chk(adapter);
 
diff --git a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
index dd5080056e58..4119d7b6d6db 100644
--- a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
+++ b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h
@@ -615,7 +615,7 @@ extern void process_addba_req(struct adapter *padapter, u8 *paddba_req, u8 *addr
 extern void update_TSF(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len);
 extern void correct_TSF(struct adapter *padapter, struct mlme_ext_priv *pmlmeext);
 extern void adaptive_early_32k(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len);
-extern u8 traffic_status_watchdog(struct adapter *padapter, u8 from_timer);
+extern bool traffic_status_watchdog(struct adapter *padapter, u8 from_timer);
 
 int rtw_chk_start_clnt_join(struct adapter *padapter, u8 *ch, u8 *bw, u8 *offset);
 
-- 
2.52.0


  parent reply	other threads:[~2026-02-01 11:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-01 11:38 [PATCH v6 0/4] staging: rtl8723bs: coding style and refactoring cleanups Khushal Chitturi
2026-02-01 11:38 ` [PATCH v6 1/4] staging: rtl8723bs: rename LinkDetectInfo and clean up related code Khushal Chitturi
2026-02-07 13:11   ` Greg KH
2026-02-01 11:38 ` Khushal Chitturi [this message]
2026-02-01 11:38 ` [PATCH v6 3/4] staging: rtl8723bs: simplify boolean expressions Khushal Chitturi
2026-02-07 13:13   ` Greg KH
2026-02-01 11:38 ` [PATCH v6 4/4] staging: rtl8723bs: fix line length and alignment issues Khushal Chitturi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260201113837.8531-3-khushalchitturi@gmail.com \
    --to=khushalchitturi@gmail.com \
    --cc=dan.carpenter@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hansg@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=straube.linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox