mxser: switch from xmit_buf to kfifo
authorJiri Slaby <jslaby@suse.cz>
Mon, 24 Jan 2022 07:14:26 +0000 (08:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Jan 2022 13:54:48 +0000 (14:54 +0100)
commit32330c833442d4041dbd20508f6cd2419deb16eb
treeaba70bbafc0fda9081398863000f4ad4bf4ce3cc
parent92cc9d1d14e3ba8e82c99a4b4c90cce1db3c3fa9
mxser: switch from xmit_buf to kfifo

Use kfifo for xmit buffer handling. The change is mostly
straightforward. It saves complexity both on the stuffing side
(mxser_write() and mxser_put_char()) and pulling side
(mxser_transmit_chars()). In fact, the loop in mxser_write() can be
completely deleted as the wrap of the buffer is taken care of in the
kfifo code now.

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