lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8d6962531a9545fd8279fbc7cd04340c@realtek.com>
Date: Mon, 3 Nov 2025 01:17:07 +0000
From: Ping-Ke Shih <pkshih@...ltek.com>
To: Dan Carpenter <dan.carpenter@...aro.org>,
        Harshit Mogalapalli
	<harshit.m.mogalapalli@...il.com>
CC: "linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: RE: [PATCH] rtlwifi: rtl8188ee: remove an accidental '-' character

Dan Carpenter <dan.carpenter@...aro.org> wrote:
> Sent: Friday, October 31, 2025 9:04 PM
> The "->allstasleep" variable is a 1 bit bitfield.  It can only be
> 0 or 1.  This "= -1" assignement was supposed to be "= 1".  This
> doesn't change how the code works, it's just a cleanup.

Yes, this patch doesn't change logic at all. However, it looks like existing
code is wrong, since other places in the same pattern in this driver set to 0.
More, I check vendor driver which also sets this value to 0.

> 
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> ---
> Found with a static checker rule that Harshit and I wrote.
> 
>  drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c
> b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c
> index 7252bc621211..7ef57b1c674c 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c
> @@ -694,7 +694,7 @@ void rtl88e_set_p2p_ps_offload_cmd(struct ieee80211_hw *hw, u8 p2p_ps_state)
> 
>                         if (P2P_ROLE_GO == rtlpriv->mac80211.p2p) {
>                                 p2p_ps_offload->role = 1;
> -                               p2p_ps_offload->allstasleep = -1;
> +                               p2p_ps_offload->allstasleep = 1;
>                         } else {
>                                 p2p_ps_offload->role = 0;
>                         }
> --
> 2.51.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