public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Nikolay Kulikov <nikolayof23@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-staging@lists.linux.dev, ethantidmore06@gmail.com,
	Nikolay Kulikov <nikolayof23@gmail.com>
Subject: [PATCH v2 2/4] staging: rtl8723bs: replace rtw_is_same_ibss() return type to bool
Date: Mon,  9 Mar 2026 23:12:19 +0300	[thread overview]
Message-ID: <20260309201257.16984-3-nikolayof23@gmail.com> (raw)
In-Reply-To: <20260309201257.16984-1-nikolayof23@gmail.com>

Function rtw_is_same_ibss() returns a 'bool' value, but has an 'int
type. Replace 'int' -> 'bool' types to make it more accrurate.

Signed-off-by: Nikolay Kulikov <nikolayof23@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_mlme.c    | 11 ++++-------
 drivers/staging/rtl8723bs/include/rtw_mlme.h |  2 +-
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index f6ee2a2e595f..244dacbdffaa 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -326,21 +326,18 @@ struct	wlan_network *rtw_find_network(struct __queue *scanned_queue, u8 *addr)
 	return pnetwork;
 }
 
-int rtw_is_same_ibss(struct adapter *adapter, struct wlan_network *pnetwork)
+bool rtw_is_same_ibss(struct adapter *adapter, struct wlan_network *pnetwork)
 {
-	int ret = true;
 	struct security_priv *psecuritypriv = &adapter->securitypriv;
 
 	if ((psecuritypriv->dot11PrivacyAlgrthm != _NO_PRIVACY_) &&
 		    (pnetwork->network.privacy == 0))
-		ret = false;
+		return false;
 	else if ((psecuritypriv->dot11PrivacyAlgrthm == _NO_PRIVACY_) &&
 		 (pnetwork->network.privacy == 1))
-		ret = false;
-	else
-		ret = true;
+		return false;
 
-	return ret;
+	return true;
 }
 
 inline int is_same_ess(struct wlan_bssid_ex *a, struct wlan_bssid_ex *b)
diff --git a/drivers/staging/rtl8723bs/include/rtw_mlme.h b/drivers/staging/rtl8723bs/include/rtw_mlme.h
index 96a402328398..9ead083e6b95 100644
--- a/drivers/staging/rtl8723bs/include/rtw_mlme.h
+++ b/drivers/staging/rtl8723bs/include/rtw_mlme.h
@@ -379,7 +379,7 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len, u8 channe
 void rtw_issue_addbareq_cmd(struct adapter *padapter, struct xmit_frame *pxmitframe);
 void rtw_append_exented_cap(struct adapter *padapter, u8 *out_ie, uint *pout_len);
 
-int rtw_is_same_ibss(struct adapter *adapter, struct wlan_network *pnetwork);
+bool rtw_is_same_ibss(struct adapter *adapter, struct wlan_network *pnetwork);
 int is_same_network(struct wlan_bssid_ex *src, struct wlan_bssid_ex *dst, u8 feature);
 
 #define rtw_roam_flags(adapter) ((adapter)->mlmepriv.roam_flags)
-- 
2.53.0


  parent reply	other threads:[~2026-03-09 20:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-07 15:58 [PATCH 0/4] Replace functions return types to 'bool' Nikolay Kulikov
2026-03-07 15:58 ` [PATCH 1/4] staging: rtl8723bs: replace rtw_if_up() return type to bool Nikolay Kulikov
2026-03-09 16:53   ` Greg KH
2026-03-07 15:58 ` [PATCH 2/4] staging: rtl8723bs: replace rtw_is_same_ibss() " Nikolay Kulikov
2026-03-07 15:58 ` [PATCH 3/4] staging: rtl8723bs: replace rtw_is_desired_network() " Nikolay Kulikov
2026-03-07 15:58 ` [PATCH 4/4] staging: rtl8723bs: replace rtw_linked_check() " Nikolay Kulikov
2026-03-09 20:12 ` [PATCH v2 0/4] Replace functions return types to 'bool' Nikolay Kulikov
2026-03-09 20:12   ` [PATCH v2 1/4] staging: rtl8723bs: replace rtw_if_up() return type to bool Nikolay Kulikov
2026-03-09 20:12   ` Nikolay Kulikov [this message]
2026-03-09 20:12   ` [PATCH v2 3/4] staging: rtl8723bs: replace rtw_is_desired_network() " Nikolay Kulikov
2026-03-09 20:12   ` [PATCH v2 4/4] staging: rtl8723bs: replace rtw_linked_check() " Nikolay Kulikov

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=20260309201257.16984-3-nikolayof23@gmail.com \
    --to=nikolayof23@gmail.com \
    --cc=ethantidmore06@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-staging@lists.linux.dev \
    /path/to/YOUR_REPLY

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

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