[OPW,kernel,3/5] Staging: ft1000: Fix assignment of bool to 0/1
diff mbox

Message ID eb23842d795d3b193eb4e41009a6149b06db526a.1382714792.git.rashika.kheria@gmail.com
State Changes Requested
Headers show

Commit Message

Rashika Oct. 25, 2013, 3:32 p.m. UTC
This patch fixes the following coccinelle warning in ft1000-usb/ft1000_hw.c-

drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:1444:1-19: WARNING: Assignment of bool to 0/1
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:1937:16-34: WARNING: Assignment of bool to 0/1
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:1938:16-35: WARNING: Assignment of bool to 0/1
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:1570:4-22: WARNING: Assignment of bool to 0/1
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:1575:4-22: WARNING: Assignment of bool to 0/1
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:636:1-26: WARNING: Assignment of bool to 0/1
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:638:1-25: WARNING: Assignment of bool to 0/1
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:669:1-26: WARNING: Assignment of bool to 0/1
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:755:1-23: WARNING: Assignment of bool to 0/1
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:756:1-26: WARNING: Assignment of bool to 0/1

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
 drivers/staging/ft1000/ft1000-usb/ft1000_hw.c |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

Comments

Lisa Nguyen Oct. 25, 2013, 5:33 p.m. UTC | #1
On Fri, Oct 25, 2013 at 8:32 AM, Rashika Kheria
<rashika.kheria@gmail.com> wrote:
> This patch fixes the following coccinelle warning in ft1000-usb/ft1000_hw.c-
>
> drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:1444:1-19: WARNING: Assignment of bool to 0/1
> drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:1937:16-34: WARNING: Assignment of bool to 0/1
> drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:1938:16-35: WARNING: Assignment of bool to 0/1
> drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:1570:4-22: WARNING: Assignment of bool to 0/1
> drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:1575:4-22: WARNING: Assignment of bool to 0/1
> drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:636:1-26: WARNING: Assignment of bool to 0/1
> drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:638:1-25: WARNING: Assignment of bool to 0/1
> drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:669:1-26: WARNING: Assignment of bool to 0/1
> drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:755:1-23: WARNING: Assignment of bool to 0/1
> drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:756:1-26: WARNING: Assignment of bool to 0/1
>
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>

Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>

> ---
>  drivers/staging/ft1000/ft1000-usb/ft1000_hw.c |   20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
> index 9b8fed7..6253752 100644
> --- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
> +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
> @@ -633,9 +633,9 @@ static int ft1000_reset_card(struct net_device *dev)
>
>         DEBUG("ft1000_hw:ft1000_reset_card called.....\n");
>
> -       ft1000dev->fCondResetPend = 1;
> +       ft1000dev->fCondResetPend = true;
>         info->CardReady = 0;
> -       ft1000dev->fProvComplete = 0;
> +       ft1000dev->fProvComplete = false;
>
>         /* Make sure we free any memory reserve for provisioning */
>         while (list_empty(&info->prov_list) == 0) {
> @@ -666,7 +666,7 @@ static int ft1000_reset_card(struct net_device *dev)
>
>         info->CardReady = 1;
>
> -       ft1000dev->fCondResetPend = 0;
> +       ft1000dev->fCondResetPend = false;
>
>         return TRUE;
>  }
> @@ -752,8 +752,8 @@ int init_ft1000_netdev(struct ft1000_usb *ft1000dev)
>         pInfo->DSP_TIME[1] = 0;
>         pInfo->DSP_TIME[2] = 0;
>         pInfo->DSP_TIME[3] = 0;
> -       ft1000dev->fAppMsgPend = 0;
> -       ft1000dev->fCondResetPend = 0;
> +       ft1000dev->fAppMsgPend = false;
> +       ft1000dev->fCondResetPend = false;
>         ft1000dev->usbboot = 0;
>         ft1000dev->dspalive = 0;
>         memset(&ft1000dev->tempbuf[0], 0, sizeof(ft1000dev->tempbuf));
> @@ -1441,7 +1441,7 @@ static int ft1000_dsp_prov(void *arg)
>
>         msleep(100);
>
> -       dev->fProvComplete = 1;
> +       dev->fProvComplete = true;
>         info->CardReady = 1;
>
>         return STATUS_SUCCESS;
> @@ -1567,12 +1567,12 @@ static int ft1000_proc_drvmsg(struct ft1000_usb *dev, u16 size)
>                          * Send provisioning data to DSP
>                          */
>                         if (list_empty(&info->prov_list) == 0) {
> -                               dev->fProvComplete = 0;
> +                               dev->fProvComplete = false;
>                                 status = ft1000_dsp_prov(dev);
>                                 if (status != STATUS_SUCCESS)
>                                         goto out;
>                         } else {
> -                               dev->fProvComplete = 1;
> +                               dev->fProvComplete = true;
>                                 status =
>                                     ft1000_write_register(dev, FT1000_DB_HB,
>                                                           FT1000_REG_DOORBELL);
> @@ -1934,8 +1934,8 @@ int ft1000_poll(void* dev_id)
>                  info->ft1000_reset(dev->net);
>              }
>              else {
> -                dev->fProvComplete = 0;
> -                dev->fCondResetPend = 1;
> +                dev->fProvComplete = false;
> +                dev->fCondResetPend = true;
>              }
>
>              ft1000_write_register(dev, FT1000_DB_COND_RESET, FT1000_REG_DOORBELL);
> --
> 1.7.9.5
>
> --
> 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.

