* [PATCH] rtlwifi: rtl8188ee: remove an accidental '-' character
@ 2025-10-31 13:04 Dan Carpenter
2025-11-03 1:17 ` Ping-Ke Shih
0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2025-10-31 13:04 UTC (permalink / raw)
To: Ping-Ke Shih, Harshit Mogalapalli
Cc: linux-wireless, linux-kernel, kernel-janitors
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.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH] rtlwifi: rtl8188ee: remove an accidental '-' character
2025-10-31 13:04 [PATCH] rtlwifi: rtl8188ee: remove an accidental '-' character Dan Carpenter
@ 2025-11-03 1:17 ` Ping-Ke Shih
2025-11-05 14:54 ` Dan Carpenter
0 siblings, 1 reply; 4+ messages in thread
From: Ping-Ke Shih @ 2025-11-03 1:17 UTC (permalink / raw)
To: Dan Carpenter, Harshit Mogalapalli
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Dan Carpenter <dan.carpenter@linaro.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@linaro.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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rtlwifi: rtl8188ee: remove an accidental '-' character
2025-11-03 1:17 ` Ping-Ke Shih
@ 2025-11-05 14:54 ` Dan Carpenter
2025-11-06 0:47 ` Ping-Ke Shih
0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2025-11-05 14:54 UTC (permalink / raw)
To: Ping-Ke Shih
Cc: Harshit Mogalapalli, linux-wireless@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
On Mon, Nov 03, 2025 at 01:17:07AM +0000, Ping-Ke Shih wrote:
> Dan Carpenter <dan.carpenter@linaro.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.
>
Ah. Good. Thanks.
Could you send that patch and give me a Reported-by tag?
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] rtlwifi: rtl8188ee: remove an accidental '-' character
2025-11-05 14:54 ` Dan Carpenter
@ 2025-11-06 0:47 ` Ping-Ke Shih
0 siblings, 0 replies; 4+ messages in thread
From: Ping-Ke Shih @ 2025-11-06 0:47 UTC (permalink / raw)
To: Dan Carpenter
Cc: Harshit Mogalapalli, linux-wireless@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Dan Carpenter <dan.carpenter@linaro.org> wrote:
> On Mon, Nov 03, 2025 at 01:17:07AM +0000, Ping-Ke Shih wrote:
> > Dan Carpenter <dan.carpenter@linaro.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.
> >
>
> Ah. Good. Thanks.
>
> Could you send that patch and give me a Reported-by tag?
>
Sent by [1].
[1] https://lore.kernel.org/linux-wireless/1762390172-21091-1-git-send-email-pkshih@realtek.com/T/#u
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-11-06 0:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-31 13:04 [PATCH] rtlwifi: rtl8188ee: remove an accidental '-' character Dan Carpenter
2025-11-03 1:17 ` Ping-Ke Shih
2025-11-05 14:54 ` Dan Carpenter
2025-11-06 0:47 ` Ping-Ke Shih
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox