Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7390535ybl; Tue, 24 Dec 2019 01:31:45 -0800 (PST) X-Google-Smtp-Source: APXvYqwSipcYAV8skjRg/xw7+2vQphCFnjwBlwfD1zBBDIVRkdI4jjgXkXarM3oHdnNItFKNVQtt X-Received: by 2002:a05:6830:1185:: with SMTP id u5mr35052077otq.147.1577179905666; Tue, 24 Dec 2019 01:31:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577179905; cv=none; d=google.com; s=arc-20160816; b=bkvPaSQZ0gOsL3fzayW77aUs2ZobTu8GAq2XC+1FciRSViIIKUP/j+aiAdTck5mjw5 ERcNBImkM/9PYdIaHOjAjHmula8eF78M18xQ4kiRmxbj90M2AZFV486D2tRWybOBeuaG yZc1wcfQw7dKwOmxH1F/4RDM/Wf+wJUrrzOfsafZeiydXkEDtycOAWosUFJWAXWGlNCA D1cxX7F2m0L65wFMJ4fc+khSu+mjJca0uPnUpjz8j3WdiwKMJVUOSLLWRWgL8I/VEk1W zaZppIBnkJKx5Ls1b4OdTuh9zs8ZOkBPM6YfT2UxOdKTND4/rNc43Inq0zG09OYb19IQ wlRQ== 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=UDcpC32jCZjAjsEvTyNIjxb+0wYbU6x1viJfjB/kkZc=; b=gqh6iCE8QkUzajO1nOPlBcuThu4WvDkgkmPSfHQPwnO//GszJug1r4kwBjnTqexsO0 ruhUy47SKKUAbybuMIq3oVl0/er/dR94e0GbUYcQWxNoK8ng+BE1PBHKHpKJPXKZ7qiZ MBpHZOWXnvuG/t9GfOCeMUMH+RYLgpeQ/VZxY2HFNAJNWIQZCDOpY+mGfx327yYutyfZ zx9Tf3TCOYYF+HG+5/E5eb0bidr2gZ3zoMEJkcrTZdlOR4QRd/HfATdUAw73VZfBBf05 5rTTaIE4jT/hIb7rcpN/ZCSHxRG2DkvtH/6L8YtDhNZqCBQTmAsGN3niYd00pJSXXJfr Zpog== 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 h3si11682177otq.203.2019.12.24.01.31.34; Tue, 24 Dec 2019 01:31:45 -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 S1726258AbfLXJa6 (ORCPT + 99 others); Tue, 24 Dec 2019 04:30:58 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:8174 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726140AbfLXJa5 (ORCPT ); Tue, 24 Dec 2019 04:30:57 -0500 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id DCFEA2A35862A1C54780; Tue, 24 Dec 2019 17:30:55 +0800 (CST) Received: from huawei.com (10.90.53.225) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.439.0; Tue, 24 Dec 2019 17:30:47 +0800 From: zhengbin To: , , CC: Subject: [PATCH 4/4] tty/serial: 8250_exar: use true,false for bool variable Date: Tue, 24 Dec 2019 17:38:05 +0800 Message-ID: <1577180285-24904-5-git-send-email-zhengbin13@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1577180285-24904-1-git-send-email-zhengbin13@huawei.com> References: <1577180285-24904-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/8250/8250_exar.c:189:6-17: WARNING: Assignment of 0/1 to bool variable drivers/tty/serial/8250/8250_exar.c:197:3-14: WARNING: Assignment of 0/1 to bool variable drivers/tty/serial/8250/8250_exar.c:199:3-14: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin --- drivers/tty/serial/8250/8250_exar.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c index 108cd55..91e9b07 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -186,7 +186,7 @@ static int xr17v35x_startup(struct uart_port *port) static void exar_shutdown(struct uart_port *port) { unsigned char lsr; - bool tx_complete = 0; + bool tx_complete = false; struct uart_8250_port *up = up_to_u8250p(port); struct circ_buf *xmit = &port->state->xmit; int i = 0; @@ -194,9 +194,9 @@ static void exar_shutdown(struct uart_port *port) do { lsr = serial_in(up, UART_LSR); if (lsr & (UART_LSR_TEMT | UART_LSR_THRE)) - tx_complete = 1; + tx_complete = true; else - tx_complete = 0; + tx_complete = false; usleep_range(1000, 1100); } while (!uart_circ_empty(xmit) && !tx_complete && i++ < 1000); -- 2.7.4