Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp3572640ioa; Tue, 26 Apr 2022 06:20:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzh7WWzoCgAd8xuDtg6iy3fzM3vQ2Hi6q/MqwAjsvQvOXbs176Qzt9ih5Bgnza73xP+/JwG X-Received: by 2002:a17:903:11cc:b0:151:71e4:dadc with SMTP id q12-20020a17090311cc00b0015171e4dadcmr22992372plh.78.1650979229047; Tue, 26 Apr 2022 06:20:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1650979229; cv=pass; d=google.com; s=arc-20160816; b=hf7fY5NIxIgxIX7NJpqJmvCV9O1Wl+++/0Ihhf0L+lSEZAmnmqqQtCWw785Ea8CX98 o5o96AotRByh4QuhBB6/g9PDSTRRiDfGnyxnOxTHbPg1WBnX9mUVDym0i/XJBqs0ZEdT etnkFIWt+eyptXQ/L971w170myHa0zaSI3n2CMtEy1jH/NQA1P4R41kQ9X/8xJIbB+6w MF7b4E/wAxi/eNi85BZt+2sRX5M4VIDZoxg7ag4LIAv7+62kxGQr6GZJwskgibK3d8Dr KVX3A3Q+azhVqDkTX3H5cqWnrC9w2SGoSzUxGcZAvt6QE4lPEhvr0/r3QretVrYx5Q1x JCXA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=sp65PRQE267iMfi7EDA01FxloPtoP5FBLM9GC4orIUs=; b=E1+cZKsKtkhHunzJu6gn/HppKEmA7P56iRkpPuOrzlRZCw0ElhzvxSViYftDFI3rSE l0tOh8bh8NKjtz0A9s6DwpmSMascWEaigNjNuTINXJNev//at5w0tXO3Ikqewo8b0lJ/ 8gXG+PZ6aG5/4eWs+248/fn66e6NHidW8upyQiNOYSh+91azzie24fJQhZznTJ9OWRRa DsFAk29dezBSx0SrYRjXO9rHN0aPmW5s3dtHAabv34Egk6W2DJBboHs2iuglFD8qqiGf tjV+yXBbaR5jlXDH7v4ltK7Jn7H1TDF+QfUIf73pEa8oBI1NvsI1Kklwt6rDlXn9miaA UFBQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo0.onmicrosoft.com header.s=selector2-vivo0-onmicrosoft-com header.b=pi2Wz4C0; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nl18-20020a17090b385200b001d2b6b6e2b0si2423262pjb.182.2022.04.26.06.20.13; Tue, 26 Apr 2022 06:20:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo0.onmicrosoft.com header.s=selector2-vivo0-onmicrosoft-com header.b=pi2Wz4C0; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343749AbiDZHOm (ORCPT + 99 others); Tue, 26 Apr 2022 03:14:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343730AbiDZHOD (ORCPT ); Tue, 26 Apr 2022 03:14:03 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2133.outbound.protection.outlook.com [40.107.255.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D854B17AA0 for ; Tue, 26 Apr 2022 00:10:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T8iV42Pmg9r5PRH+WrPJDbtOc/nofreJjzEIdzYdJO1QSWcTjCPs6/Cdv48IclXsOJbroWVIS5msYfctUNjPOpQRxFM6s0Oop817SKjW9ZQejWLltfYRFKs7oZre8LQFLgVGcr5Asq7DxlSNBeoVOqi0vpOONZtyGfKvJ3tn6Fj1LOOwWlpmOIhRmWARR+wq+Wm1rwdNZ3e+meo63dUyrsz/s7umvVPYD0nfSLtaBfkNAIci6vvR7pBIWhSWFcpQtaDaCMjdp4i/NdrHRFLlYnzxAB2T1zLUkaMoVZQ2PmzDgVTcDEYKkDnPXF4+15zyxcyQ/YS1QDt72XdUhhGm/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=sp65PRQE267iMfi7EDA01FxloPtoP5FBLM9GC4orIUs=; b=P9nZzZWARu9d/+Ane7p1G5HRol1TQiscdvoT/DoMwizZmPSr4h+P3xHolq6AGvHHlXpkQ+YFURCCgM0+5JSC64JksBP1suoTcO6+ocraaB2VIJTSn506f60RdrFheBUv1443nmgtmq7mFn3C3JjxR3iK1k/9FBLLaexaaadAGOU5ykjEKzKh67NjeYL7+WoNftAD+oPf/xu02QssGNkduu9x9P34VI4G7UhlMSHcHzsx9bwLN/fm61mMq2PeHSmczYx2th07ZsZVyMNlHANsOEpjGaC3N4eqv2IIJDunGMHu2txtDdugF35bZsJ29HfdoHge8f83w+6HgeozJB+18g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sp65PRQE267iMfi7EDA01FxloPtoP5FBLM9GC4orIUs=; b=pi2Wz4C0FkRTtQVu7nA5JSW2i9QrjMeC55u61b9Ksx65kHYbkTXUfOW8VXDE6PB7WGFJkxzGUgzQMsrnjWG2VP1zIkCBv4pWuPQFvPv6VIdAh8AookyKdedb1ldW4TVDGA7QOfzxxYvb5d4Qwe874jYLl9QB2GTuYrL9gWOV7fM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SG2PR06MB3367.apcprd06.prod.outlook.com (2603:1096:4:78::19) by PS2PR06MB3477.apcprd06.prod.outlook.com (2603:1096:300:6b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.14; Tue, 26 Apr 2022 07:10:52 +0000 Received: from SG2PR06MB3367.apcprd06.prod.outlook.com ([fe80::4591:4f3e:f951:6c8c]) by SG2PR06MB3367.apcprd06.prod.outlook.com ([fe80::4591:4f3e:f951:6c8c%7]) with mapi id 15.20.5186.021; Tue, 26 Apr 2022 07:10:52 +0000 From: Wan Jiabing To: Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Greg Kroah-Hartman , Jiri Slaby , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Cc: kael_w@yeah.net, Wan Jiabing Subject: [PATCH v2] tty/hvc_opal: simplify if-if to if-else Date: Tue, 26 Apr 2022 15:10:41 +0800 Message-Id: <20220426071041.168282-1-wanjiabing@vivo.com> X-Mailer: git-send-email 2.35.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: HK2PR02CA0193.apcprd02.prod.outlook.com (2603:1096:201:21::29) To SG2PR06MB3367.apcprd06.prod.outlook.com (2603:1096:4:78::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 84e7db3e-70d2-4021-a09b-08da2753e5cf X-MS-TrafficTypeDiagnostic: PS2PR06MB3477:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CCqt8K5P7yDW1CFUhGTfskPVaRvp7DzCN3Um9PsSJk3ZmeSkrpKg75yNvceBqJj9YpaUZZkRFAEKyAO+EJKHtyGazs2A2D5phoVKgUHzGEMIVS6o1jpf/gW6TTTRKrfap3yPbJcVHHXK/6DbCdjV8nxupn1AsQIwIszSAQ4DER5XTpA52yOD3r1D2HZnLkUkQeZR6hX3CLpSpKEf67p9h/NtmRqo0fzoosxyLxzsOl3cYOTAgxzpA5I2TU30MDzHJnceGPju6wqG9nsltBUHyrYUqAuT9nx/y6juTzV2l8R2YYnqpDgQ6b8T+bOLkub90jh1+gPzXeCPjSufmjp+MiKbQlJGm7PITha9R6n75YL3MdfuVVUELELc3BuVlqVgicszFOAjWUoQHdAnBW2yPQhU6jnkDjPZFT5SgSdl3JiikiBPXMHsOmyJn0Lb2KiWDhgYjRvZRRe/JHZ/YFEsrmPRIFC6zj1JBPTnxxubLic+5i6N+GZtKMR4h0UQ9348ZBIBKk1cyUpmlAIAcvfraxespNjUakfw8a7oE/i5nR8JNLxFHaE8doztDj1BkX5gzoPFegPU/kT8J771EcN8vis4Gf8pQ+q7MGwReRiDtuRVfsQADHP8uL7GsIsuuLx1C0wy1zjDDHjH6eX1+I5Oe2kNrnZwEjfiQCMgX8asGc+C2hSxz32SNXLoLLWJjABxFI6uezw5cx1XIe3mBd/VuA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SG2PR06MB3367.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(66946007)(508600001)(316002)(36756003)(8936002)(66476007)(8676002)(1076003)(66556008)(110136005)(107886003)(186003)(5660300002)(6512007)(4744005)(38100700002)(38350700002)(86362001)(4326008)(2616005)(6486002)(2906002)(83380400001)(26005)(6506007)(6666004)(52116002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?VLRtUaZcJrGLTm8Ap0R3tOk7NUwPHzirXi/o/RrSra2sQncIF78PQd+I1Vdx?= =?us-ascii?Q?ibFa1wDCN5oMyLAcJOt5qP33MHZrY4zv7RggpicSCe3SI5a5VY6OzjJoWV1K?= =?us-ascii?Q?D/a6jh3yo9PrpIppVMshYwP8JtH9/8DN0itais4nqeksp2yKDAmipvuuSg31?= =?us-ascii?Q?kmgrg3Fho3vHmxq3f5rbWH7sWletNcfVGSV7c/sVSa2HJ9qzYQwpyN2tucS2?= =?us-ascii?Q?ool5aeGTWwRkPyaFAPeesBxESZ/ICOpxxlbz/LZzWlyDiW6nHK8QqBcGSV6A?= =?us-ascii?Q?YAjyy4NysyrP/ANi11H0RsMLQd5MKhDIlGjdYHnnwqRsKQPQOY1VN2z1nEqf?= =?us-ascii?Q?oFCOLFf11csQnxLOhSXwRRD1auWWWN31kg8/P4VpX0zX15BPwHtJaShNcn3x?= =?us-ascii?Q?1kiIuKWkPTxxg9HnfC7BGypOKG1mzr8LJJYVNSiA85pVQAyBcSjZTDvmTPkT?= =?us-ascii?Q?bGKi/MHrFnilxZmNkKtQRFWbm4cs+WyiKQGAX6QkyYJfO6ZsM33xbbDSF4ao?= =?us-ascii?Q?CH26bUSQH2ivLFOMJoKBcis09hYwhVvYMLqI9JRxqEP0mWDE54z8NYNg+8w9?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stsP3QXZR8YJ7rXGk9Nq?= =?us-ascii?Q?clhC2JwLn1TwzisbN7O89ax1Dj9MssP8JPDVXecFjw1pWmafBZ5J2QZ69BYK?= =?us-ascii?Q?LPTNCPG2DPflUfkqILg9LpUKobNhFSSz1Zdt9F1r1vd1kzSuIZDyFhraNuvq?= =?us-ascii?Q?s+EY+PA77RovpHUt9NYrmAf1Ow7tpHt6ZcbEzQ3LopmS7paoHu7ira7gIgQp?= =?us-ascii?Q?j0m/xHc/p7iAfpSIJ1coWWz9ke1/7nZw6EEX98gUSnORrZThR1QaTVGMpXwW?= =?us-ascii?Q?M7Yp0+3f0g=3D=3D?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 84e7db3e-70d2-4021-a09b-08da2753e5cf X-MS-Exchange-CrossTenant-AuthSource: SG2PR06MB3367.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2022 07:10:52.0048 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: V3UOW26yKt4xKIE0RZU1aRUbIc/u9Ffe2X5lH/EiRKmPjuqdBmyBq+MljTKJY569NjBwHIk3E8mdDToEdOi6VA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PS2PR06MB3477 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham 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 Use if and else instead of if(A) and if (!A). 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: " -- 2.35.1