tty: tty_buffer: make all offsets unsigned
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Thu, 10 Aug 2023 09:14:54 +0000 (11:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Aug 2023 19:12:45 +0000 (21:12 +0200)
All these are supposed/expected to be unsigned as they are either counts
or offsets. So switch to unsigned for clarity.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230810091510.13006-21-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/tty_buffer.h

index 391a875be20c4cbd6305f26fd8f933842a8eba56..e45cba81d0e9a2041bd1185ce99d66784b7034ab 100644 (file)
@@ -12,11 +12,11 @@ struct tty_buffer {
                struct tty_buffer *next;
                struct llist_node free;
        };
-       int used;
-       int size;
-       int commit;
-       int lookahead;          /* Lazy update on recv, can become less than "read" */
-       int read;
+       unsigned int used;
+       unsigned int size;
+       unsigned int commit;
+       unsigned int lookahead;         /* Lazy update on recv, can become less than "read" */
+       unsigned int read;
        bool flags;
        /* Data points here */
        unsigned long data[];