From: Jiri Slaby (SUSE) Date: Tue, 19 Sep 2023 08:51:52 +0000 (+0200) Subject: tty: tty_buffer: use bool for 'restart' in tty_buffer_unlock_exclusive() X-Git-Tag: microblaze-v6.8~78^2~91 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=083cfcf38364d8a3869c46875e8ed08f9d1ee160;p=linux-2.6-microblaze.git tty: tty_buffer: use bool for 'restart' in tty_buffer_unlock_exclusive() It's a boolean value, so no need for 'int' there. Signed-off-by: "Jiri Slaby (SUSE)" Link: https://lore.kernel.org/r/20230919085156.1578-12-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c index 5f6d0cf67571..f8883afbeeba 100644 --- a/drivers/tty/tty_buffer.c +++ b/drivers/tty/tty_buffer.c @@ -69,12 +69,11 @@ EXPORT_SYMBOL_GPL(tty_buffer_lock_exclusive); void tty_buffer_unlock_exclusive(struct tty_port *port) { struct tty_bufhead *buf = &port->buf; - int restart; - - restart = buf->head->commit != buf->head->read; + bool restart = buf->head->commit != buf->head->read; atomic_dec(&buf->priority); mutex_unlock(&buf->lock); + if (restart) queue_work(system_unbound_wq, &buf->work); }