summaryrefslogtreecommitdiff
path: root/include/linux/tty_port.h
diff options
context:
space:
mode:
authorJiri Slaby (SUSE) <jirislaby@kernel.org>2023-08-10 12:14:44 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-08-11 22:12:44 +0300
commit0468a8071d7cfb0f5bc02b0888cec4525551299f (patch)
tree0c59e08870f0c1e8f64d1ab8429e880271ab9278 /include/linux/tty_port.h
parent0b7a2b282959d3311f158629f67c6d681a3dc2b3 (diff)
downloadlinux-0468a8071d7cfb0f5bc02b0888cec4525551299f.tar.xz
tty: make counts in tty_port_client_operations hooks size_t
The counts in tty_port_client_operations hooks' are currently represented by all 'int', 'unsigned int', and 'size_t'. Unify them all to unsigned 'size_t' for clarity. Note that size_t is used already in tty_buffer.c. So, eventually, it is spread for counts everywhere and this is the beginning. So the two changes namely: * ::receive_buf() is called from tty_ldisc_receive_buf(). And that expects values ">= 0" from ::receive_buf(), so switch its rettype to size_t is fine. tty_ldisc_receive_buf() types will be changed separately. * ::lookahead_buf()'s count comes from lookahead_bufs() and is already 'unsigned int'. Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> Cc: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20230810091510.13006-11-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/tty_port.h')
-rw-r--r--include/linux/tty_port.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/tty_port.h b/include/linux/tty_port.h
index 726575743367..6b367eb17979 100644
--- a/include/linux/tty_port.h
+++ b/include/linux/tty_port.h
@@ -39,10 +39,10 @@ struct tty_port_operations {
};
struct tty_port_client_operations {
- int (*receive_buf)(struct tty_port *port, const u8 *cp, const u8 *fp,
- size_t count);
+ size_t (*receive_buf)(struct tty_port *port, const u8 *cp, const u8 *fp,
+ size_t count);
void (*lookahead_buf)(struct tty_port *port, const u8 *cp,
- const u8 *fp, unsigned int count);
+ const u8 *fp, size_t count);
void (*write_wakeup)(struct tty_port *port);
};