Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp412013ybz; Wed, 22 Apr 2020 00:18:45 -0700 (PDT) X-Google-Smtp-Source: APiQypJ4KCnf2O6/GpGcA9QdElUnMizOSw0xCGPgDa8Ht+7ksxMxUlMSfQx2tLMm7sW1sv5R8OVb X-Received: by 2002:a17:906:a390:: with SMTP id k16mr23437970ejz.219.1587539925738; Wed, 22 Apr 2020 00:18:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587539925; cv=none; d=google.com; s=arc-20160816; b=eT60st5I8d4YsZzgBfR/jSAsfwRYNGbkOvYi6x4sY3WOswPP1e7txZLN//tBJrp6/I J9oQamL4k4xlHweBmBX6tmwisjw+AuBBTWPPv1VeThfhmX+r4QQCWvu/4nrNcmbJK9Us IqqCMfAvd0ctS/82t5GmpIUrko+1m+aon1gVfGrDD3CQNtyBsIjHgYXBdR1buUbFVI0n ysLOUg4/wqrwHphoiggIoYaRogBzZZHyoLnXfoILgFebEk6jezAIkG0W6NjlGxjjwfqz wcwsYOS+a3yRlGrWH9bR2HcDpIVz9lSoolPX8qcZvRQNU56p+ePAabwi6Powa9YXeTSV wWKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:to:from; bh=ykhj8K9k12qZLaWdc0AjYpJrVHThienTxMv9Obt9pkg=; b=qIf10Mz5eXaiHMqe5N6Yxg3E3YwOHy8hVyImGDthPkHeWw4MwpjasiJJKgvTXQWW1+ iAwpROdXCo/dcs91neKfV15IAtt1oMpjjiMd8Z1Fo01Tlt5yYWsf/6Zrac8KmilAP00p MgFVxIoY+Zm+pXaH5dFJuNGRYPzwZojcZK764twfUY16OADOqT+5hvHKQhrlxwjqxqRD 0hNafNaIxJe12S5d+1s3snkr6//5WAkF30oLxWFaUJT13hgvCZEOvKeOH3WDtJThwi9W Qw2sflQ8r1QS4KGmX677rGFngvf8Un07Q0sWZnFx+BTduFrMDo3Fw3Vfkv9uMElCSbKW D1wg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f10si3222589ejb.466.2020.04.22.00.18.22; Wed, 22 Apr 2020 00:18:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726002AbgDVHRW (ORCPT + 99 others); Wed, 22 Apr 2020 03:17:22 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:2867 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725786AbgDVHRW (ORCPT ); Wed, 22 Apr 2020 03:17:22 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id C87CA4BAF0B0A7AC6E70; Wed, 22 Apr 2020 15:17:13 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Wed, 22 Apr 2020 15:17:07 +0800 From: Jason Yan To: , , , , Subject: [PATCH] net: caif: use true,false for bool variables Date: Wed, 22 Apr 2020 15:16:36 +0800 Message-ID: <20200422071636.48356-1-yanaijie@huawei.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- net/caif/caif_dev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c index 195d2d67be8a..c10e5a55758d 100644 --- a/net/caif/caif_dev.c +++ b/net/caif/caif_dev.c @@ -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; -- 2.21.1