From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by mx.groups.io with SMTP id smtpd.web09.10571.1606327122841698322 for ; Wed, 25 Nov 2020 09:58:43 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=Ux3Z+ffs; spf=pass (domain: nuviainc.com, ip: 209.85.221.67, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f67.google.com with SMTP id s8so2777066wrw.10 for ; Wed, 25 Nov 2020 09:58:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=yQqwDHnBc9afUCPygPsW8j0rXVmoUVESW5QnDKtCKhw=; b=Ux3Z+ffsfgspsdEHbT0tXSr5S7Gc8CToA9ZY71zooLarZ8av0MO6f637/ADXEHWfWF TUqbzua+5WSWKCQXn6+4pis5a2heYd6DFqaV8EWXNsg+vn1ZyfUNBgZXMzWUo+y7LkCQ uAwk+DEmmu99bfL/yVSFO8aJ+bJ72DpFF06RA03QW9zj0Mi0KKhRWdwMYYj+92p3RqAg Bbftq+GuK3pT7gzVm8E9RaruQhKj5EBr5WUt9Y4a5AJLUHCUaFBXH6tc977dJk2nKi7E uz2Xo6Of9CU81UgUcaLl+7ASp4+y3qWm16L9QKSICac2dcEYR2D19FqZ9wrKqXeTxm6p yEww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=yQqwDHnBc9afUCPygPsW8j0rXVmoUVESW5QnDKtCKhw=; b=IYKLrbcxGPM8X44IJqxeeFRToBkMjaWzJoKv6OJvdlRqmDxQsMq6/wPXFwgbwVVra8 XwXCXQe7SIKGg11NjcONQWmipHZ1EfYd2dPOJWFAMDcfBbB+zeaRN8yPgsHSn+r6pGn9 zEM1k21H54GF7aKrRjfwcgyamSC3g4GW36S6jjVV3dWfcNbR3C5oJD0EVwsJpv7LaxQ8 G/F+OLJ0PYytPZ7t/znDqQsBU5zV3T+JDsm/5xGq0vU5cEq8A5UYzu6DzazSOCJ+Ruhv KSdudBNn7OxObpqhSjEK1hKlfMZw/bglDgNaN5Av/mW0G7i1BZlizhcZ3/b5HXHDjEht t8ww== X-Gm-Message-State: AOAM532VnsnK1mEssVMs3G6d3SwbV1KABkChYdtZdZRi9Tv4DjmXrXd6 ztP0HbpJ30eKvPgwTctSmylpeA== X-Google-Smtp-Source: ABdhPJym1Hid7zoDZMK/D1vKAu34Ss20uS87lRkpZ8IBGNbdh0Mur89kXbIXkY4viuaJMNLNuSX2dg== X-Received: by 2002:adf:ee12:: with SMTP id y18mr5298552wrn.231.1606327121409; Wed, 25 Nov 2020 09:58:41 -0800 (PST) Return-Path: Received: from vanye (cpc1-cmbg19-2-0-cust915.5-4.cable.virginm.net. [82.27.183.148]) by smtp.gmail.com with ESMTPSA id t136sm5669272wmt.18.2020.11.25.09.58.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Nov 2020 09:58:40 -0800 (PST) Date: Wed, 25 Nov 2020 17:58:39 +0000 From: "Leif Lindholm" To: Vijayenthiran Subramaniam Cc: devel@edk2.groups.io, Ard.Biesheuvel@arm.com, thomas.abraham@arm.com Subject: Re: [edk2-platforms] [PATCH v3] Platform/ARM/SgiPkg: Fix constant-logical-operand clang error Message-ID: <20201125175839.GV1664@vanye> References: <1606314630-13316-1-git-send-email-vijayenthiran.subramaniam@arm.com> MIME-Version: 1.0 In-Reply-To: <1606314630-13316-1-git-send-email-vijayenthiran.subramaniam@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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*. > 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 >