aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/tty_buffer.c
diff options
context:
space:
mode:
authorJiri Slaby (SUSE) <[email protected]>2023-08-10 09:14:45 +0000
committerGreg Kroah-Hartman <[email protected]>2023-08-11 19:12:45 +0000
commit201560af612c12f43211a881edd378727a9a52d6 (patch)
tree23d335239475e7edc798c783f815b00cac778b0c /drivers/tty/tty_buffer.c
parenttty: make counts in tty_port_client_operations hooks size_t (diff)
downloadkernel-201560af612c12f43211a881edd378727a9a52d6.tar.gz
kernel-201560af612c12f43211a881edd378727a9a52d6.zip
tty: switch receive_buf() counts to size_t
'size_t' is what receive_buf() expects and returns while handling count. So switch to 'size_t'. This renders both local 'count' and 'rcvd' in flush_to_ldisc() to be size_t too. Signed-off-by: "Jiri Slaby (SUSE)" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/tty/tty_buffer.c')
-rw-r--r--drivers/tty/tty_buffer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c
index 42464c37125a..7182dab60fac 100644
--- a/drivers/tty/tty_buffer.c
+++ b/drivers/tty/tty_buffer.c
@@ -502,12 +502,12 @@ static void lookahead_bufs(struct tty_port *port, struct tty_buffer *head)
}
}
-static int
-receive_buf(struct tty_port *port, struct tty_buffer *head, int count)
+static size_t
+receive_buf(struct tty_port *port, struct tty_buffer *head, size_t count)
{
u8 *p = char_buf_ptr(head, head->read);
const u8 *f = NULL;
- int n;
+ size_t n;
if (head->flags)
f = flag_buf_ptr(head, head->read);
@@ -539,7 +539,7 @@ static void flush_to_ldisc(struct work_struct *work)
while (1) {
struct tty_buffer *head = buf->head;
struct tty_buffer *next;
- int count, rcvd;
+ size_t count, rcvd;
/* Ldisc or user is trying to gain exclusive access */
if (atomic_read(&buf->priority))