]> git.baikalelectronics.ru Git - kernel.git/commit
mxser: clean up timeout handling in mxser_wait_until_sent()
authorJiri Slaby <jslaby@suse.cz>
Thu, 18 Nov 2021 07:31:19 +0000 (08:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Nov 2021 17:33:22 +0000 (18:33 +0100)
commitd358aade539cc405d1c136cc25cab69507a8ea46
tree95ba6e1e12ce8f7da6f7998db3d60a775cad5658
parent65cd54bcdb2c56d8ad7ab171fc34529524b5a26f
mxser: clean up timeout handling in mxser_wait_until_sent()

timeout cannot be zero at the point of use. So no need to check for
zero. Also precompute the expiration time (into expire) and use it. This
makes the code more clear.

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