Commit c40753b5 authored by Harisangam Sharvari's avatar Harisangam Sharvari Committed by Greg Kroah-Hartman

staging: rtl8192u: Removed redundant bool comparisons in r8192U_dm.c

This patch was detected with the help of coccinelle tool.
The redundant comparisons of bool variables are removed in r8192U_dm.c.
Signed-off-by: default avatarHarisangam Sharvari <sharisan@visteon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 25e2704c
...@@ -563,7 +563,7 @@ static void dm_TXPowerTrackingCallback_TSSI(struct net_device *dev) ...@@ -563,7 +563,7 @@ static void dm_TXPowerTrackingCallback_TSSI(struct net_device *dev)
break; break;
} }
} }
if (viviflag == true) { if (viviflag) {
write_nic_byte(dev, 0x1ba, 0); write_nic_byte(dev, 0x1ba, 0);
viviflag = false; viviflag = false;
RT_TRACE(COMP_POWER_TRACKING, "we filtered the data\n"); RT_TRACE(COMP_POWER_TRACKING, "we filtered the data\n");
...@@ -766,7 +766,7 @@ void dm_txpower_trackingcallback(struct work_struct *work) ...@@ -766,7 +766,7 @@ void dm_txpower_trackingcallback(struct work_struct *work)
struct r8192_priv *priv = container_of(dwork, struct r8192_priv, txpower_tracking_wq); struct r8192_priv *priv = container_of(dwork, struct r8192_priv, txpower_tracking_wq);
struct net_device *dev = priv->ieee80211->dev; struct net_device *dev = priv->ieee80211->dev;
if (priv->bDcut == true) if (priv->bDcut)
dm_TXPowerTrackingCallback_TSSI(dev); dm_TXPowerTrackingCallback_TSSI(dev);
else else
dm_TXPowerTrackingCallback_ThermalMeter(dev); dm_TXPowerTrackingCallback_ThermalMeter(dev);
...@@ -1301,7 +1301,7 @@ void dm_initialize_txpower_tracking(struct net_device *dev) ...@@ -1301,7 +1301,7 @@ void dm_initialize_txpower_tracking(struct net_device *dev)
{ {
struct r8192_priv *priv = ieee80211_priv(dev); struct r8192_priv *priv = ieee80211_priv(dev);
if (priv->bDcut == true) if (priv->bDcut)
dm_InitializeTXPowerTracking_TSSI(dev); dm_InitializeTXPowerTracking_TSSI(dev);
else else
dm_InitializeTXPowerTracking_ThermalMeter(dev); dm_InitializeTXPowerTracking_ThermalMeter(dev);
...@@ -1357,7 +1357,7 @@ static void dm_check_txpower_tracking(struct net_device *dev) ...@@ -1357,7 +1357,7 @@ static void dm_check_txpower_tracking(struct net_device *dev)
#ifdef RTL8190P #ifdef RTL8190P
dm_CheckTXPowerTracking_TSSI(dev); dm_CheckTXPowerTracking_TSSI(dev);
#else #else
if (priv->bDcut == true) if (priv->bDcut)
dm_CheckTXPowerTracking_TSSI(dev); dm_CheckTXPowerTracking_TSSI(dev);
else else
dm_CheckTXPowerTracking_ThermalMeter(dev); dm_CheckTXPowerTracking_ThermalMeter(dev);
...@@ -1467,7 +1467,7 @@ void dm_cck_txpower_adjust(struct net_device *dev, bool binch14) ...@@ -1467,7 +1467,7 @@ void dm_cck_txpower_adjust(struct net_device *dev, bool binch14)
{ /* dm_CCKTxPowerAdjust */ { /* dm_CCKTxPowerAdjust */
struct r8192_priv *priv = ieee80211_priv(dev); struct r8192_priv *priv = ieee80211_priv(dev);
if (priv->bDcut == true) if (priv->bDcut)
dm_CCKTxPowerAdjust_TSSI(dev, binch14); dm_CCKTxPowerAdjust_TSSI(dev, binch14);
else else
dm_CCKTxPowerAdjust_ThermalMeter(dev, binch14); dm_CCKTxPowerAdjust_ThermalMeter(dev, binch14);
...@@ -3062,7 +3062,7 @@ static void dm_dynamic_txpower(struct net_device *dev) ...@@ -3062,7 +3062,7 @@ static void dm_dynamic_txpower(struct net_device *dev)
priv->bDynamicTxLowPower = false; priv->bDynamicTxLowPower = false;
} else { } else {
/* high power state check */ /* high power state check */
if (priv->undecorated_smoothed_pwdb < txlowpower_threshold && priv->bDynamicTxHighPower == true) if (priv->undecorated_smoothed_pwdb < txlowpower_threshold && priv->bDynamicTxHighPower)
priv->bDynamicTxHighPower = false; priv->bDynamicTxHighPower = false;
/* low power state check */ /* low power state check */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment