public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: remove unnecessary comparison to true
@ 2026-05-03 13:10 Ashwin Gundarapu
  2026-05-03 14:22 ` Nikolay Kulikov
  0 siblings, 1 reply; 8+ messages in thread
From: Ashwin Gundarapu @ 2026-05-03 13:10 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 151 bytes --]

Remove unnecessary comparison to true in conditional statement.
Found by checkpatch.

Signed-off-by: Ashwin Gundarapu <ashwin.gundarapu@gmail.com>
---

[-- Attachment #1.2: Type: text/html, Size: 245 bytes --]

[-- Attachment #2: 0001-staging-rtl8723bs-remove-unnecessary-comparison-to-t.patch --]
[-- Type: text/x-patch, Size: 1361 bytes --]

From b49d621579be96ef71e3206b888f3ab39c297491 Mon Sep 17 00:00:00 2001
From: Ashwin Gundarapu <ashwin.gundarapu@gmail.com>
Date: Sat, 2 May 2026 17:19:48 +0530
Subject: [PATCH] staging: rtl8723bs: remove unnecessary comparison to true

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 <ashwin.gundarapu@gmail.com>
---
 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) {
-- 
2.43.0


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

* Re: [PATCH] staging: rtl8723bs: remove unnecessary comparison to true
  2026-05-03 13:10 Ashwin Gundarapu
@ 2026-05-03 14:22 ` Nikolay Kulikov
  0 siblings, 0 replies; 8+ messages in thread
From: Nikolay Kulikov @ 2026-05-03 14:22 UTC (permalink / raw)
  To: Ashwin Gundarapu; +Cc: gregkh, linux-staging, linux-kernel

On Sun, May 03, 2026 at 06:40:53PM +0530, Ashwin Gundarapu wrote:
> Remove unnecessary comparison to true in conditional statement.
> Found by checkpatch.
> 
> Signed-off-by: Ashwin Gundarapu <ashwin.gundarapu@gmail.com>
> ---

