From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.18321.1606480316271951118 for ; Fri, 27 Nov 2020 04:31:56 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: vijayenthiran.subramaniam@arm.com) 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 D626E153B for ; Fri, 27 Nov 2020 04:31:55 -0800 (PST) Received: from mail-wr1-f53.google.com (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B08363F885 for ; Fri, 27 Nov 2020 04:31:55 -0800 (PST) Received: by mail-wr1-f53.google.com with SMTP id i2so5408798wrs.4 for ; Fri, 27 Nov 2020 04:31:55 -0800 (PST) X-Gm-Message-State: AOAM531SNLuSApNj6N2ZZn4cgoRARjPcHwGP33mD36H9991UG6vtshup EsVC7iCANrBmW7A4hN0SSvYPw5+sFJPNNP7y8+0= X-Google-Smtp-Source: ABdhPJzwo2rGgehAATGTZ46wyg3W6XZE36bmVhDFyYxvNYlvrwdEYF533jPz72U75oPp0rV2MbuwsV5lJL1On1GVxCc= X-Received: by 2002:adf:fd06:: with SMTP id e6mr10266259wrr.206.1606480306595; Fri, 27 Nov 2020 04:31:46 -0800 (PST) MIME-Version: 1.0 References: <1606314630-13316-1-git-send-email-vijayenthiran.subramaniam@arm.com> <20201125175839.GV1664@vanye> In-Reply-To: <20201125175839.GV1664@vanye> From: "Vijayenthiran Subramaniam" Date: Fri, 27 Nov 2020 12:31:34 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [edk2-platforms] [PATCH v3] Platform/ARM/SgiPkg: Fix constant-logical-operand clang error To: devel@edk2.groups.io, leif@nuviainc.com Cc: Vijayenthiran Subramaniam , Ard.Biesheuvel@arm.com, thomas.abraham@arm.com Content-Type: text/plain; charset="UTF-8" Hi Leif, On Wed, Nov 25, 2020 at 5:58 PM Leif Lindholm wrote: > > On Wed, Nov 25, 2020 at 20:00:30 +0530, Vijayenthiran Subramaniam wrote: > > Fix "use of logical '&&' with constant operand" error when built with > > CLANG38 toolchain. > > CLANG38 is the toolchain profile in the build system, it is highly > unlikely you are actually building with clang 3.8. > clang --version tells you the toolchain *version*. I will update the commit message in v3. Thanks, Vijay > > 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/Platform/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 > > > > - Copyright (c) 2018, ARM Ltd. All rights reserved.
> > + Copyright (c) 2018-2020, ARM Limited. All rights reserved. > > > > SPDX-License-Identifier: BSD-2-Clause-Patent > > > > @@ -81,8 +81,8 @@ InitVirtioDevices ( > > STATIC EFI_HANDLE mVirtIoNetController = NULL; > > > > // Install protocol interface for storage device > > - if ((FeaturePcdGet (PcdVirtioBlkSupported)) && > > - (FixedPcdGet32 (PcdVirtioBlkBaseAddress))) { > > + if ((FeaturePcdGet (PcdVirtioBlkSupported) == TRUE) && > > + (FixedPcdGet32 (PcdVirtioBlkBaseAddress) != 0)) { > > Status = gBS->InstallProtocolInterface (&mVirtIoBlkController, > > &gEfiDevicePathProtocolGuid, EFI_NATIVE_INTERFACE, > > &mVirtioBlockDevicePath); > > @@ -110,8 +110,8 @@ InitVirtioDevices ( > > } > > > > // Install protocol interface for network device > > - if ((FeaturePcdGet (PcdVirtioNetSupported)) && > > - (FixedPcdGet32 (PcdVirtioNetBaseAddress))) { > > + if ((FeaturePcdGet (PcdVirtioNetSupported) == TRUE) && > > + (FixedPcdGet32 (PcdVirtioNetBaseAddress) != 0)) { > > Status = gBS->InstallProtocolInterface (&mVirtIoNetController, > > &gEfiDevicePathProtocolGuid, EFI_NATIVE_INTERFACE, > > &mVirtioNetDevicePath); > > -- > > 2.17.1 > > > > > > >