The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v5] staging: rtl8723bs: remove unnecessary comparison to true
@ 2026-05-07  5:21 Ashwin Gundarapu
  2026-05-07 14:31 ` Luka Gejak
  2026-05-07 14:37 ` Luka Gejak
  0 siblings, 2 replies; 3+ messages in thread
From: Ashwin Gundarapu @ 2026-05-07  5:21 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, linux-staging

Remove explicit comparison to true in check_fwstate() call and
add spacing around the bitwise OR operator to improve code style.

Signed-off-by: Ashwin Gundarapu <linuxuser509@zohomail.in>
---
v5: Removed git header from email body. Fixed indentation on
the second line of the function call. Added full version history.

v4: Moved changelog below the --- separator. Ran checkpatch.pl
- no errors or warnings. Fixed whitespace per Greg KH's review.

v3: Fixed double --- line and corrected whitespace formatting.

v2: Resent with corrected whitespace via Thunderbird plain text mode.

 drivers/staging/rtl8723bs/core/rtw_ioctl_set.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
index c70541f95a73..c100a0d70fe2 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
@@ -151,7 +151,8 @@ u8 rtw_set_802_11_ssid(struct adapter *padapter, struct ndis_802_11_ssid *ssid)
	else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true)
		goto release_mlme_lock;
 
-	if (check_fwstate(pmlmepriv, _FW_LINKED|WIFI_ADHOC_MASTER_STATE) == true) {
+	if (check_fwstate(pmlmepriv,
+		_FW_LINKED | WIFI_ADHOC_MASTER_STATE)) {
		if ((pmlmepriv->assoc_ssid.ssid_length == ssid->ssid_length) &&
		    (!memcmp(&pmlmepriv->assoc_ssid.ssid, ssid->ssid, ssid->ssid_length))) {
			if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == false) {

base-commit: 26fd6bff2c050196005312d1d306889220952a99
-- 
2.43.0


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

* Re: [PATCH v5] staging: rtl8723bs: remove unnecessary comparison to true
  2026-05-07  5:21 [PATCH v5] staging: rtl8723bs: remove unnecessary comparison to true Ashwin Gundarapu
@ 2026-05-07 14:31 ` Luka Gejak
  2026-05-07 14:37 ` Luka Gejak
  1 sibling, 0 replies; 3+ messages in thread
From: Luka Gejak @ 2026-05-07 14:31 UTC (permalink / raw)
  To: Ashwin Gundarapu, gregkh; +Cc: linux-kernel, linux-staging

On Thu May 7, 2026 at 7:21 AM CEST, Ashwin Gundarapu wrote:
> Remove explicit comparison to true in check_fwstate() call and
> add spacing around the bitwise OR operator to improve code style.
>
> Signed-off-by: Ashwin Gundarapu <linuxuser509@zohomail.in>
> ---
> v5: Removed git header from email body. Fixed indentation on
> the second line of the function call. Added full version history.
>
> v4: Moved changelog below the --- separator. Ran checkpatch.pl
> - no errors or warnings. Fixed whitespace per Greg KH's review.
>
> v3: Fixed double --- line and corrected whitespace formatting.
>
> v2: Resent with corrected whitespace via Thunderbird plain text mode.
>
>  drivers/staging/rtl8723bs/core/rtw_ioctl_set.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
> index c70541f95a73..c100a0d70fe2 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
> @@ -151,7 +151,8 @@ u8 rtw_set_802_11_ssid(struct adapter *padapter, struct ndis_802_11_ssid *ssid)
> 	else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true)
> 		goto release_mlme_lock;
>  
> -	if (check_fwstate(pmlmepriv, _FW_LINKED|WIFI_ADHOC_MASTER_STATE) == true) {
> +	if (check_fwstate(pmlmepriv,
> +		_FW_LINKED | WIFI_ADHOC_MASTER_STATE)) {

This indentation is still not correct and it doesn't apply to 
staging-next either.
Best regards,
Luka Gejak

> 		if ((pmlmepriv->assoc_ssid.ssid_length == ssid->ssid_length) &&
> 		    (!memcmp(&pmlmepriv->assoc_ssid.ssid, ssid->ssid, ssid->ssid_length))) {
> 			if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == false) {
>
> base-commit: 26fd6bff2c050196005312d1d306889220952a99


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

* Re: [PATCH v5] staging: rtl8723bs: remove unnecessary comparison to true
  2026-05-07  5:21 [PATCH v5] staging: rtl8723bs: remove unnecessary comparison to true Ashwin Gundarapu
  2026-05-07 14:31 ` Luka Gejak
@ 2026-05-07 14:37 ` Luka Gejak
  1 sibling, 0 replies; 3+ messages in thread
From: Luka Gejak @ 2026-05-07 14:37 UTC (permalink / raw)
  To: Ashwin Gundarapu, gregkh; +Cc: linux-kernel, linux-staging

On Thu May 7, 2026 at 7:21 AM CEST, Ashwin Gundarapu wrote:
> Remove explicit comparison to true in check_fwstate() call and
> add spacing around the bitwise OR operator to improve code style.
>
> Signed-off-by: Ashwin Gundarapu <linuxuser509@zohomail.in>
> ---
> v5: Removed git header from email body. Fixed indentation on
> the second line of the function call. Added full version history.
>
> v4: Moved changelog below the --- separator. Ran checkpatch.pl
> - no errors or warnings. Fixed whitespace per Greg KH's review.
>
> v3: Fixed double --- line and corrected whitespace formatting.
>
> v2: Resent with corrected whitespace via Thunderbird plain text mode.
>
>  drivers/staging/rtl8723bs/core/rtw_ioctl_set.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
> index c70541f95a73..c100a0d70fe2 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
> @@ -151,7 +151,8 @@ u8 rtw_set_802_11_ssid(struct adapter *padapter, struct ndis_802_11_ssid *ssid)
> 	else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true)
> 		goto release_mlme_lock;
>  
> -	if (check_fwstate(pmlmepriv, _FW_LINKED|WIFI_ADHOC_MASTER_STATE) == true) {
> +	if (check_fwstate(pmlmepriv,
> +		_FW_LINKED | WIFI_ADHOC_MASTER_STATE)) {

Please align it as you see in the following block:
	if (check_fwstate(pmlmepriv,
	    _FW_LINKED | WIFI_ADHOC_MASTER_STATE)) {
Best regards,
Luka Gejak
> 		if ((pmlmepriv->assoc_ssid.ssid_length == ssid->ssid_length) &&
> 		    (!memcmp(&pmlmepriv->assoc_ssid.ssid, ssid->ssid, ssid->ssid_length))) {
> 			if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == false) {
>
> base-commit: 26fd6bff2c050196005312d1d306889220952a99


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

end of thread, other threads:[~2026-05-07 14:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-07  5:21 [PATCH v5] staging: rtl8723bs: remove unnecessary comparison to true Ashwin Gundarapu
2026-05-07 14:31 ` Luka Gejak
2026-05-07 14:37 ` Luka Gejak

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