From: Jiri Slaby <jirislaby@kernel.org>
To: Wan Jiabing <wanjiabing@vivo.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Cc: kael_w@yeah.net
Subject: Re: [PATCH v2] tty/hvc_opal: simplify if-if to if-else
Date: Tue, 26 Apr 2022 09:29:52 +0200 [thread overview]
Message-ID: <47accf18-ca39-8b36-100e-a6dbfd8705fe@kernel.org> (raw)
In-Reply-To: <20220426071041.168282-1-wanjiabing@vivo.com>
On 26. 04. 22, 9:10, Wan Jiabing wrote:
> Use if and else instead of if(A) and if (!A).
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
> Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
> ---
> Change log:
> v2:
> - add braces to the if block.
> ---
> drivers/tty/hvc/hvc_opal.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/tty/hvc/hvc_opal.c b/drivers/tty/hvc/hvc_opal.c
> index 84776bc641e6..794c7b18aa06 100644
> --- a/drivers/tty/hvc/hvc_opal.c
> +++ b/drivers/tty/hvc/hvc_opal.c
> @@ -342,9 +342,9 @@ void __init hvc_opal_init_early(void)
> * path, so we hard wire it
> */
> opal = of_find_node_by_path("/ibm,opal/consoles");
> - if (opal)
> + if (opal) {
> pr_devel("hvc_opal: Found consoles in new location\n");
> - if (!opal) {
> + } else {
> opal = of_find_node_by_path("/ibm,opal");
> if (opal)
> pr_devel("hvc_opal: "
--
js
suse labs
prev parent reply other threads:[~2022-04-26 7:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-26 7:10 [PATCH v2] tty/hvc_opal: simplify if-if to if-else Wan Jiabing
2022-04-26 7:29 ` Jiri Slaby [this message]
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=47accf18-ca39-8b36-100e-a6dbfd8705fe@kernel.org \
--to=jirislaby@kernel.org \
--cc=benh@kernel.crashing.org \
--cc=gregkh@linuxfoundation.org \
--cc=kael_w@yeah.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=wanjiabing@vivo.com \
/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).