Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3440439ybl; Sun, 12 Jan 2020 18:11:57 -0800 (PST) X-Google-Smtp-Source: APXvYqyn9oZ3SlcPcsOt+5y2eBwxA9WaIxa9dv4YY2QS3DiNMwIFIG0YQgNKW3t8cx/fOXMx0eKW X-Received: by 2002:a9d:7b4e:: with SMTP id f14mr11737743oto.355.1578881517678; Sun, 12 Jan 2020 18:11:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578881517; cv=none; d=google.com; s=arc-20160816; b=p3L1mWaDmHb5OzzXRCBPupr8g61vBj+rVjP1iAFmGPo2IRNSRT3W4N5uaOmpMq8nCC NW76dmukPrf2UzEWe+GvfNiSKGqKSLzwidUs7lIBhAl63YQCtpZPIt6LstL1eEnWCYIJ hCVr1U5GDr4yfszl4zVn2LvqpaZpnnPFcayLng4MVDUEGMb86wvlnXqG5/pGiM2AQE9r bNkJN0Wy+jF0+KtlyiC39hVXUhSyuDHZwEk2j+ToiOC+r4GrsaxCE62mrYzaYJtCEQck Zng0+X0N/x6h6eEJEZqiTZi+WGotubwx4BHEKRNvcqTp6MBQEx/5oG5xu2HVfExBQ8+C zKyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=PaFP3zS/y6TDOPyb+4+9cr9q/K1YfrDSvkD72Qkez40=; b=GWS4rQJrwdzIZx87weJoK8IEoN/ikK7hXefeN6LHkUT3/OfVcmRQ1NAHlzIc8mCPcf 3r2XKxaJZ5yfph6oE76j85VC8C9ieABg05yxgW56e4FjJED25OV41Np+e6j8zaXkg22F 0umVjqe2HqEyV1btOJizL4Otbh37DhSr/qVvz23X3KENnXnkRmrUyrjo1SMRxEJjvITB zJYzzrOs2DNmWF9H0jCofl1VuU4aKl65F7dK5J2TgZ9gAB18nTXvYksAjyFq8lKq0F9B wcWDzFelAV8ZhOwlJMK2UQ9GDc5pIoDXRgc3NupKayDuWWKxm4Nv4NPXRvOffp5REv9d r2jg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y3si5965546oto.98.2020.01.12.18.11.45; Sun, 12 Jan 2020 18:11:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733207AbgAMCJW (ORCPT + 99 others); Sun, 12 Jan 2020 21:09:22 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:8701 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1733132AbgAMCJN (ORCPT ); Sun, 12 Jan 2020 21:09:13 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 60436ED5131B7413F9A4; Mon, 13 Jan 2020 10:09:12 +0800 (CST) Received: from huawei.com (10.90.53.225) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.439.0; Mon, 13 Jan 2020 10:09:01 +0800 From: Zheng Bin To: , , CC: Subject: [PATCH RESEND 2/4] tty/serial: kgdb_nmi: use true,false for bool variable Date: Mon, 13 Jan 2020 10:16:15 +0800 Message-ID: <1578881777-65475-3-git-send-email-zhengbin13@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1578881777-65475-1-git-send-email-zhengbin13@huawei.com> References: <1578881777-65475-1-git-send-email-zhengbin13@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.90.53.225] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes coccicheck warning: drivers/tty/serial/kgdb_nmi.c:121:6-13: WARNING: Assignment of 0/1 to bool variable drivers/tty/serial/kgdb_nmi.c:133:2-9: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: Zheng Bin --- drivers/tty/serial/kgdb_nmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/kgdb_nmi.c b/drivers/tty/serial/kgdb_nmi.c index 4029272..5022447 100644 --- a/drivers/tty/serial/kgdb_nmi.c +++ b/drivers/tty/serial/kgdb_nmi.c @@ -118,7 +118,7 @@ static int kgdb_nmi_poll_one_knock(void) int c = -1; const char *magic = kgdb_nmi_magic; size_t m = strlen(magic); - bool printch = 0; + bool printch = false; c = dbg_io_ops->read_char(); if (c == NO_POLL_CHAR) @@ -130,7 +130,7 @@ static int kgdb_nmi_poll_one_knock(void) n = (n + 1) % m; if (!n) return 1; - printch = 1; + printch = true; } else { n = 0; } -- 2.7.4