aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/hvc
diff options
context:
space:
mode:
authorWan Jiabing <wanjiabing@vivo.com>2022-04-24 17:13:08 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-26 13:24:22 +0200
commit3d27b05e4181a0eba618108292aa1998017b1dd7 (patch)
treeffde8d1382f1cd700baa3f831f92c180073b46e5 /drivers/tty/hvc
parenttty/hvc_opal: simplify if-if to if-else (diff)
downloadlinux-dev-3d27b05e4181a0eba618108292aa1998017b1dd7.tar.xz
linux-dev-3d27b05e4181a0eba618108292aa1998017b1dd7.zip
tty: hvcs: simplify if-if to if-else
Use if and else instead of if(A) and if (!A) and fix a coding style. Signed-off-by: Wan Jiabing <wanjiabing@vivo.com> Link: https://lore.kernel.org/r/20220424091310.98780-1-wanjiabing@vivo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/hvc')
-rw-r--r--drivers/tty/hvc/hvcs.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index 245da1dfd818..9b7e8246a464 100644
--- a/drivers/tty/hvc/hvcs.c
+++ b/drivers/tty/hvc/hvcs.c
@@ -581,10 +581,9 @@ static int hvcs_io(struct hvcs_struct *hvcsd)
spin_unlock_irqrestore(&hvcsd->lock, flags);
/* This is synch -- FIXME :js: it is not! */
- if(got)
+ if (got)
tty_flip_buffer_push(&hvcsd->port);
-
- if (!got) {
+ else {
/* Do this _after_ the flip_buffer_push */
spin_lock_irqsave(&hvcsd->lock, flags);
vio_enable_interrupts(hvcsd->vdev);