lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1537408756-196431-1-git-send-email-yuehaibing@huawei.com>
Date:   Thu, 20 Sep 2018 01:59:16 +0000
From:   YueHaibing <yuehaibing@...wei.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jslaby@...e.com>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        "Paul Mackerras" <paulus@...ba.org>,
        Michael Ellerman <mpe@...erman.id.au>
CC:     YueHaibing <yuehaibing@...wei.com>, <linux-serial@...r.kernel.org>,
        <linuxppc-dev@...ts.ozlabs.org>, <kernel-janitors@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: [PATCH -next] tty: serial: remove set but not used variable 'error'

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 <yuehaibing@...wei.com>
---
 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);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