Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4447425ioa; Wed, 27 Apr 2022 04:12:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZsNpAyOVBy3X53IMfV8uMVmpWTgeCUs6+w/d523QkIUv9NRzsrpR1nghsQ3jekpQN/fyG X-Received: by 2002:a17:902:e94f:b0:14f:1636:c8a8 with SMTP id b15-20020a170902e94f00b0014f1636c8a8mr28083079pll.130.1651057922883; Wed, 27 Apr 2022 04:12:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651057922; cv=none; d=google.com; s=arc-20160816; b=IqXbfBym6+4OWtmLM9KJF8dkRuThRTgmBsUHNc8ICLPh11JSV2C5vK0ivz5/Ca5cX2 kjJHrnB6AF6sYjV4bBNwvkWExlFk+ElC7g2kswgDOMvegqf9UBlsg9J8rUU/Lm56hOCM BmA1UVoYFnfGhN6v2Ji4YtGgvmVczZX8/1m65flJK7d774dP0Mx+YQGDG8dgrVRgzx50 UynVsdHCELljUHfK1WNKoYZVcC29TX53LJIeKCPWfdJw4DkT6u/9UW377VIMLa30SrEi xhk0VqQPI3WsT0GSyb+PZdR+juOuXYclBOxoACSiZ/TjQeBrLp6xM8LdaDyqiI0fhBEq 3BSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=hOlzS7teepghKhHO3I5ZYfaNXKKQM3quot1pS5vaaSA=; b=TBbFIR6Ej+c9f+aLe+3gH/kAper4UplStpNs3En/CLKd+BiImMmzxQlCJHHjJfksRz Gn/ugw9PQMpNAPbAiWIbnT3t7iFdx6KR6fsIRetqv9jEakODq538oI9RedqpwuIkBlGq WOCNI8CKLsN/ZOiwBSP+OpnvRI0FJT+fYG8EwA7jajvZNA1BwwRBdK+nlSnY6zYKD2qV zwIuxwOaiY8+8H86iB6QC2mZybZBo0PMxRb2NloxZiHsae/AvSNyKaVnkCbOoaheNDbe cnYjC6kOYOg3xMJAYYKxVqvLlFIeDfKPW0KpnMYCXKGZDCsnWCCnZkNJOnzsE60rLjn5 /YPA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id j15-20020a63fc0f000000b003ab222d7586si1135870pgi.804.2022.04.27.04.12.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 04:12:02 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E7D362F2964; Wed, 27 Apr 2022 03:05:27 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343957AbiDZHdE (ORCPT + 99 others); Tue, 26 Apr 2022 03:33:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236910AbiDZHdC (ORCPT ); Tue, 26 Apr 2022 03:33:02 -0400 Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D50BDF493 for ; Tue, 26 Apr 2022 00:29:55 -0700 (PDT) Received: by mail-ed1-f51.google.com with SMTP id p18so16030182edr.7 for ; Tue, 26 Apr 2022 00:29:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=hOlzS7teepghKhHO3I5ZYfaNXKKQM3quot1pS5vaaSA=; b=pxC8l347puOLWyO6G1ZGyd+C/Nz//nCN/6cIsiH++0mvA5dNwhwPzdcRlT765RoY9p QrFZE9BaeQw/fuVUn7GHPhZh6oGtalAhytz84V9CHjQ4x7tAlmXwGY3pge9/vbI25DgA XZfASJpK/+QEiZy4a2KJDMmru+YRyLgLRVbeVVgNFsFP0WZBgvNsV+3booyLzmAPat3N Pk6p1AMJcR9UcwoLzdlQOSYULiFvxMwwXKofT1EpqLZfzsrGU//yITs8Q3rGw+MivfLq MaEYIXHEdnYMnj6rmYTkZp6we9gDav1GjZmSNvaMWx8k3I8pMxOZ8TZa2l3qkzSynP6q mwrg== X-Gm-Message-State: AOAM53220vHJHDN+340OlpFwAbOq3QJ1Gv3n4wkTXQWjJQPTUF7ThlOL Ixt7ogZGIyizeAd3VZgf4ko= X-Received: by 2002:a05:6402:42d4:b0:416:5cac:a9a0 with SMTP id i20-20020a05640242d400b004165caca9a0mr23253479edc.86.1650958194022; Tue, 26 Apr 2022 00:29:54 -0700 (PDT) Received: from ?IPV6:2a0b:e7c0:0:107::70f? ([2a0b:e7c0:0:107::70f]) by smtp.gmail.com with ESMTPSA id n10-20020a170906700a00b006efdb748e8dsm4433107ejj.88.2022.04.26.00.29.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Apr 2022 00:29:53 -0700 (PDT) Message-ID: <47accf18-ca39-8b36-100e-a6dbfd8705fe@kernel.org> Date: Tue, 26 Apr 2022 09:29:52 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v2] tty/hvc_opal: simplify if-if to if-else Content-Language: en-US To: Wan Jiabing , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Greg Kroah-Hartman , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Cc: kael_w@yeah.net References: <20220426071041.168282-1-wanjiabing@vivo.com> From: Jiri Slaby In-Reply-To: <20220426071041.168282-1-wanjiabing@vivo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26. 04. 22, 9:10, Wan Jiabing wrote: > Use if and else instead of if(A) and if (!A). Reviewed-by: Jiri Slaby > Signed-off-by: Wan Jiabing > --- > 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