public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Nikolay Kulikov <nikolayof23@gmail.com>
Cc: linux-staging@lists.linux.dev, ethantidmore06@gmail.com
Subject: Re: [PATCH 1/4] staging: rtl8723bs: replace rtw_if_up() return type to bool
Date: Mon, 9 Mar 2026 17:53:23 +0100	[thread overview]
Message-ID: <2026030959-obsessive-scuff-26c4@gregkh> (raw)
In-Reply-To: <20260307160024.18039-2-nikolayof23@gmail.com>

On Sat, Mar 07, 2026 at 06:58:30PM +0300, Nikolay Kulikov wrote:
> 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    | 6 ++----
>  drivers/staging/rtl8723bs/include/rtw_mlme.h | 2 +-
>  2 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> index 28dfb974fdff..85ec172d6a89 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> @@ -262,15 +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;
> +	bool res = true;
>  
>  	if (padapter->bDriverStopped || padapter->bSurpriseRemoved ||
>  		!check_fwstate(&padapter->mlmepriv, _FW_LINKED))
>  		res = false;
> -	else
> -		res =  true;
>  
>  	return res;

No need for res at all, just return true/false instead?

thanks,

greg k-h

  reply	other threads:[~2026-03-09 16:53 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 [this message]
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   ` [PATCH v2 2/4] staging: rtl8723bs: replace rtw_is_same_ibss() " 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=2026030959-obsessive-scuff-26c4@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=ethantidmore06@gmail.com \
    --cc=linux-staging@lists.linux.dev \
    --cc=nikolayof23@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