* [PATCH] staging: rtl8192u: Using comparison to true is error prone
@ 2020-07-06 16:22 John Oldman
0 siblings, 0 replies; 2+ messages in thread
From: John Oldman @ 2020-07-06 16:22 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, John Oldman
clear below issues reported by checkpatch.pl:
CHECK: Using comparison to false is error prone
Signed-off-by: John Oldman <john.oldman@polehill.co.uk>
---
drivers/staging/rtl8192u/r8192U_dm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c
index c23e43b095d9..6b301acb584e 100644
--- a/drivers/staging/rtl8192u/r8192U_dm.c
+++ b/drivers/staging/rtl8192u/r8192U_dm.c
@@ -2240,7 +2240,7 @@ static void dm_ctstoself(struct net_device *dev)
unsigned long curTxOkCnt = 0;
unsigned long curRxOkCnt = 0;
- if (priv->ieee80211->bCTSToSelfEnable != true) {
+ if (!priv->ieee80211->bCTSToSelfEnable) {
pHTInfo->IOTAction &= ~HT_IOT_ACT_FORCED_CTS2SELF;
return;
}
@@ -2944,7 +2944,7 @@ static void dm_dynamic_txpower(struct net_device *dev)
unsigned int txhipower_threshold = 0;
unsigned int txlowpower_threshold = 0;
- if (priv->ieee80211->bdynamic_txpower_enable != true) {
+ if (!priv->ieee80211->bdynamic_txpower_enable) {
priv->bDynamicTxHighPower = false;
priv->bDynamicTxLowPower = false;
return;
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] staging: rtl8192u: Using comparison to true is error prone
@ 2020-05-16 16:33 John Oldman
0 siblings, 0 replies; 2+ messages in thread
From: John Oldman @ 2020-05-16 16:33 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, John Oldman
fix below issue reported by checkpatch:
CHECK: Using comparison to true is error prone
CHECK: Using comparison to false is error prone
Signed-off-by: John Oldman <john.oldman@polehill.co.uk>
---
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
index 0ee054d82832..63a561ab4a76 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
@@ -372,9 +372,9 @@ ieee80211_query_HTCapShortGI(struct ieee80211_device *ieee, struct cb_desc *tcb_
return;
}
- if ((pHTInfo->bCurBW40MHz == true) && pHTInfo->bCurShortGI40MHz)
+ if (pHTInfo->bCurBW40MHz && pHTInfo->bCurShortGI40MHz)
tcb_desc->bUseShortGI = true;
- else if ((pHTInfo->bCurBW40MHz == false) && pHTInfo->bCurShortGI20MHz)
+ else if (!pHTInfo->bCurBW40MHz && pHTInfo->bCurShortGI20MHz)
tcb_desc->bUseShortGI = true;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-06 16:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-06 16:22 [PATCH] staging: rtl8192u: Using comparison to true is error prone John Oldman
-- strict thread matches above, loose matches on Subject: below --
2020-05-16 16:33 John Oldman
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).