summaryrefslogtreecommitdiff
path: root/drivers/tty/hvc/hvcs.c
diff options
context:
space:
mode:
authorJiri Slaby (SUSE) <jirislaby@kernel.org>2023-08-10 11:15:06 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-08-11 21:12:47 +0200
commit8428e5223ea2e195f5790bff770b804f3918f3f4 (patch)
treec36d56a2974e40edbb63044369e16b7c436f26bf /drivers/tty/hvc/hvcs.c
parent49b8220cee4aa3d7aaaf42fd7f316b7f8fb710da (diff)
downloadlinux-8428e5223ea2e195f5790bff770b804f3918f3f4.tar.gz
linux-8428e5223ea2e195f5790bff770b804f3918f3f4.tar.bz2
linux-8428e5223ea2e195f5790bff770b804f3918f3f4.zip
tty: hvc: convert counts to size_t
Unify the type of tty_operations::write() counters with the 'count' parameter. I.e. use size_t for them. Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230810091510.13006-33-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/hvc/hvcs.c')
-rw-r--r--drivers/tty/hvc/hvcs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index 1de91fa23b04..d29fdfe9d93d 100644
--- a/drivers/tty/hvc/hvcs.c
+++ b/drivers/tty/hvc/hvcs.c
@@ -1263,8 +1263,8 @@ static ssize_t hvcs_write(struct tty_struct *tty, const u8 *buf, size_t count)
unsigned int unit_address;
const unsigned char *charbuf;
unsigned long flags;
- int total_sent = 0;
- int tosend = 0;
+ size_t total_sent = 0;
+ size_t tosend = 0;
int result = 0;
/*
@@ -1299,7 +1299,7 @@ static ssize_t hvcs_write(struct tty_struct *tty, const u8 *buf, size_t count)
unit_address = hvcsd->vdev->unit_address;
while (count > 0) {
- tosend = min_t(unsigned, count,
+ tosend = min_t(size_t, count,
(HVCS_BUFF_LEN - hvcsd->chars_in_buffer));
/*
* No more space, this probably means that the last call to