mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 15:18:19 +00:00
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)" <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20230810091510.13006-12-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0468a8071d
commit
201560af61
1 changed files with 4 additions and 4 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue