All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Mariyam Shahid <mariyam.shahid135@gmail.com>
Cc: dan.carpenter@linaro.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723bs: fix YODA condition warnings
Date: Mon, 23 Feb 2026 16:19:03 +0100	[thread overview]
Message-ID: <2026022352-squid-consult-b1d7@gregkh> (raw)
In-Reply-To: <20260211135545.13505-1-mariyam.shahid135@gmail.com>

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 :(

  reply	other threads:[~2026-02-23 15:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-11 13:55 [PATCH] staging: rtl8723bs: fix YODA condition warnings Mariyam Shahid
2026-02-23 15:19 ` Greg KH [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2026022352-squid-consult-b1d7@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=dan.carpenter@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mariyam.shahid135@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.