[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220424091310.98780-1-wanjiabing@vivo.com>
Date: Sun, 24 Apr 2022 17:13:08 +0800
From: Wan Jiabing <wanjiabing@...o.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>,
David Sterba <dsterba@...e.com>,
Max Filippov <jcmvbkbc@...il.com>,
Alex Elder <elder@...aro.org>,
Wan Jiabing <wanjiabing@...o.com>,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Cc: kael_w@...h.net
Subject: [PATCH] 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@...o.com>
---
drivers/tty/hvc/hvcs.c | 5 ++---
1 file 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);
--
2.35.1
Powered by blists - more mailing lists