From nobody Sat May 4 16:55:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+67978+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+67978+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1606314642; cv=none; d=zohomail.com; s=zohoarc; b=DrDE3Xl2ap6/hOwWNqyA5us108DghECDC3+Yi94Z+u/6BlGhT7lAjP0FUIQ7QIYOm8Ud1xA9RGpdIF/18ehSEBw1YyVtxy1hlj6gYqy14NfsvZiThrSAi6AHFPxzmGjOyVCugfO5J8vYj7AYM09BgPfOwIw2Pkb6S8iWH6O9bi4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1606314642; h=Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To; bh=wihQGlqMpUA4S9hzHFLd52sSNM7U2bDPyuI05zpYaA4=; b=HCzLv1BsbhIPIlXGrzLH8hOwhxAqMWq5CT/qGKqU9opctNa3k2kuGtIcCl/M+e43OJCo3WBHM21Im4+B52Zp0I1xwKZHCoSx+uZbVXWiROqHpSRN75PqbnzRGZRYOlGGxWGdhPP8yjxYovCp+JuBmsUQSqOTKPQEY7GpK8JMC44= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+67978+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1606314642426643.687921168084; Wed, 25 Nov 2020 06:30:42 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id P0lpYY1788612xoKKXvI5m35; Wed, 25 Nov 2020 06:30:40 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.7476.1606314639744535053 for ; Wed, 25 Nov 2020 06:30:40 -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 83E08106F; Wed, 25 Nov 2020 06:30:38 -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 D603A3F70D; Wed, 25 Nov 2020 06:30:36 -0800 (PST) From: "Vijayenthiran Subramaniam" To: devel@edk2.groups.io, leif@nuviainc.com, Ard.Biesheuvel@arm.com, thomas.abraham@arm.com Subject: [edk2-devel] [edk2-platforms] [PATCH v3] Platform/ARM/SgiPkg: Fix constant-logical-operand clang error Date: Wed, 25 Nov 2020 20:00:30 +0530 Message-Id: <1606314630-13316-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: UYHP2JxGGzYWgdEuqpYTkIJxx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1606314640; bh=BzJN8H/u2vf3CbPHN3Laq7ALBzDb/61UP2quU2nKDqk=; h=Date:From:Reply-To:Subject:To; b=GfHHxaY26fzhnk9UD4O8H7D0s8ZhAJtkVy2BnFbGBs1RR6Iak31ex7KH5vSTiAl9EX6 SuMSbD/glS31hD/b3ldbzaVrmn1ZvU1zYU21GmaMr3ux8c2SPbzxd/mqlzpEEKCoNc3GB r9PLm9L2hr2cX1JNOyi2YPjtYcd4UNyl9EI= 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. Reviewed-by: Thomas Abraham Signed-off-by: Vijayenthiran Subramaniam --- Changes since v2: - Reviewed-bys added from: https://edk2.groups.io/g/devel/topic/71391950#55868 - Rebased to latest master and repost. Changes since v1: - Fix Copyright year Note: Fix Clan error reported by Leif in https://edk2.groups.io/g/devel/message/54586 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 9e5f7e70..f91724b9 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.17.1 -=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 (#67978): https://edk2.groups.io/g/devel/message/67978 Mute This Topic: https://groups.io/mt/78500293/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-