lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <47accf18-ca39-8b36-100e-a6dbfd8705fe@kernel.org>
Date:   Tue, 26 Apr 2022 09:29:52 +0200
From:   Jiri Slaby <jirislaby@...nel.org>
To:     Wan Jiabing <wanjiabing@...o.com>,
        Michael Ellerman <mpe@...erman.id.au>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Paul Mackerras <paulus@...ba.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Cc:     kael_w@...h.net
Subject: Re: [PATCH v2] tty/hvc_opal: simplify if-if to if-else

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@...nel.org>

> Signed-off-by: Wan Jiabing <wanjiabing@...o.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