diff mbox

[OPW,kernel,2/7] staging: rtl8192e: use true and false for bool variables

Message ID 1382644852-3486-2-git-send-email-valentina.manea.m@gmail.com
State New, archived
Headers show

Commit Message

Valentina Manea Oct. 24, 2013, 8 p.m. UTC
This patch fixes coccinelle errors for bool variables
initialized with 1 or 0 instead of true and false.

Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c |  2 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_core.c   | 10 +++++-----
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.c     |  6 +++---
 drivers/staging/rtl8192e/rtllib_rx.c           |  4 ++--
 drivers/staging/rtl8192e/rtllib_softmac.c      |  6 +++---
 5 files changed, 14 insertions(+), 14 deletions(-)

Comments

Rusty Russell Oct. 25, 2013, 12:33 a.m. UTC | #1
Valentina Manea <valentina.manea.m@gmail.com> writes:

> This patch fixes coccinelle errors for bool variables
> initialized with 1 or 0 instead of true and false.
>
> Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com>

Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>

Cheers,
Rusty.

> ---
>  drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c |  2 +-
>  drivers/staging/rtl8192e/rtl8192e/rtl_core.c   | 10 +++++-----
>  drivers/staging/rtl8192e/rtl8192e/rtl_dm.c     |  6 +++---
>  drivers/staging/rtl8192e/rtllib_rx.c           |  4 ++--
>  drivers/staging/rtl8192e/rtllib_softmac.c      |  6 +++---
>  5 files changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
> index a235b6c..aaa9c0c 100644
> --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
> +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
> @@ -2213,7 +2213,7 @@ rtl8192_InitializeVariables(struct net_device  *dev)
>  	priv->MidHighPwrTHR_L2 = 0x40;
>  	priv->PwrDomainProtect = false;
>  
> -	priv->bfirst_after_down = 0;
> +	priv->bfirst_after_down = false;
>  }
>  
>  void rtl8192_EnableInterrupt(struct net_device *dev)
> diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
> index 206924b..e866fee 100644
> --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
> +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
> @@ -1000,7 +1000,7 @@ static int rtl8192_sta_down(struct net_device *dev, bool shutdownrf)
>  	priv->bDriverIsGoingToUnload = true;
>  	priv->up = 0;
>  	priv->rtllib->ieee_up = 0;
> -	priv->bfirst_after_down = 1;
> +	priv->bfirst_after_down = true;
>  	RT_TRACE(COMP_DOWN, "==========>%s()\n", __func__);
>  	if (!netif_queue_stopped(dev))
>  		netif_stop_queue(dev);
> @@ -1119,8 +1119,8 @@ static void rtl8192_init_priv_variable(struct net_device *dev)
>  	priv->rtllib->hwscan_sem_up = 1;
>  	priv->rtllib->status = 0;
>  	priv->H2CTxCmdSeq = 0;
> -	priv->bDisableFrameBursting = 0;
> -	priv->bDMInitialGainEnable = 1;
> +	priv->bDisableFrameBursting = false;
> +	priv->bDMInitialGainEnable = true;
>  	priv->polling_timer_on = 0;
>  	priv->up_first_time = 1;
>  	priv->blinked_ingpio = false;
> @@ -1162,7 +1162,7 @@ static void rtl8192_init_priv_variable(struct net_device *dev)
>  	priv->CckPwEnl = 6;
>  	priv->ScanDelay = 50;
>  	priv->ResetProgress = RESET_TYPE_NORESET;
> -	priv->bForcedSilentReset = 0;
> +	priv->bForcedSilentReset = false;
>  	priv->bDisableNormalResetCheck = false;
>  	priv->force_reset = false;
>  	memset(priv->rtllib->swcamtable, 0, sizeof(struct sw_cam_table) * 32);
> @@ -1171,7 +1171,7 @@ static void rtl8192_init_priv_variable(struct net_device *dev)
>  	priv->RxCounter = 0;
>  	priv->rtllib->wx_set_enc = 0;
>  	priv->bHwRadioOff = false;
> -	priv->RegRfOff = 0;
> +	priv->RegRfOff = false;
>  	priv->isRFOff = false;
>  	priv->bInPowerSaveMode = false;
>  	priv->rtllib->RfOffReason = 0;
> diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
> index 3095e9d..a9bccbe 100644
> --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
> +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
> @@ -2265,7 +2265,7 @@ void dm_CheckRfCtrlGPIO(void *data)
>  		return;
>  
>  	if (priv->bfirst_after_down) {
> -		priv->bfirst_after_down = 1;
> +		priv->bfirst_after_down = true;
>  		return;
>  	}
>  
> @@ -2312,9 +2312,9 @@ void	dm_rf_pathcheck_workitemcallback(void *data)
>  
>  	for (i = 0; i < RF90_PATH_MAX; i++) {
>  		if (rfpath & (0x01<<i))
> -			priv->brfpath_rxenable[i] = 1;
> +			priv->brfpath_rxenable[i] = true;
>  		else
> -			priv->brfpath_rxenable[i] = 0;
> +			priv->brfpath_rxenable[i] = false;
>  	}
>  	if (!DM_RxPathSelTable.Enable)
>  		return;
> diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
> index f53790f..4689a44 100644
> --- a/drivers/staging/rtl8192e/rtllib_rx.c
> +++ b/drivers/staging/rtl8192e/rtllib_rx.c
> @@ -873,11 +873,11 @@ static size_t rtllib_rx_get_hdrlen(struct rtllib_device *ieee,
>  		if (net_ratelimit())
>  			printk(KERN_INFO "%s: find HTCControl!\n", __func__);
>  		hdrlen += 4;
> -		rx_stats->bContainHTC = 1;
> +		rx_stats->bContainHTC = true;
>  	}
>  
>  	 if (RTLLIB_QOS_HAS_SEQ(fc))
> -		rx_stats->bIsQosData = 1;
> +		rx_stats->bIsQosData = true;
>  
>  	return hdrlen;
>  }
> diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
> index 358fbcc..d9a05d9 100644
> --- a/drivers/staging/rtl8192e/rtllib_softmac.c
> +++ b/drivers/staging/rtl8192e/rtllib_softmac.c
> @@ -705,7 +705,7 @@ static void rtllib_softmac_stop_scan(struct rtllib_device *ieee)
>  	ieee->scan_watch_dog = 0;
>  	if (ieee->scanning_continue == 1) {
>  		ieee->scanning_continue = 0;
> -		ieee->actscanning = 0;
> +		ieee->actscanning = false;
>  
>  		cancel_delayed_work(&ieee->softmac_scan_wq);
>  	}
> @@ -1574,7 +1574,7 @@ static void rtllib_associate_complete_wq(void *data)
>  
>  	if (ieee->is_silent_reset) {
>  		printk(KERN_INFO "silent reset associate\n");
> -		ieee->is_silent_reset = 0;
> +		ieee->is_silent_reset = false;
>  	}
>  
>  	if (ieee->data_hard_resume)
> @@ -3098,7 +3098,7 @@ void rtllib_softmac_init(struct rtllib_device *ieee)
>  	ieee->sta_edca_param[2] = 0x005E4342;
>  	ieee->sta_edca_param[3] = 0x002F3262;
>  	ieee->aggregation = true;
> -	ieee->enable_rx_imm_BA = 1;
> +	ieee->enable_rx_imm_BA = true;
>  	ieee->tx_pending.txb = NULL;
>  
>  	_setup_timer(&ieee->associate_timer,
> -- 
> 1.8.1.2
>
> -- 
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
diff mbox

Patch

diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index a235b6c..aaa9c0c 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -2213,7 +2213,7 @@  rtl8192_InitializeVariables(struct net_device  *dev)
 	priv->MidHighPwrTHR_L2 = 0x40;
 	priv->PwrDomainProtect = false;
 
-	priv->bfirst_after_down = 0;
+	priv->bfirst_after_down = false;
 }
 
 void rtl8192_EnableInterrupt(struct net_device *dev)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 206924b..e866fee 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -1000,7 +1000,7 @@  static int rtl8192_sta_down(struct net_device *dev, bool shutdownrf)
 	priv->bDriverIsGoingToUnload = true;
 	priv->up = 0;
 	priv->rtllib->ieee_up = 0;
