* [PATCH v2] tty/hvc_opal: simplify if-if to if-else
@ 2022-04-26 7:10 Wan Jiabing
2022-04-26 7:29 ` Jiri Slaby
0 siblings, 1 reply; 2+ messages in thread
From: Wan Jiabing @ 2022-04-26 7:10 UTC (permalink / raw)
To: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras,
Greg Kroah-Hartman, Jiri Slaby, linuxppc-dev, linux-kernel
Cc: kael_w, Wan Jiabing
Use if and else instead of if(A) and if (!A).
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: "
--
2.35.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v2] tty/hvc_opal: simplify if-if to if-else
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
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Slaby @ 2022-04-26 7:29 UTC (permalink / raw)
To: Wan Jiabing, Michael Ellerman, Benjamin Herrenschmidt,
Paul Mackerras, Greg Kroah-Hartman, linuxppc-dev, linux-kernel
Cc: kael_w
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-26 7:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).