From: Wan Jiabing <wanjiabing@vivo.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
David Sterba <dsterba@suse.com>,
Max Filippov <jcmvbkbc@gmail.com>, Alex Elder <elder@linaro.org>,
Wan Jiabing <wanjiabing@vivo.com>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Cc: kael_w@yeah.net
Subject: [PATCH] tty: hvcs: simplify if-if to if-else
Date: Sun, 24 Apr 2022 17:13:08 +0800 [thread overview]
Message-ID: <20220424091310.98780-1-wanjiabing@vivo.com> (raw)
Use if and else instead of if(A) and if (!A) and fix a coding style.
Signed-off-by: Wan Jiabing <wanjiabing@vivo.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
next reply other threads:[~2022-04-24 9:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-24 9:13 Wan Jiabing [this message]
2022-05-02 14:33 ` [PATCH] tty: hvcs: simplify if-if to if-else Christophe Leroy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220424091310.98780-1-wanjiabing@vivo.com \
--to=wanjiabing@vivo.com \
--cc=dsterba@suse.com \
--cc=elder@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=jcmvbkbc@gmail.com \
--cc=jirislaby@kernel.org \
--cc=kael_w@yeah.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).