netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] rtlwifi: rtl8192se: Simplify bool comparison.
@ 2021-01-19  6:32 Jiapeng Zhong
  2021-01-19  7:35 ` Pkshih
  0 siblings, 1 reply; 3+ messages in thread
From: Jiapeng Zhong @ 2021-01-19  6:32 UTC (permalink / raw)
  To: pkshih
  Cc: kvalo, davem, kuba, Larry.Finger, chiu, linux-wireless, netdev,
	linux-kernel, Jiapeng Zhong

Fix the follow coccicheck warnings:

./drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c:2305:6-27:
WARNING: Comparison of 0/1 to bool variable.

./drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c:1376:5-26:
WARNING: Comparison of 0/1 to bool variable.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
---
Changes in v2:
  -Modified subject.

 drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c
index 47fabce..aff8ab0 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c
@@ -1373,7 +1373,7 @@ static void _rtl92se_gen_refreshledstate(struct ieee80211_hw *hw)
 	struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
 	struct rtl_led *pled0 = &rtlpriv->ledctl.sw_led0;
 
-	if (rtlpci->up_first_time == 1)
+	if (rtlpci->up_first_time)
 		return;
 
 	if (rtlpriv->psc.rfoff_reason == RF_CHANGE_BY_IPS)
@@ -2302,7 +2302,7 @@ bool rtl92se_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 *valid)
 	bool turnonbypowerdomain = false;
 
 	/* just 8191se can check gpio before firstup, 92c/92d have fixed it */
-	if ((rtlpci->up_first_time == 1) || (rtlpci->being_init_adapter))
+	if (rtlpci->up_first_time || rtlpci->being_init_adapter)
 		return false;
 
 	if (ppsc->swrf_processing)
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] rtlwifi: rtl8192se: Simplify bool comparison.
  2021-01-19  6:32 [PATCH v2] rtlwifi: rtl8192se: Simplify bool comparison Jiapeng Zhong
@ 2021-01-19  7:35 ` Pkshih
  2021-01-19  8:03   ` Kalle Valo
  0 siblings, 1 reply; 3+ messages in thread
From: Pkshih @ 2021-01-19  7:35 UTC (permalink / raw)
  To: abaci-bugfix
  Cc: Larry.Finger, linux-kernel, chiu, kvalo, kuba, netdev, davem,
	linux-wireless

On Tue, 2021-01-19 at 14:32 +0800, Jiapeng Zhong wrote:
> Fix the follow coccicheck warnings:
> 
> ./drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c:2305:6-27:
> WARNING: Comparison of 0/1 to bool variable.
> 
> ./drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c:1376:5-26:
> WARNING: Comparison of 0/1 to bool variable.
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
> ---
> Changes in v2:
>   -Modified subject.
> 

You forget to remove the period at the end of subject.
i.e.
"rtlwifi: rtl8192se: Simplify bool comparison"

---
Ping-Ke


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] rtlwifi: rtl8192se: Simplify bool comparison.
  2021-01-19  7:35 ` Pkshih
@ 2021-01-19  8:03   ` Kalle Valo
  0 siblings, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2021-01-19  8:03 UTC (permalink / raw)
  To: Pkshih
  Cc: abaci-bugfix, Larry.Finger, linux-kernel, chiu, kuba, netdev,
	davem, linux-wireless

Pkshih <pkshih@realtek.com> writes:

> On Tue, 2021-01-19 at 14:32 +0800, Jiapeng Zhong wrote:
>> Fix the follow coccicheck warnings:
>> 
>> ./drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c:2305:6-27:
>> WARNING: Comparison of 0/1 to bool variable.
>> 
>> ./drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c:1376:5-26:
>> WARNING: Comparison of 0/1 to bool variable.
>> 
>> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
>> Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
>> ---
>> Changes in v2:
>>   -Modified subject.
>> 
>
> You forget to remove the period at the end of subject.
> i.e.
> "rtlwifi: rtl8192se: Simplify bool comparison"

I can fix that during commit.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-19  8:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-19  6:32 [PATCH v2] rtlwifi: rtl8192se: Simplify bool comparison Jiapeng Zhong
2021-01-19  7:35 ` Pkshih
2021-01-19  8:03   ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).