Skip to content

Commit 083cfcf

Browse files
Jiri Slaby (SUSE)gregkh
authored andcommitted
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)" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent c38f45e commit 083cfcf

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/tty/tty_buffer.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,11 @@ EXPORT_SYMBOL_GPL(tty_buffer_lock_exclusive);
6969
void tty_buffer_unlock_exclusive(struct tty_port *port)
7070
{
7171
struct tty_bufhead *buf = &port->buf;
72-
int restart;
73-
74-
restart = buf->head->commit != buf->head->read;
72+
bool restart = buf->head->commit != buf->head->read;
7573

7674
atomic_dec(&buf->priority);
7775
mutex_unlock(&buf->lock);
76+
7877
if (restart)
7978
queue_work(system_unbound_wq, &buf->work);
8079
}

0 commit comments

Comments
 (0)