-	priv->bfirst_after_down = 1;
+	priv->bfirst_after_down = true;
 	RT_TRACE(COMP_DOWN, "==========>%s()\n", __func__);
 	if (!netif_queue_stopped(dev))
 		netif_stop_queue(dev);
@@ -1119,8 +1119,8 @@  static void rtl8192_init_priv_variable(struct net_device *dev)
 	priv->rtllib->hwscan_sem_up = 1;
 	priv->rtllib->status = 0;
 	priv->H2CTxCmdSeq = 0;
-	priv->bDisableFrameBursting = 0;
-	priv->bDMInitialGainEnable = 1;
+	priv->bDisableFrameBursting = false;
+	priv->bDMInitialGainEnable = true;
 	priv->polling_timer_on = 0;
 	priv->up_first_time = 1;
 	priv->blinked_ingpio = false;
@@ -1162,7 +1162,7 @@  static void rtl8192_init_priv_variable(struct net_device *dev)
 	priv->CckPwEnl = 6;
 	priv->ScanDelay = 50;
 	priv->ResetProgress = RESET_TYPE_NORESET;
-	priv->bForcedSilentReset = 0;
+	priv->bForcedSilentReset = false;
 	priv->bDisableNormalResetCheck = false;
 	priv->force_reset = false;
 	memset(priv->rtllib->swcamtable, 0, sizeof(struct sw_cam_table) * 32);
