Re: [PATCH] staging: rtl8723bs: fix YODA condition warnings
From: Mariyam Shahid
Date: Mon Feb 23 2026 - 11:44:47 EST
On Mon, Feb 23, 2026 at 8:19 PM Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxx>
> > ---
> > 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