From patchwork Thu Sep 20 01:59:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 972102 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42G07w0b7rz9sC2 for ; Thu, 20 Sep 2018 11:51:24 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42G07v6P38zF3F0 for ; Thu, 20 Sep 2018 11:51:23 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=huawei.com (client-ip=45.249.212.190; helo=huawei.com; envelope-from=yuehaibing@huawei.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com Received: from huawei.com (szxga04-in.huawei.com [45.249.212.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42G0672npSzF0R8 for ; Thu, 20 Sep 2018 11:49:51 +1000 (AEST) Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id C9DCDF80D2F6B; Thu, 20 Sep 2018 09:49:46 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.399.0; Thu, 20 Sep 2018 09:49:39 +0800 From: YueHaibing To: Greg Kroah-Hartman , Jiri Slaby , Benjamin Herrenschmidt , "Paul Mackerras" , Michael Ellerman Subject: [PATCH -next] tty: serial: remove set but not used variable 'error' Date: Thu, 20 Sep 2018 01:59:16 +0000 Message-ID: <1537408756-196431-1-git-send-email-yuehaibing@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linuxppc-dev@lists.ozlabs.org, kernel-janitors@vger.kernel.org, YueHaibing , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Fixes gcc '-Wunused-but-set-variable' warning: drivers/tty/serial/pmac_zilog.c: In function 'pmz_receive_chars': drivers/tty/serial/pmac_zilog.c:222:30: warning: variable 'error' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing --- drivers/tty/serial/pmac_zilog.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c index a4ec22d..a9d4098 100644 --- a/drivers/tty/serial/pmac_zilog.c +++ b/drivers/tty/serial/pmac_zilog.c @@ -219,7 +219,7 @@ static void pmz_interrupt_control(struct uart_pmac_port *uap, int enable) static bool pmz_receive_chars(struct uart_pmac_port *uap) { struct tty_port *port; - unsigned char ch, r1, drop, error, flag; + unsigned char ch, r1, drop, flag; int loops = 0; /* Sanity check, make sure the old bug is no longer happening */ @@ -231,7 +231,6 @@ static bool pmz_receive_chars(struct uart_pmac_port *uap) port = &uap->port.state->port; while (1) { - error = 0; drop = 0; r1 = read_zsreg(uap, R1); @@ -273,7 +272,6 @@ static bool pmz_receive_chars(struct uart_pmac_port *uap) uap->port.icount.rx++; if (r1 & (PAR_ERR | Rx_OVR | CRC_ERR | BRK_ABRT)) { - error = 1; if (r1 & BRK_ABRT) { pmz_debug("pmz: got break !\n"); r1 &= ~(PAR_ERR | CRC_ERR);