From nobody Fri May 3 18:54:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+54618+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+54618+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1582101475; cv=none; d=zohomail.com; s=zohoarc; b=To6wIbhAZ0o45YC0qXJK8DPxlLewLLR3EZrrhBKx6+kgieHnU3ppns8bAKA2Q/YqgF8IYNrkCHIMPpupgXzXNR20jBUu9jo0nc5Lz34I5mH/cMbRPoPnJOvU+vqBcjwYrDl9hfwF51+S5d19Lc3utH9okSPeP6AD01FmI5V0sLI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582101475; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=9e3YkUoe6W/Y9+fu6gUaWOTVmdkfcsgDPhLKuaDhp8Q=; b=B866zx5s/s4prqkvhxLKMkaBsZKFeyF35PFkISHRoHyHJSv2OZjDuQD/gYMlEqvtbSLViDmThDjBJvX7UMo7dOz6gaO1aqpp7IA5ggfxphEMOn26uU9ZtoO+fn2ddazHti4a8EVG0u7wKC5FeM82OaNR5J9S1DfDbDeURm2RpP0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+54618+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 158210147521034.860574806733666; Wed, 19 Feb 2020 00:37:55 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id g2VeYY1788612xLj6bY8Cg9Y; Wed, 19 Feb 2020 00:37:54 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.9518.1582101474065216575 for ; Wed, 19 Feb 2020 00:37:54 -0800 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B5E431FB; Wed, 19 Feb 2020 00:37:53 -0800 (PST) X-Received: from usa.arm.com (a074939-lin.blr.arm.com [10.162.16.84]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D94AD3F68F; Wed, 19 Feb 2020 00:37:51 -0800 (PST) From: "Vijayenthiran Subramaniam" To: devel@edk2.groups.io, leif@nuviainc.com, michael.d.kinney@intel.com, Ard.Biesheuvel@arm.com Cc: thomas.abraham@arm.com Subject: [edk2-devel] [edk2-platforms] [PATCH v2] Platform/ARM/SgiPkg: Fix constant-logical-operand clang error Date: Wed, 19 Feb 2020 14:07:47 +0530 Message-Id: <1582101467-14146-1-git-send-email-vijayenthiran.subramaniam@arm.com> In-Reply-To: <1582100458-13080-1-git-send-email-vijayenthiran.subramaniam@arm.com> References: <1582100458-13080-1-git-send-email-vijayenthiran.subramaniam@arm.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,vijayenthiran.subramaniam@arm.com X-Gm-Message-State: axoJUFmsA4Qfvc2oxXsrnuMYx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1582101474; bh=AMHM8oEB5GbnyxTXBbABiml/XtB0I/02MDV44U2rn4I=; h=Cc:Date:From:Reply-To:Subject:To; b=r/H4SBJEwM6lZAWTRM8hCGxofOWmTOyosbnKbS8UNoTTE+AdJqEekgRz0njbYz0l0xD Fhd/LN+sxEmHSynWlAy1kDJfYtKBw1o9LP2JTtOSWY6hbWkAT3JW4ivsFUrwiijCHj0k9 ivhFt6Movt5/T84TLktvPHO1TpZm7sDxGok= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Fix "use of logical '&&' with constant operand" error when built with CLANG38 toolchain. Signed-off-by: Vijayenthiran Subramaniam Reviewed-by: Thomas Abraham --- Changes since v1: - Fix Copyright year Notes: Fix Clan error reported by Leif in https://edk2.groups.io/g/devel/messa= ge/54586. Build tested with clang 9: CLANG38_AARCH64_PREFIX=3Daarch64-linux-gnu- build -n $NUM_CPUS -a AARCH= 64 \ -t CLANG38 -p Platform/ARM/SgiPkg/SgiPlatform.dsc Platform/ARM/SgiPkg/Drivers/PlatformDxe/VirtioDevices.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/VirtioDevices.c b/Plat= form/ARM/SgiPkg/Drivers/PlatformDxe/VirtioDevices.c index 9e5f7e704e24..f91724b95a42 100644 --- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/VirtioDevices.c +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/VirtioDevices.c @@ -1,6 +1,6 @@ /** @file =20 - Copyright (c) 2018, ARM Ltd. All rights reserved.
+ Copyright (c) 2018-2020, ARM Limited. All rights reserved. =20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -81,8 +81,8 @@ InitVirtioDevices ( STATIC EFI_HANDLE mVirtIoNetController =3D NULL; =20 // Install protocol interface for storage device - if ((FeaturePcdGet (PcdVirtioBlkSupported)) && - (FixedPcdGet32 (PcdVirtioBlkBaseAddress))) { + if ((FeaturePcdGet (PcdVirtioBlkSupported) =3D=3D TRUE) && + (FixedPcdGet32 (PcdVirtioBlkBaseAddress) !=3D 0)) { Status =3D gBS->InstallProtocolInterface (&mVirtIoBlkController, &gEfiDevicePathProtocolGuid, EFI_NATIVE_INTERFACE, &mVirtioBlockDevicePath); @@ -110,8 +110,8 @@ InitVirtioDevices ( } =20 // Install protocol interface for network device - if ((FeaturePcdGet (PcdVirtioNetSupported)) && - (FixedPcdGet32 (PcdVirtioNetBaseAddress))) { + if ((FeaturePcdGet (PcdVirtioNetSupported) =3D=3D TRUE) && + (FixedPcdGet32 (PcdVirtioNetBaseAddress) !=3D 0)) { Status =3D gBS->InstallProtocolInterface (&mVirtIoNetController, &gEfiDevicePathProtocolGuid, EFI_NATIVE_INTERFACE, &mVirtioNetDevicePath); --=20 2.7.4 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#54618): https://edk2.groups.io/g/devel/message/54618 Mute This Topic: https://groups.io/mt/71391950/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-