From nobody Tue Feb 10 15:46:08 2026 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+67950+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+67950+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1606308966; cv=none; d=zohomail.com; s=zohoarc; b=ewounUCmbpFcZfNBGxbXESzvRFb+ZuNqZuQM3cAzCSRD1PXFKXmAh7v1ARQQLbUN3Hw3kw2Vxs2XE3mPFFEykZBw73AbzMSohXsKB03hQL1OCRcP28GeUWzwPGCIraDfFhc460TR5utn644OZVaMOeF9Ny9Wuq6dDgUcGX7dWHI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1606308966; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=+YQ1mzLbLxHcxHMTedOzhHG1UrCNWWHpopDJDUvxXYQ=; b=CrnYWirbukbNxWsi7e517W4IoIsjEkJmZlpsJeR/Mo7mybsC9Ezgb3cKMUO2+1j5uuX6fB3cJmFR3z6L4U23TjKFUPjB2jJNF9SFwH+MJHXuvyFih9PeCM8LK4s2wj/lQ/xF1tfMv8Aq6PbhT0eOux+NUr4Ia7TElCx6yW+EuxU= 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+67950+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 160630896659373.24583898227627; Wed, 25 Nov 2020 04:56:06 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id fuPTYY1788612xirOm7NEGPx; Wed, 25 Nov 2020 04:56:06 -0800 X-Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by mx.groups.io with SMTP id smtpd.web08.6275.1606308965349556193 for ; Wed, 25 Nov 2020 04:56:05 -0800 X-Received: by mail-wr1-f66.google.com with SMTP id s8so1806444wrw.10 for ; Wed, 25 Nov 2020 04:56:05 -0800 (PST) X-Gm-Message-State: VfBwR1viB2GSxLgPSe6KN47Yx1787277AA= X-Google-Smtp-Source: ABdhPJzkJtTtnGvjFIj5b6OLtjHUOCyXVzjWRhnsRC0UNjb8++xuXV7tqCd0roierXVHeTWYsqKnKA== X-Received: by 2002:adf:f8d2:: with SMTP id f18mr3817583wrq.379.1606308963738; Wed, 25 Nov 2020 04:56:03 -0800 (PST) X-Received: from vanye.hemma.eciton.net (cpc1-cmbg19-2-0-cust915.5-4.cable.virginm.net. [82.27.183.148]) by smtp.gmail.com with ESMTPSA id p9sm4942639wrw.29.2020.11.25.04.56.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Nov 2020 04:56:03 -0800 (PST) From: "Leif Lindholm" To: devel@edk2.groups.io Cc: Ard Biesheuvel Subject: [edk2-devel] [PATCH edk2-platforms 03/15] Platform,Silicon: fix beagleboard tautological compares Date: Wed, 25 Nov 2020 12:55:47 +0000 Message-Id: <20201125125559.11631-4-leif@nuviainc.com> In-Reply-To: <20201125125559.11631-1-leif@nuviainc.com> References: <20201125125559.11631-1-leif@nuviainc.com> MIME-Version: 1.0 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,leif@nuviainc.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1606308966; bh=rphKEd7MIpuTy0uvRfgh3Pz/T31U2jJ8ZIkj01Cc4Yw=; h=Cc:Date:From:Reply-To:Subject:To; b=QwJRRgjK1ebsqNZXUyJCF4kjKJSvOQpgr72qTl2cy5vCZzQYw8jST9cSQzld9VAP7na Lr3eDVPtuI7GQOO66kJ6Mckf/rBSQYKqH84qGmiVmZ7Er0GpZ6ALHVl8R67xokkuCgVJ6 ZH53LaZsq+Yn6P1Cj3TPQIRGBiBUtOotuB8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Fix two instances of masking a single bit and testing another. Cc: Ard Biesheuvel Signed-off-by: Leif Lindholm --- .../BeagleBoardPkg/Library/ResetSystemLib/ResetSystemLib.c | 2 +- Silicon/TexasInstruments/Omap35xxPkg/SmbusDxe/Smbus.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Platform/BeagleBoard/BeagleBoardPkg/Library/ResetSystemLib/Res= etSystemLib.c b/Platform/BeagleBoard/BeagleBoardPkg/Library/ResetSystemLib/= ResetSystemLib.c index f3e0201a6f1f..e673afda6414 100644 --- a/Platform/BeagleBoard/BeagleBoardPkg/Library/ResetSystemLib/ResetSyste= mLib.c +++ b/Platform/BeagleBoard/BeagleBoardPkg/Library/ResetSystemLib/ResetSyste= mLib.c @@ -34,7 +34,7 @@ ResetCold ( { //Perform cold reset of the system. MmioOr32 (PRM_RSTCTRL, RST_DPLL3); - while ((MmioRead32(PRM_RSTST) & GLOBAL_COLD_RST) !=3D 0x1); + while (!(MmioRead32(PRM_RSTST) & GLOBAL_COLD_RST)); } =20 /** diff --git a/Silicon/TexasInstruments/Omap35xxPkg/SmbusDxe/Smbus.c b/Silico= n/TexasInstruments/Omap35xxPkg/SmbusDxe/Smbus.c index 894ba3313cdf..a8b820e84800 100644 --- a/Silicon/TexasInstruments/Omap35xxPkg/SmbusDxe/Smbus.c +++ b/Silicon/TexasInstruments/Omap35xxPkg/SmbusDxe/Smbus.c @@ -28,7 +28,7 @@ WaitForBusBusy ( { UINTN Retry =3D 0; =20 - while (++Retry < MAX_RETRY && (MmioRead16(I2C_STAT) & BB) =3D=3D 0x1); + while (++Retry < MAX_RETRY && (MmioRead16(I2C_STAT) & BB)); =20 if (Retry =3D=3D MAX_RETRY) { return EFI_TIMEOUT; --=20 2.20.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 (#67950): https://edk2.groups.io/g/devel/message/67950 Mute This Topic: https://groups.io/mt/78498663/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-