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 1/4] staging: rtl8723bs: replace rtw_if_up() return type to bool
Date: Mon, 9 Mar 2026 23:12:18 +0300 [thread overview]
Message-ID: <20260309201257.16984-2-nikolayof23@gmail.com> (raw)
In-Reply-To: <20260309201257.16984-1-nikolayof23@gmail.com>
Function rtw_if_up() actually return 'bool' value, but it's type is
'signed int'. Replace 'signed int' with 'bool' to make it more accurate.
Signed-off-by: Nikolay Kulikov <nikolayof23@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_mlme.c | 10 +++-------
drivers/staging/rtl8723bs/include/rtw_mlme.h | 2 +-
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 2adc98c955fd..f6ee2a2e595f 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -262,17 +262,13 @@ void rtw_free_network_queue(struct adapter *padapter, u8 isfreeall)
spin_unlock_bh(&scanned_queue->lock);
}
-signed int rtw_if_up(struct adapter *padapter)
+bool rtw_if_up(struct adapter *padapter)
{
- signed int res;
-
if (padapter->bDriverStopped || padapter->bSurpriseRemoved ||
!check_fwstate(&padapter->mlmepriv, _FW_LINKED))
- res = false;
- else
- res = true;
+ return false;
- return res;
+ return true;
}
void rtw_generate_random_ibss(u8 *pibss)
diff --git a/drivers/staging/rtl8723bs/include/rtw_mlme.h b/drivers/staging/rtl8723bs/include/rtw_mlme.h
index 0bdb204b85ba..96a402328398 100644
--- a/drivers/staging/rtl8723bs/include/rtw_mlme.h
+++ b/drivers/staging/rtl8723bs/include/rtw_mlme.h
@@ -362,7 +362,7 @@ extern void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_ne
extern struct wlan_network *_rtw_find_network(struct __queue *scanned_queue, u8 *addr);
-extern signed int rtw_if_up(struct adapter *padapter);
+bool rtw_if_up(struct adapter *padapter);
signed int rtw_linked_check(struct adapter *padapter);
--
2.53.0
next prev 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 ` Nikolay Kulikov [this message]
2026-03-09 20:12 ` [PATCH v2 2/4] staging: rtl8723bs: replace rtw_is_same_ibss() return type to bool Nikolay Kulikov
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-2-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