tty: tty_buffer: use bool for 'restart' in tty_buffer_unlock_exclusive()
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Tue, 19 Sep 2023 08:51:52 +0000 (10:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Oct 2023 12:31:16 +0000 (14:31 +0200)
It's a boolean value, so no need for 'int' there.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230919085156.1578-12-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_buffer.c

index 5f6d0cf..f8883af 100644 (file)
@@ -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);
 }