mxser: clean up tx handling in mxser_transmit_chars()
authorJiri Slaby <jslaby@suse.cz>
Thu, 18 Nov 2021 07:31:11 +0000 (08:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Nov 2021 17:33:21 +0000 (18:33 +0100)
commit3b88dbff1c4e7d8a78e11773f19869c598552fcb
tree8cc9dee5ebdb1169f90a2aeb5b2e9d4f21cfc3d1
parent30f6027fe4643be955e4e9849f242e55ba993185
mxser: clean up tx handling in mxser_transmit_chars()

The port->icount.tx is handled in a too complicated manner. Instead of
remembering the original count and subtracting the new one from it,
simply increase tx for each character in the loop. No need for cnt
variable then.

Change also the "X = X & Y" assignment to simpler "X &= Y".

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