From nobody Sat May 4 22:35:36 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+68050+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+68050+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1606487961; cv=none; d=zohomail.com; s=zohoarc; b=cTJ+v6wUY1rd44gYxBc8hMShsGthIXQteo1P6VZGnWRMEjS7lzGWBRFKE6Lsaod7kNlABJjCglKwoLeiWzXgSofM/2ZYlwr4FZl3SVp+d10Y100bf6Y1VSQm+w0mJoVG3XTNILSihV28ZxcYCoTyU87i+xEiI0+QsWDVSKWlXOU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1606487961; h=Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To; bh=GdlNm20Rw3NpJXwrImTW/Vik+VGZe2Sw1ZVQjNFbthc=; b=g3RxivRqtwxzPFSqt2ZbwAqzZBMYA93h/Ufe2cIFB1DftDPpDkw7Zn5gNSeM/BSfbqsEc6WS4zQ1piMuTnxZNtGrT50PkluyCAdfF+DAbs+9PCptSSrHryqumznKVmBsjgSzuJ8GWHFlVGqFr11FIGHz76b1q5S4NNxdj3JDAoI= 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+68050+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 1606487961727292.7773279306392; Fri, 27 Nov 2020 06:39:21 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id AiG5YY1788612xn7cEVX356N; Fri, 27 Nov 2020 06:39:21 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.19800.1606487960262078411 for ; Fri, 27 Nov 2020 06:39:20 -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 73DCC1516; Fri, 27 Nov 2020 06:39:19 -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 BEE373F70D; Fri, 27 Nov 2020 06:39:17 -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 v4] Platform/ARM/SgiPkg: Fix constant-logical-operand clang error Date: Fri, 27 Nov 2020 20:09:01 +0530 Message-Id: <1606487941-10774-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: u2UwdeTkchH8GKpuyajP01Hfx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1606487961; bh=utkGacfxkxyK33mdtJhBYHkZL4PXt4X4auI/tgAoinE=; h=Date:From:Reply-To:Subject:To; b=I7ZA4Y6gKy7JSVtpxX6g3NE4RGviw2VbM0ZYjSogJaHkEm23UIodJJ1LMLBpmUdiBIj d+LPRUdtoSBUgGLhD79ILWQ8+PguDQvU8ebrijvwjAolBWBC0/qGEwabQ78gu4/YeMvt9 XyHAhJQZtJs9Y8WRl47KS8sXrX6+kbPqBL8= 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 clang. Signed-off-by: Vijayenthiran Subramaniam Reviewed-by: Ard Biesheuvel --- Changes since v3: - Update commit message. - Remove comparing boolean expression with TRUE. - v3 discussion: https://edk2.groups.io/g/devel/topic/78500293 Changes since v2: - Reviewed-by 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 Clang build error reported by Leif in https://edk2.groups.io/g/devel/message/54586 Platform/ARM/SgiPkg/Drivers/PlatformDxe/VirtioDevices.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/VirtioDevices.c b/Plat= form/ARM/SgiPkg/Drivers/PlatformDxe/VirtioDevices.c index 9e5f7e70..5cf8f6a7 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 @@ -82,7 +82,7 @@ InitVirtioDevices ( =20 // Install protocol interface for storage device if ((FeaturePcdGet (PcdVirtioBlkSupported)) && - (FixedPcdGet32 (PcdVirtioBlkBaseAddress))) { + (FixedPcdGet32 (PcdVirtioBlkBaseAddress) !=3D 0)) { Status =3D gBS->InstallProtocolInterface (&mVirtIoBlkController, &gEfiDevicePathProtocolGuid, EFI_NATIVE_INTERFACE, &mVirtioBlockDevicePath); @@ -111,7 +111,7 @@ InitVirtioDevices ( =20 // Install protocol interface for network device if ((FeaturePcdGet (PcdVirtioNetSupported)) && - (FixedPcdGet32 (PcdVirtioNetBaseAddress))) { + (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 (#68050): https://edk2.groups.io/g/devel/message/68050 Mute This Topic: https://groups.io/mt/78547981/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-