* [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
* [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
* Re: [PATCH] staging: rtl8723bs: fix YODA condition warnings
2026-02-11 13:57 Mariyam Shahid
@ 2026-02-11 15:09 ` Dan Carpenter
2026-02-11 15:53 ` Mariyam Shahid
0 siblings, 1 reply; 6+ messages in thread
From: Dan Carpenter @ 2026-02-11 15:09 UTC (permalink / raw)
To: Mariyam Shahid; +Cc: gregkh, linux-staging, linux-kernel
On Wed, Feb 11, 2026 at 06:57:31PM +0500, Mariyam Shahid wrote:
> 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>
> ---
Someone already did this. You need to work against the latest tree.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] staging: rtl8723bs: fix YODA condition warnings
2026-02-11 15:09 ` Dan Carpenter
@ 2026-02-11 15:53 ` Mariyam Shahid
0 siblings, 0 replies; 6+ messages in thread
From: Mariyam Shahid @ 2026-02-11 15:53 UTC (permalink / raw)
To: Dan Carpenter; +Cc: gregkh, linux-staging, linux-kernel
On Wed, Feb 11, 2026 at 8:09 PM Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> On Wed, Feb 11, 2026 at 06:57:31PM +0500, Mariyam Shahid wrote:
> > 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>
> > ---
>
> Someone already did this. You need to work against the latest tree.
>
> regards,
> dan carpenter
>
Thank you for letting me know!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] staging: rtl8723bs: fix YODA condition warnings
2026-02-11 13:55 [PATCH] staging: rtl8723bs: fix YODA condition warnings Mariyam Shahid
@ 2026-02-23 15:19 ` Greg KH
2026-02-23 16:35 ` Mariyam Shahid
0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2026-02-23 15:19 UTC (permalink / raw)
To: Mariyam Shahid; +Cc: dan.carpenter, linux-staging, linux-kernel
On Wed, Feb 11, 2026 at 06:55:45PM +0500, Mariyam Shahid wrote:
> 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
>
>
Does not apply to 7.0-rc1 :(
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] staging: rtl8723bs: fix YODA condition warnings
2026-02-23 15:19 ` Greg KH
@ 2026-02-23 16:35 ` Mariyam Shahid
0 siblings, 0 replies; 6+ messages in thread
From: Mariyam Shahid @ 2026-02-23 16:35 UTC (permalink / raw)
To: Greg KH; +Cc: dan.carpenter, linux-staging, linux-kernel
On Mon, Feb 23, 2026 at 8:19 PM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Wed, Feb 11, 2026 at 06:55:45PM +0500, Mariyam Shahid wrote:
> > 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
> >
> >
>
> Does not apply to 7.0-rc1 :(
Hi Greg,
Thank you for the feedback.
Regards,
Mariyam
^ permalink raw reply [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:55 [PATCH] staging: rtl8723bs: fix YODA condition warnings Mariyam Shahid
2026-02-23 15:19 ` Greg KH
2026-02-23 16:35 ` Mariyam Shahid
-- strict thread matches above, loose matches on Subject: below --
2026-02-11 13:57 Mariyam Shahid
2026-02-11 15:09 ` Dan Carpenter
2026-02-11 15:53 ` Mariyam Shahid
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox