diff options
author | YueHaibing <yuehaibing@huawei.com> | 2018-09-19 21:59:16 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-20 07:33:15 -0400 |
commit | 13b4353bb05568c9fa3e98df0bf95dd1478c14b7 (patch) | |
tree | b21cdd6b0549ac79f500a52f75c3bd5f976033dc | |
parent | 1cd25cbb2fedbc777f3a8c3cb1ba69b645aeaa64 (diff) |
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@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/pmac_zilog.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c index a4ec22d1f214..a9d40988e1c8 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) | |||
219 | static bool pmz_receive_chars(struct uart_pmac_port *uap) | 219 | static bool pmz_receive_chars(struct uart_pmac_port *uap) |
220 | { | 220 | { |
221 | struct tty_port *port; | 221 | struct tty_port *port; |
222 | unsigned char ch, r1, drop, error, flag; | 222 | unsigned char ch, r1, drop, flag; |
223 | int loops = 0; | 223 | int loops = 0; |
224 | 224 | ||
225 | /* Sanity check, make sure the old bug is no longer happening */ | 225 | /* 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) | |||
231 | port = &uap->port.state->port; | 231 | port = &uap->port.state->port; |
232 | 232 | ||
233 | while (1) { | 233 | while (1) { |
234 | error = 0; | ||
235 | drop = 0; | 234 | drop = 0; |
236 | 235 | ||
237 | r1 = read_zsreg(uap, R1); | 236 | r1 = read_zsreg(uap, R1); |
@@ -273,7 +272,6 @@ static bool pmz_receive_chars(struct uart_pmac_port *uap) | |||
273 | uap->port.icount.rx++; | 272 | uap->port.icount.rx++; |
274 | 273 | ||
275 | if (r1 & (PAR_ERR | Rx_OVR | CRC_ERR | BRK_ABRT)) { | 274 | if (r1 & (PAR_ERR | Rx_OVR | CRC_ERR | BRK_ABRT)) { |
276 | error = 1; | ||
277 | if (r1 & BRK_ABRT) { | 275 | if (r1 & BRK_ABRT) { |
278 | pmz_debug("pmz: got break !\n"); | 276 | pmz_debug("pmz: got break !\n"); |
279 | r1 &= ~(PAR_ERR | CRC_ERR); | 277 | r1 &= ~(PAR_ERR | CRC_ERR); |