From: Jiri Slaby (SUSE) Date: Wed, 16 Aug 2023 10:55:28 +0000 (+0200) Subject: tty: tty_buffer: better types in __tty_buffer_request_room() X-Git-Tag: v6.6-rc1~101^2~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64365743b366ae756d4e9c16a0b639960f417493;p=thirdparty%2Fkernel%2Fstable.git tty: tty_buffer: better types in __tty_buffer_request_room() * use bool for 'change' as it holds a result of a boolean. * use size_t for 'left', so it is the same as 'size' which it is compared to. Both are supposed to contain an unsigned value. Signed-off-by: "Jiri Slaby (SUSE)" Link: https://lore.kernel.org/r/20230816105530.3335-9-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c index e162318d6c31e..414bb7f9155f0 100644 --- a/drivers/tty/tty_buffer.c +++ b/drivers/tty/tty_buffer.c @@ -263,7 +263,8 @@ static int __tty_buffer_request_room(struct tty_port *port, size_t size, { struct tty_bufhead *buf = &port->buf; struct tty_buffer *b, *n; - int left, change; + size_t left; + bool change; b = buf->tail; if (!b->flags)