Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3439998ybl; Sun, 12 Jan 2020 18:11:15 -0800 (PST) X-Google-Smtp-Source: APXvYqyAE9kEvzk1UE51Z7ixa1ob4oRNUotzb3FKTC1e4IVf6vIHcUyvxKZb8hO6Ex5YLMO59TmE X-Received: by 2002:aca:f20b:: with SMTP id q11mr10604084oih.78.1578881475263; Sun, 12 Jan 2020 18:11:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578881475; cv=none; d=google.com; s=arc-20160816; b=dSieeg8MxusHAE7J73d+7k/JDU6FTX7TY9x3ZpbEFHmn6nqpiICGD0/WulA3WDiXeu 3qb/I17/EhBGGoTqnAxeFKqkiiZq41GoU3Do1IL1z1DIkV8+3P/+85wYrz9xS5bhK17H YJIXffXzcRZ2WjqPRq8wTDApkTYQtHcVTbpizgEySmz/IICQjATOjLe6FIAaZetP4w9V OseaEmeRVG5t/cVbD++zvTa/B5RC7DArC6XaAhp6y23ztfX/eN55ra+KOun8drGLXq5S 97CSucyUrptTy9ByXffD45KIRN9qXphquA2s+Nm1BZMiYETI5k4ZN59BWPHMMaGbd6TZ JzlQ== 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=yLCvF8VnVdBT61DTqYPuFP8uzSPXrMgVMiWZFbhpvrQ=; b=tb8W8oIt0u69H10trV6QzVYhI0hKi5hytkeOud3P2coZAVkOLvPh4bwy9yh5WWLk7G p+eze+rLv3tgZ4LqbSZT1eYiW4rHhll306Na4souoODYwaXgESQ4BUOI2owUixe4+HgS KeZCH7Ha1nGofOBieCNbNgt7TavCpMUBmzGsRHcewnGCgAK8N+B9NZi3qMbx7Bg1d2uL oaOqsOGmEQWS+mcX/O5ZX20u3H12BJ5RrQXuebN8sP1jakXQXuqCU2BMlN8EfmJFSiup UqgbFTC4O4HZUlJ37JrLlbNOyf8+g9wWgIIC09R1EcLMz4aZ+YRSuoP66TTDNd6jaTpr sfjA== 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 46si6322525otu.45.2020.01.12.18.10.51; Sun, 12 Jan 2020 18:11:15 -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 S1733185AbgAMCJR (ORCPT + 99 others); Sun, 12 Jan 2020 21:09:17 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:9162 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732676AbgAMCJO (ORCPT ); Sun, 12 Jan 2020 21:09:14 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 34C6269FA4BC4A197AD5; 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:02 +0800 From: Zheng Bin To: , , CC: Subject: [PATCH RESEND 4/4] tty/serial: 8250_exar: use true,false for bool variable Date: Mon, 13 Jan 2020 10:16:17 +0800 Message-ID: <1578881777-65475-5-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/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: Zheng Bin --- 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