net: caif: use true,false for bool variables
authorJason Yan <yanaijie@huawei.com>
Wed, 22 Apr 2020 07:16:36 +0000 (15:16 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Apr 2020 02:37:48 +0000 (19:37 -0700)
Fix the following coccicheck warning:

net/caif/caif_dev.c:410:2-13: WARNING: Assignment of 0/1 to bool
variable
net/caif/caif_dev.c:445:2-13: WARNING: Assignment of 0/1 to bool
variable
net/caif/caif_dev.c:145:1-12: WARNING: Assignment of 0/1 to bool
variable
net/caif/caif_dev.c:223:1-12: WARNING: Assignment of 0/1 to bool
variable

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/caif/caif_dev.c

index 195d2d67be8a3043c48027a0a6e897660bd74072..c10e5a55758d2294612b57f8a7d1ebff5734fa0a 100644 (file)
@@ -142,7 +142,7 @@ static void caif_flow_cb(struct sk_buff *skb)
 
        spin_lock_bh(&caifd->flow_lock);
        send_xoff = caifd->xoff;
-       caifd->xoff = 0;
+       caifd->xoff = false;
        dtor = caifd->xoff_skb_dtor;
 
        if (WARN_ON(caifd->xoff_skb != skb))
@@ -220,7 +220,7 @@ static int transmit(struct cflayer *layer, struct cfpkt *pkt)
        pr_debug("queue has stopped(%d) or is full (%d > %d)\n",
                        netif_queue_stopped(caifd->netdev),
                        qlen, high);
-       caifd->xoff = 1;
+       caifd->xoff = true;
        caifd->xoff_skb = skb;
        caifd->xoff_skb_dtor = skb->destructor;
        skb->destructor = caif_flow_cb;
@@ -407,7 +407,7 @@ static int caif_device_notify(struct notifier_block *me, unsigned long what,
                        break;
                }
 
-               caifd->xoff = 0;
+               caifd->xoff = false;
                cfcnfg_set_phy_state(cfg, &caifd->layer, true);
                rcu_read_unlock();
 
@@ -442,7 +442,7 @@ static int caif_device_notify(struct notifier_block *me, unsigned long what,
                if (caifd->xoff_skb_dtor != NULL && caifd->xoff_skb != NULL)
                        caifd->xoff_skb->destructor = caifd->xoff_skb_dtor;
 
-               caifd->xoff = 0;
+               caifd->xoff = false;
                caifd->xoff_skb_dtor = NULL;
                caifd->xoff_skb = NULL;