Skip to content

Commit 13b4353

Browse files
YueHaibinggregkh
authored andcommitted
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>
1 parent 1cd25cb commit 13b4353

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/tty/serial/pmac_zilog.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ static void pmz_interrupt_control(struct uart_pmac_port *uap, int enable)
219219
static bool pmz_receive_chars(struct uart_pmac_port *uap)
220220
{
221221
struct tty_port *port;
222-
unsigned char ch, r1, drop, error, flag;
222+
unsigned char ch, r1, drop, flag;
223223
int loops = 0;
224224

225225
/* 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)
231231
port = &uap->port.state->port;
232232

233233
while (1) {
234-
error = 0;
235234
drop = 0;
236235

237236
r1 = read_zsreg(uap, R1);
@@ -273,7 +272,6 @@ static bool pmz_receive_chars(struct uart_pmac_port *uap)
273272
uap->port.icount.rx++;
274273

275274
if (r1 & (PAR_ERR | Rx_OVR | CRC_ERR | BRK_ABRT)) {
276-
error = 1;
277275
if (r1 & BRK_ABRT) {
278276
pmz_debug("pmz: got break !\n");
279277
r1 &= ~(PAR_ERR | CRC_ERR);

0 commit comments

Comments
 (0)