Patch
diff mbox

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
index 9b8fed7..6253752 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
@@ -633,9 +633,9 @@  static int ft1000_reset_card(struct net_device *dev)
 
 	DEBUG("ft1000_hw:ft1000_reset_card called.....\n");
 
-	ft1000dev->fCondResetPend = 1;
+	ft1000dev->fCondResetPend = true;
 	info->CardReady = 0;
-	ft1000dev->fProvComplete = 0;
+	ft1000dev->fProvComplete = false;
 
 	/* Make sure we free any memory reserve for provisioning */
 	while (list_empty(&info->prov_list) == 0) {
@@ -666,7 +666,7 @@  static int ft1000_reset_card(struct net_device *dev)
 
 	info->CardReady = 1;
 
-	ft1000dev->fCondResetPend = 0;
+	ft1000dev->fCondResetPend = false;
 
 	return TRUE;
 }
@@ -752,8 +752,8 @@  int init_ft1000_netdev(struct ft1000_usb *ft1000dev)
 	pInfo->DSP_TIME[1] = 0;
 	pInfo->DSP_TIME[2] = 0;
 	pInfo->DSP_TIME[3] = 0;
-	ft1000dev->fAppMsgPend = 0;
-	ft1000dev->fCondResetPend = 0;
+	ft1000dev->fAppMsgPend = false;
+	ft1000dev->fCondResetPend = false;
 	ft1000dev->usbboot = 0;
 	ft1000dev->dspalive = 0;
 	memset(&ft1000dev->tempbuf[0], 0, sizeof(ft1000dev->tempbuf));
@@ -1441,7 +1441,7 @@  static int ft1000_dsp_prov(void *arg)
 
 	msleep(100);
 
-	dev->fProvComplete = 1;
+	dev->fProvComplete = true;
 	info->CardReady = 1;
 
 	return STATUS_SUCCESS;
@@ -1567,12 +1567,12 @@  static int ft1000_proc_drvmsg(struct ft1000_usb *dev, u16 size)
 			 * Send provisioning data to DSP
 			 */
 			if (list_empty(&info->prov_list) == 0) {
-				dev->fProvComplete = 0;
+				dev->fProvComplete = false;
 				status = ft1000_dsp_prov(dev);
 				if (status != STATUS_SUCCESS)
 					goto out;
 			} else {
-				dev->fProvComplete = 1;
+				dev->fProvComplete = true;
 				status =
 				    ft1000_write_register(dev, FT1000_DB_HB,
 							  FT1000_REG_DOORBELL);
@@ -1934,8 +1934,8 @@  int ft1000_poll(void* dev_id)
                 info->ft1000_reset(dev->net);
             }
             else {
-                dev->fProvComplete = 0;
-                dev->fCondResetPend = 1;
+                dev->fProvComplete = false;
+                dev->fCondResetPend = true;
             }
 
             ft1000_write_register(dev, FT1000_DB_COND_RESET, FT1000_REG_DOORBELL);