mxser: make xmit ring buffer variables unsigned
authorJiri Slaby <jslaby@suse.cz>
Fri, 18 Jun 2021 06:14:25 +0000 (08:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jun 2021 11:09:59 +0000 (13:09 +0200)
Make the xmit ring buffer pointers and counter (xmit_head, xmit_tail,
xmit_cnt) unsigned. Now, the assumptions for the compiler are clear --
they cannot be negative.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210618061516.662-20-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/mxser.c

index 45f36d9..53136a7 100644 (file)
@@ -351,9 +351,9 @@ struct mxser_port {
        u8 read_status_mask;
        u8 ignore_status_mask;
        u8 xmit_fifo_size;
-       int xmit_head;
-       int xmit_tail;
-       int xmit_cnt;
+       unsigned int xmit_head;
+       unsigned int xmit_tail;
+       unsigned int xmit_cnt;
        int closing;
 
        struct ktermios normal_termios;