aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
diff options
context:
space:
mode:
authorAditya Srivastava <yashsri421@gmail.com>2020-12-21 01:12:24 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-28 15:12:25 +0100
commit1e9a9c7cba3ca5cbd3201a9f3b8dc6e8d7bef1c0 (patch)
tree7d1226b6e78406c1df53f0ed76130d4424a57204 /drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
parentstaging: fwserial: Fix error handling in fwserial_create (diff)
downloadlinux-dev-1e9a9c7cba3ca5cbd3201a9f3b8dc6e8d7bef1c0.tar.xz
linux-dev-1e9a9c7cba3ca5cbd3201a9f3b8dc6e8d7bef1c0.zip
staging: rtl8192e: fix bool comparison in expressions
There are certain conditional expressions in rtl8192e, where a boolean variable is compared with true/false, in forms such as (foo == true) or (false != bar), which does not comply with checkpatch.pl (CHECK: BOOL_COMPARISON), according to which boolean variables should be themselves used in the condition, rather than comparing with true/false E.g. in drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c, "if (Type == true)" can be replaced with: "if (Type)" Replace all such expressions with the bool variables appropriately Signed-off-by: Aditya Srivastava <yashsri421@gmail.com> Link: https://lore.kernel.org/r/20201220194224.12835-1-yashsri421@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192e/rtl8192e/rtl_dm.c')
-rw-r--r--drivers/staging/rtl8192e/rtl8192e/rtl_dm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index 462835684e8b..e340be3ebb97 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -1765,7 +1765,7 @@ static void _rtl92e_dm_cts_to_self(struct net_device *dev)
unsigned long curTxOkCnt = 0;
unsigned long curRxOkCnt = 0;
- if (priv->rtllib->bCTSToSelfEnable != true) {
+ if (!priv->rtllib->bCTSToSelfEnable) {
pHTInfo->IOTAction &= ~HT_IOT_ACT_FORCED_CTS2SELF;
return;
}
@@ -2447,7 +2447,7 @@ static void _rtl92e_dm_dynamic_tx_power(struct net_device *dev)
unsigned int txhipower_threshold = 0;
unsigned int txlowpower_threshold = 0;
- if (priv->rtllib->bdynamic_txpower_enable != true) {
+ if (!priv->rtllib->bdynamic_txpower_enable) {
priv->bDynamicTxHighPower = false;
priv->bDynamicTxLowPower = false;
return;