@@ -1171,7 +1171,7 @@  static void rtl8192_init_priv_variable(struct net_device *dev)
 	priv->RxCounter = 0;
 	priv->rtllib->wx_set_enc = 0;
 	priv->bHwRadioOff = false;
-	priv->RegRfOff = 0;
+	priv->RegRfOff = false;
 	priv->isRFOff = false;
 	priv->bInPowerSaveMode = false;
 	priv->rtllib->RfOffReason = 0;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index 3095e9d..a9bccbe 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -2265,7 +2265,7 @@  void dm_CheckRfCtrlGPIO(void *data)
 		return;
 
 	if (priv->bfirst_after_down) {
-		priv->bfirst_after_down = 1;
+		priv->bfirst_after_down = true;
 		return;
 	}
 
@@ -2312,9 +2312,9 @@  void	dm_rf_pathcheck_workitemcallback(void *data)
 
 	for (i = 0; i < RF90_PATH_MAX; i++) {
 		if (rfpath & (0x01<<i))
-			priv->brfpath_rxenable[i] = 1;
+			priv->brfpath_rxenable[i] = true;
 		else
-			priv->brfpath_rxenable[i] = 0;
+			priv->brfpath_rxenable[i] = false;
 	}
 	if (!DM_RxPathSelTable.Enable)
 		return;
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index f53790f..4689a44 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -873,11 +873,11 @@  static size_t rtllib_rx_get_hdrlen(struct rtllib_device *ieee,
 		if (net_ratelimit())
 			printk(KERN_INFO "%s: find HTCControl!\n", __func__);
 		hdrlen += 4;
-		rx_stats->bContainHTC = 1;
+		rx_stats->bContainHTC = true;
 	}
 
 	 if (RTLLIB_QOS_HAS_SEQ(fc))
-		rx_stats->bIsQosData = 1;
+		rx_stats->bIsQosData = true;
 
 	return hdrlen;
 }
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 358fbcc..d9a05d9 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -705,7 +705,7 @@  static void rtllib_softmac_stop_scan(struct rtllib_device *ieee)
 	ieee->scan_watch_dog = 0;
 	if (ieee->scanning_continue == 1) {
 		ieee->scanning_continue = 0;
-		ieee->actscanning = 0;
+		ieee->actscanning = false;
 
 		cancel_delayed_work(&ieee->softmac_scan_wq);
 	}
@@ -1574,7 +1574,7 @@  static void rtllib_associate_complete_wq(void *data)
 
 	if (ieee->is_silent_reset) {
 		printk(KERN_INFO "silent reset associate\n");
-		ieee->is_silent_reset = 0;
+		ieee->is_silent_reset = false;
 	}
 
 	if (ieee->data_hard_resume)
@@ -3098,7 +3098,7 @@  void rtllib_softmac_init(struct rtllib_device *ieee)
 	ieee->sta_edca_param[2] = 0x005E4342;
 	ieee->sta_edca_param[3] = 0x002F3262;
 	ieee->aggregation = true;
-	ieee->enable_rx_imm_BA = 1;
+	ieee->enable_rx_imm_BA = true;
 	ieee->tx_pending.txb = NULL;
 
 	_setup_timer(&ieee->associate_timer,