> From b49d621579be96ef71e3206b888f3ab39c297491 Mon Sep 17 00:00:00 2001
> From: Ashwin Gundarapu <ashwin.gundarapu@gmail.com>
> Date: Sat, 2 May 2026 17:19:48 +0530
> Subject: [PATCH] staging: rtl8723bs: remove unnecessary comparison to true
> 
> 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 <ashwin.gundarapu@gmail.com>
> ---
>  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) {
> -- 
> 2.43.0
> 

Hello,

Your patch arrived as an attachment, not in the body of the email. The
kernel development process requires patches to be in the body of the
email so they can be viewed and quoted in replies.

Please resend it using "git send-email'.
See Documentation/process/submitting-patches.rst and [1] for more
information.

[1] https://kernelnewbies.org/FirstKernelPatch


Thanks,
Nikolay

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

* [PATCH] staging: rtl8723bs: remove unnecessary comparison to true
@ 2026-05-05  9:39 Ashwin Gundarapu
  2026-05-05  9:58 ` gregkh
  0 siblings, 1 reply; 8+ messages in thread
From: Ashwin Gundarapu @ 2026-05-05  9:39 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel


From 833733dda327c72d63bcfb18701fadabae03e4d2 Mon Sep 17 00:00:00 2001
From: Ashwin Gundarapu <linuxuser509@zohomail.in>
Date: Sat, 2 May 2026 17:19:48 +0530
Subject: [PATCH] staging: rtl8723bs: remove unnecessary comparison to true

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>
---
 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] 8+ messages in thread

* Re: [PATCH] staging: rtl8723bs: remove unnecessary comparison to true
       [not found] <19df778aebb.7f64067a17835.894066473533179316@zohomail.in>
@ 2026-05-05  9:55 ` gregkh
  0 siblings, 0 replies; 8+ messages in thread
From: gregkh @ 2026-05-05  9:55 UTC (permalink / raw)
  To: Ashwin Gundarapu; +Cc: linux-staging, linux-kernel

On Tue, May 05, 2026 at 02:59:34PM +0530, Ashwin Gundarapu wrote:
> >From 833733dda327c72d63bcfb18701fadabae03e4d2 Mon Sep 17 00:00:00 2001
> 
> From: Ashwin Gundarapu < mailto:linuxuser509@zohomail.in >
> 
> Date: Sat, 2 May 2026 17:19:48 +0530
> 
> Subject: [PATCH] staging: rtl8723bs: remove unnecessary comparison to true
> 
> 
> 
> 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 < mailto:linuxuser509@zohomail.in >
> 
> ---
> 
> 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

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch is malformed (tabs converted to spaces, linewrapped, etc.)
  and can not be applied.  Please read the file,
  Documentation/process/email-clients.rst in order to fix this.


If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

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

* Re: [PATCH] staging: rtl8723bs: remove unnecessary comparison to true
  2026-05-05  9:39 [PATCH] staging: rtl8723bs: remove unnecessary comparison to true Ashwin Gundarapu
@ 2026-05-05  9:58 ` gregkh
  0 siblings, 0 replies; 8+ messages in thread
From: gregkh @ 2026-05-05  9:58 UTC (permalink / raw)
  To: Ashwin Gundarapu; +Cc: linux-staging, linux-kernel

On Tue, May 05, 2026 at 03:09:17PM +0530, Ashwin Gundarapu wrote:
> 
> >From 833733dda327c72d63bcfb18701fadabae03e4d2 Mon Sep 17 00:00:00 2001
> From: Ashwin Gundarapu <linuxuser509@zohomail.in>
> Date: Sat, 2 May 2026 17:19:48 +0530
> Subject: [PATCH] staging: rtl8723bs: remove unnecessary comparison to true

This should not be here.

> 
> 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>
> ---
>  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)) {

You also wrapped the line, why?  checkpatch should have complained about
this too.

thanks,

greg k-h

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

* [PATCH] staging: rtl8723bs: remove unnecessary comparison to true
@ 2026-05-05 10:08 Ashwin Gundarapu
  2026-05-05 10:13 ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Ashwin Gundarapu @ 2026-05-05 10:08 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel

 From 833733dda327c72d63bcfb18701fadabae03e4d2 Mon Sep 17 00:00:00 2001
From: Ashwin Gundarapu <linuxuser509@zohomail.in>
Date: Sat, 2 May 2026 17:19:48 +0530
Subject: [PATCH] staging: rtl8723bs: remove unnecessary comparison to true

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>
---
  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] 8+ messages in thread

* Re: [PATCH] staging: rtl8723bs: remove unnecessary comparison to true
  2026-05-05 10:08 Ashwin Gundarapu
@ 2026-05-05 10:13 ` Greg KH
  0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2026-05-05 10:13 UTC (permalink / raw)
  To: Ashwin Gundarapu; +Cc: linux-staging, linux-kernel

On Tue, May 05, 2026 at 03:38:39PM +0530, Ashwin Gundarapu wrote:
> From 833733dda327c72d63bcfb18701fadabae03e4d2 Mon Sep 17 00:00:00 2001
> From: Ashwin Gundarapu <linuxuser509@zohomail.in>
> Date: Sat, 2 May 2026 17:19:48 +0530
> Subject: [PATCH] staging: rtl8723bs: remove unnecessary comparison to true
> 
> 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>
> ---
>  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
> 
> 

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- This looks like a new version of a previously submitted patch, but you
  did not list below the --- line any changes from the previous version.
  Please read the section entitled "The canonical patch format" in the
  kernel file, Documentation/process/submitting-patches.rst for what
  needs to be done here to properly describe this.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

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

* [PATCH] staging: rtl8723bs: remove unnecessary comparison to true
@ 2026-05-05 10:17 Ashwin Gundarapu
  0 siblings, 0 replies; 8+ messages in thread
From: Ashwin Gundarapu @ 2026-05-05 10:17 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, linux-staging

 From 86e105cece56ebf48c8e9ac86d417d201ebf081d Mon Sep 17 00:00:00 2001
From: Ashwin Gundarapu <linuxuser509@zohomail.in>
Date: Sat, 2 May 2026 17:19:48 +0530
Subject: [PATCH] staging: rtl8723bs: remove unnecessary comparison to true

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

---

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

Signed-off-by: Ashwin Gundarapu <linuxuser509@zohomail.in>
---
  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] 8+ messages in thread

end of thread, other threads:[~2026-05-05 10:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-05  9:39 [PATCH] staging: rtl8723bs: remove unnecessary comparison to true Ashwin Gundarapu
2026-05-05  9:58 ` gregkh
  -- strict thread matches above, loose matches on Subject: below --
2026-05-05 10:17 Ashwin Gundarapu
2026-05-05 10:08 Ashwin Gundarapu
2026-05-05 10:13 ` Greg KH
     [not found] <19df778aebb.7f64067a17835.894066473533179316@zohomail.in>
2026-05-05  9:55 ` gregkh
2026-05-03 13:10 Ashwin Gundarapu
2026-05-03 14:22 ` Nikolay Kulikov

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