From nobody Sun May 5 19:30:40 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+54614+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+54614+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1582100467; cv=none; d=zohomail.com; s=zohoarc; b=EQ+S07mC60592JbHg8uqJU8np+nXSZwaul3TC4PcPIf9C/Td1lI/2CO6p/SiRIMHA58Je2XXPqWGUbGTkFjRRG9HCgFK+wAlHHoVcM2/dKXR0y/V5UtVsyv5/gBHJzAyE7GH1SHkldSsR4nSfo1PRdn5owtaXMYSwcXT+IC7830= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582100467; h=Cc:Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To; bh=fyCT6xs3tJn7Q8vchy2BXy2aHCzfJKdThzuTAM/B86Q=; b=DQc667P3vt95SxAe82x8jd6uKMY5bVVCewXlv2MHTGw3w+onlco8KY3ay0reRl3T8lEyy9tDqlir5x7ZqfFa2PEYcBzi+eLHAvycaxregU1BgnRWPsymI5OTkOBsW2RywX/y7Txq1+hW6JNmcmRiyYwcKkcijxdVorvbBdjkcb0= 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+54614+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1582100467573216.86718427800076; Wed, 19 Feb 2020 00:21:07 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id OMw7YY1788612xa8aFsK8GDc; Wed, 19 Feb 2020 00:21:06 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.9402.1582100465968977740 for ; Wed, 19 Feb 2020 00:21:06 -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 7A0F31FB; Wed, 19 Feb 2020 00:21:05 -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 63B9D3F68F; Wed, 19 Feb 2020 00:24: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] Platform/ARM/SgiPkg: Fix constant-logical-operand clang error Date: Wed, 19 Feb 2020 13:50:58 +0530 Message-Id: <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: Lv7dEsa28tP55HfwpMMD5SZGx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1582100466; bh=USbbYdLv9UFo4YkqpGsD4I5XSxcaiJzbZk85t+rolf8=; h=Cc:Date:From:Reply-To:Subject:To; b=AiAkzB7GxHAjwRkGiTDnmtTLV+OxpxHHObAS2QCA1MmpspmHe1wr+0eretg2wMM1z4F nKgL5TPXgyl1gj2Si9i/EcFVOdFsozxpc1EvEvLhra0RiPi6s4TjNOwHweGJh90x87FdW Y8yuxUj2qrNX+Ca+tPDbZRfIr+tk/WwzElc= 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 --- 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/VirtioDevices.c b/Plat= form/ARM/SgiPkg/Drivers/PlatformDxe/VirtioDevices.c index 9e5f7e704e24..d8af525f52b1 100644 --- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/VirtioDevices.c +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/VirtioDevices.c @@ -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 (#54614): https://edk2.groups.io/g/devel/message/54614 Mute This Topic: https://groups.io/mt/71391794/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-