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

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

Commit Message

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

drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:1924:9-25: WARNING: Comparison of bool to 0/1

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

Comments

Lisa Nguyen Oct. 25, 2013, 5:35 p.m. UTC | #1
On Fri, Oct 25, 2013 at 8:33 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:1924:9-25: WARNING: Comparison 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 |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
> index 6253752..44b25ef 100644
> --- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
> +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
> @@ -1921,7 +1921,7 @@ int ft1000_poll(void* dev_id)
>          else if (tempword & FT1000_DB_COND_RESET) {
>              DEBUG("ft1000_poll: FT1000_REG_DOORBELL message type:  FT1000_DB_COND_RESET\n");
>
> -           if (dev->fAppMsgPend == 0) {
> +           if (!dev->fAppMsgPend) {
>                 // Reset ASIC and DSP
>
>                  status    = ft1000_read_dpram16(dev, FT1000_MAG_DSP_TIMER0, (u8 *)&(info->DSP_TIME[0]), FT1000_MAG_DSP_TIMER0_INDX);
> --
> 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 6253752..44b25ef 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
@@ -1921,7 +1921,7 @@  int ft1000_poll(void* dev_id)
         else if (tempword & FT1000_DB_COND_RESET) {
             DEBUG("ft1000_poll: FT1000_REG_DOORBELL message type:  FT1000_DB_COND_RESET\n");
 
-	    if (dev->fAppMsgPend == 0) {
+	    if (!dev->fAppMsgPend) {
                // Reset ASIC and DSP
 
                 status    = ft1000_read_dpram16(dev, FT1000_MAG_DSP_TIMER0, (u8 *)&(info->DSP_TIME[0]), FT1000_MAG_DSP_TIMER0_INDX);