Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230919085156.1578-12-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jiri Slaby (SUSE) and committed by
Greg Kroah-Hartman
083cfcf3 c38f45ef

+2 -3
+2 -3
drivers/tty/tty_buffer.c
··· 69 69 void tty_buffer_unlock_exclusive(struct tty_port *port) 70 70 { 71 71 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; 75 73 76 74 atomic_dec(&buf->priority); 77 75 mutex_unlock(&buf->lock); 76 + 78 77 if (restart) 79 78 queue_work(system_unbound_wq, &buf->work); 80 79 }