public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: fix YODA condition warnings
@ 2026-02-11 13:57 Mariyam Shahid
  2026-02-11 15:09 ` Dan Carpenter
  0 siblings, 1 reply; 6+ messages in thread
From: Mariyam Shahid @ 2026-02-11 13:57 UTC (permalink / raw)
  To: mariyam.shahid135, gregkh; +Cc: dan.carpenter, linux-staging, linux-kernel

Place the constants on right side of the comparison in rtw_security.c
to follow kernel coding style. This resolves a checkpatch warning.

Signed-off-by: Mariyam Shahid <mariyam.shahid135@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_security.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
index 8ee5bed252bf..601178dafcc7 100644
--- a/drivers/staging/rtl8723bs/core/rtw_security.c
+++ b/drivers/staging/rtl8723bs/core/rtw_security.c
@@ -1488,7 +1488,8 @@ void rtw_sec_restore_wep_key(struct adapter *adapter)
 	struct security_priv *securitypriv = &(adapter->securitypriv);
 	signed int keyid;
 
-	if ((_WEP40_ == securitypriv->dot11PrivacyAlgrthm) || (_WEP104_ == securitypriv->dot11PrivacyAlgrthm)) {
+	if ((securitypriv->dot11PrivacyAlgrthm == _WEP40_) ||
+	    (securitypriv->dot11PrivacyAlgrthm == _WEP104_)) {
 		for (keyid = 0; keyid < 4; keyid++) {
 			if (securitypriv->key_mask & BIT(keyid)) {
 				if (keyid == securitypriv->dot11PrivacyKeyIndex)
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH] staging: rtl8723bs: fix YODA condition warnings
@ 2026-02-11 13:55 Mariyam Shahid
  2026-02-23 15:19 ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Mariyam Shahid @ 2026-02-11 13:55 UTC (permalink / raw)
  To: gregkh; +Cc: dan.carpenter, linux-staging, linux-kernel, Mariyam Shahid

Place the constants on right side of the comparison in rtw_security.c
to follow kernel coding style. This resolves a checkpatch warning.

Signed-off-by: Mariyam Shahid <mariyam.shahid135@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_security.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
index 8ee5bed252bf..601178dafcc7 100644
--- a/drivers/staging/rtl8723bs/core/rtw_security.c
+++ b/drivers/staging/rtl8723bs/core/rtw_security.c
@@ -1488,7 +1488,8 @@ void rtw_sec_restore_wep_key(struct adapter *adapter)
 	struct security_priv *securitypriv = &(adapter->securitypriv);
 	signed int keyid;
 
-	if ((_WEP40_ == securitypriv->dot11PrivacyAlgrthm) || (_WEP104_ == securitypriv->dot11PrivacyAlgrthm)) {
+	if ((securitypriv->dot11PrivacyAlgrthm == _WEP40_) ||
+	    (securitypriv->dot11PrivacyAlgrthm == _WEP104_)) {
 		for (keyid = 0; keyid < 4; keyid++) {
 			if (securitypriv->key_mask & BIT(keyid)) {
 				if (keyid == securitypriv->dot11PrivacyKeyIndex)
-- 
2.43.0


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

end of thread, other threads:[~2026-02-23 16:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-11 13:57 [PATCH] staging: rtl8723bs: fix YODA condition warnings Mariyam Shahid
2026-02-11 15:09 ` Dan Carpenter
2026-02-11 15:53   ` Mariyam Shahid
  -- strict thread matches above, loose matches on Subject: below --
2026-02-11 13:55 Mariyam Shahid
2026-02-23 15:19 ` Greg KH
2026-02-23 16:35   ` Mariyam Shahid

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