Commit 44acc6b5 authored by Cristina Opriceana's avatar Cristina Opriceana Committed by Greg Kroah-Hartman

Staging: rtl8192e: Bool tests don't need comparisons

This patch removes comparisons to true/false values on bool variables.
Warning found by coccinelle:
"WARNING: Comparison to bool".
Signed-off-by: default avatarCristina Opriceana <cristina.opriceana@gmail.com>
Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 26049b11
...@@ -67,7 +67,7 @@ static int r8192_wx_set_rate(struct net_device *dev, ...@@ -67,7 +67,7 @@ static int r8192_wx_set_rate(struct net_device *dev,
int ret; int ret;
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
if (priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
down(&priv->wx_sem); down(&priv->wx_sem);
...@@ -87,7 +87,7 @@ static int r8192_wx_set_rts(struct net_device *dev, ...@@ -87,7 +87,7 @@ static int r8192_wx_set_rts(struct net_device *dev,
int ret; int ret;
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
if (priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
down(&priv->wx_sem); down(&priv->wx_sem);
...@@ -115,7 +115,7 @@ static int r8192_wx_set_power(struct net_device *dev, ...@@ -115,7 +115,7 @@ static int r8192_wx_set_power(struct net_device *dev,
int ret; int ret;
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
if (priv->bHwRadioOff == true) { if (priv->bHwRadioOff) {
RT_TRACE(COMP_ERR, "%s():Hw is Radio Off, we can't set " RT_TRACE(COMP_ERR, "%s():Hw is Radio Off, we can't set "
"Power,return\n", __func__); "Power,return\n", __func__);
return 0; return 0;
...@@ -145,7 +145,7 @@ static int r8192_wx_set_rawtx(struct net_device *dev, ...@@ -145,7 +145,7 @@ static int r8192_wx_set_rawtx(struct net_device *dev,
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
int ret; int ret;
if (priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
down(&priv->wx_sem); down(&priv->wx_sem);
...@@ -308,7 +308,7 @@ static int r8192_wx_set_debugflag(struct net_device *dev, ...@@ -308,7 +308,7 @@ static int r8192_wx_set_debugflag(struct net_device *dev,
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
u8 c = *extra; u8 c = *extra;
if (priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
printk(KERN_INFO "=====>%s(), *extra:%x, debugflag:%x\n", __func__, printk(KERN_INFO "=====>%s(), *extra:%x, debugflag:%x\n", __func__,
...@@ -329,7 +329,7 @@ static int r8192_wx_set_mode(struct net_device *dev, struct iw_request_info *a, ...@@ -329,7 +329,7 @@ static int r8192_wx_set_mode(struct net_device *dev, struct iw_request_info *a,
enum rt_rf_power_state rtState; enum rt_rf_power_state rtState;
int ret; int ret;
if (priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
rtState = priv->rtllib->eRFPowerState; rtState = priv->rtllib->eRFPowerState;
down(&priv->wx_sem); down(&priv->wx_sem);
...@@ -470,7 +470,7 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a, ...@@ -470,7 +470,7 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
return 0; return 0;
} }
if (priv->bHwRadioOff == true) { if (priv->bHwRadioOff) {
printk(KERN_INFO "================>%s(): hwradio off\n", printk(KERN_INFO "================>%s(): hwradio off\n",
__func__); __func__);
return 0; return 0;
...@@ -552,7 +552,7 @@ static int r8192_wx_get_scan(struct net_device *dev, struct iw_request_info *a, ...@@ -552,7 +552,7 @@ static int r8192_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
if (!priv->up) if (!priv->up)
return -ENETDOWN; return -ENETDOWN;
if (priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
...@@ -572,7 +572,7 @@ static int r8192_wx_set_essid(struct net_device *dev, ...@@ -572,7 +572,7 @@ static int r8192_wx_set_essid(struct net_device *dev,
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
int ret; int ret;
if (priv->bHwRadioOff == true) { if (priv->bHwRadioOff) {
printk(KERN_INFO "=========>%s():hw radio off,or Rf state is " printk(KERN_INFO "=========>%s():hw radio off,or Rf state is "
"eRfOff, return\n", __func__); "eRfOff, return\n", __func__);
return 0; return 0;
...@@ -638,7 +638,7 @@ static int r8192_wx_set_freq(struct net_device *dev, struct iw_request_info *a, ...@@ -638,7 +638,7 @@ static int r8192_wx_set_freq(struct net_device *dev, struct iw_request_info *a,
int ret; int ret;
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
if (priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
down(&priv->wx_sem); down(&priv->wx_sem);
...@@ -665,7 +665,7 @@ static int r8192_wx_set_frag(struct net_device *dev, ...@@ -665,7 +665,7 @@ static int r8192_wx_set_frag(struct net_device *dev,
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
if (priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
if (wrqu->frag.disabled) if (wrqu->frag.disabled)
...@@ -704,7 +704,7 @@ static int r8192_wx_set_wap(struct net_device *dev, ...@@ -704,7 +704,7 @@ static int r8192_wx_set_wap(struct net_device *dev,
int ret; int ret;
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
if (priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
down(&priv->wx_sem); down(&priv->wx_sem);
...@@ -754,7 +754,7 @@ static int r8192_wx_set_enc(struct net_device *dev, ...@@ -754,7 +754,7 @@ static int r8192_wx_set_enc(struct net_device *dev,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x03} }; {0x00, 0x00, 0x00, 0x00, 0x00, 0x03} };
int i; int i;
if (priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
if (!priv->up) if (!priv->up)
...@@ -843,7 +843,7 @@ static int r8192_wx_set_scan_type(struct net_device *dev, ...@@ -843,7 +843,7 @@ static int r8192_wx_set_scan_type(struct net_device *dev,
int *parms = (int *)p; int *parms = (int *)p;
int mode = parms[0]; int mode = parms[0];
if (priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
priv->rtllib->active_scan = mode; priv->rtllib->active_scan = mode;
...@@ -861,7 +861,7 @@ static int r8192_wx_set_retry(struct net_device *dev, ...@@ -861,7 +861,7 @@ static int r8192_wx_set_retry(struct net_device *dev,
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
int err = 0; int err = 0;
if (priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
down(&priv->wx_sem); down(&priv->wx_sem);
...@@ -944,7 +944,7 @@ static int r8192_wx_set_sens(struct net_device *dev, ...@@ -944,7 +944,7 @@ static int r8192_wx_set_sens(struct net_device *dev,
short err = 0; short err = 0;
if (priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
down(&priv->wx_sem); down(&priv->wx_sem);
...@@ -971,7 +971,7 @@ static int r8192_wx_set_enc_ext(struct net_device *dev, ...@@ -971,7 +971,7 @@ static int r8192_wx_set_enc_ext(struct net_device *dev,
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
struct rtllib_device *ieee = priv->rtllib; struct rtllib_device *ieee = priv->rtllib;
if (priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
down(&priv->wx_sem); down(&priv->wx_sem);
...@@ -1052,7 +1052,7 @@ static int r8192_wx_set_auth(struct net_device *dev, ...@@ -1052,7 +1052,7 @@ static int r8192_wx_set_auth(struct net_device *dev,
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
if (priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
down(&priv->wx_sem); down(&priv->wx_sem);
...@@ -1070,7 +1070,7 @@ static int r8192_wx_set_mlme(struct net_device *dev, ...@@ -1070,7 +1070,7 @@ static int r8192_wx_set_mlme(struct net_device *dev,
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
if (priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
down(&priv->wx_sem); down(&priv->wx_sem);
...@@ -1087,7 +1087,7 @@ static int r8192_wx_set_gen_ie(struct net_device *dev, ...@@ -1087,7 +1087,7 @@ static int r8192_wx_set_gen_ie(struct net_device *dev,
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
if (priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
down(&priv->wx_sem); down(&priv->wx_sem);
......
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