public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Leif Lindholm" <leif@nuviainc.com>
To: devel@edk2.groups.io
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Subject: [PATCH edk2-platforms 03/15] Platform,Silicon: fix beagleboard tautological compares
Date: Wed, 25 Nov 2020 12:55:47 +0000	[thread overview]
Message-ID: <20201125125559.11631-4-leif@nuviainc.com> (raw)
In-Reply-To: <20201125125559.11631-1-leif@nuviainc.com>

Fix two instances of masking a single bit and testing another.

Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Signed-off-by: Leif Lindholm <leif@nuviainc.com>
---
 .../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/ResetSystemLib.c b/Platform/BeagleBoard/BeagleBoardPkg/Library/ResetSystemLib/ResetSystemLib.c
index f3e0201a6f1f..e673afda6414 100644
--- a/Platform/BeagleBoard/BeagleBoardPkg/Library/ResetSystemLib/ResetSystemLib.c
+++ b/Platform/BeagleBoard/BeagleBoardPkg/Library/ResetSystemLib/ResetSystemLib.c
@@ -34,7 +34,7 @@ ResetCold (
 {
   //Perform cold reset of the system.
   MmioOr32 (PRM_RSTCTRL, RST_DPLL3);
-  while ((MmioRead32(PRM_RSTST) & GLOBAL_COLD_RST) != 0x1);
+  while (!(MmioRead32(PRM_RSTST) & GLOBAL_COLD_RST));
 }
 
 /**
diff --git a/Silicon/TexasInstruments/Omap35xxPkg/SmbusDxe/Smbus.c b/Silicon/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 = 0;
 
-  while (++Retry < MAX_RETRY && (MmioRead16(I2C_STAT) & BB) == 0x1);
+  while (++Retry < MAX_RETRY && (MmioRead16(I2C_STAT) & BB));
 
   if (Retry == MAX_RETRY) {
     return EFI_TIMEOUT;
-- 
2.20.1


  parent reply	other threads:[~2020-11-25 12:56 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-25 12:55 [PATCH edk2-platforms 00/15] arm platform fixes triggered by VariablePolicy Leif Lindholm
2020-11-25 12:55 ` [PATCH edk2-platforms 01/15] Silicon/AMD: update Styx to use PcdSet*S APIs Leif Lindholm
2020-11-25 12:55 ` [PATCH edk2-platforms 02/15] Platform/AMD: add RngLib for Overdriveboard Leif Lindholm
2020-11-25 13:09   ` Ard Biesheuvel
2020-11-25 13:20     ` Leif Lindholm
2020-11-25 13:22       ` Ard Biesheuvel
2020-11-25 12:55 ` Leif Lindholm [this message]
2020-11-25 12:55 ` [PATCH edk2-platforms 04/15] Silicon/Hisilicon: add RngLib for Hisilicon Leif Lindholm
2020-11-25 13:12   ` Leif Lindholm
2020-11-25 12:55 ` [PATCH edk2-platforms 05/15] Platform/ARM: VExpressPkg fixes to work with new VariablePolicyLib Leif Lindholm
2020-11-25 12:55 ` [PATCH edk2-platforms 06/15] Platform/AMD: add VariablePolicy library resolutions for Overdrive Leif Lindholm
2020-11-25 12:55 ` [PATCH edk2-platforms 07/15] Platform/SoftIron: add VariablePolicy resolutions for Overdrive1000 Leif Lindholm
2020-11-25 12:55 ` [PATCH edk2-platforms 08/15] Platform/LeMaker: add VariablePolicy resolutions for cello Leif Lindholm
2020-11-25 12:55 ` [PATCH edk2-platforms 09/15] Platform/SiFive: add VariablePolicy resolutions Leif Lindholm
2020-11-26  0:39   ` Abner Chang
2020-11-25 12:55 ` [PATCH edk2-platforms 10/15] Platform/Qemu: " Leif Lindholm
2020-11-25 12:55 ` [PATCH edk2-platforms 11/15] Silicon/Marvell: " Leif Lindholm
2020-11-25 12:55 ` [PATCH edk2-platforms 12/15] Platform/BeagleBoard: " Leif Lindholm
2020-11-25 12:55 ` [PATCH edk2-platforms 13/15] Silicon/NXP: " Leif Lindholm
2020-11-25 12:55 ` [PATCH edk2-platforms 14/15] Platform/SocioNext: " Leif Lindholm
2020-11-25 13:11   ` Ard Biesheuvel
2020-11-25 13:16     ` Leif Lindholm
2020-11-25 13:27       ` Ard Biesheuvel
2020-11-25 12:55 ` [PATCH edk2-platforms 15/15] Silicon/Hisilicon: " Leif Lindholm
2020-11-25 13:13   ` Leif Lindholm
2020-11-25 13:11 ` [PATCH edk2-platforms 00/15] arm platform fixes triggered by VariablePolicy Leif Lindholm
2020-11-26 10:44   ` wenyi,xie
2020-11-26 13:31     ` Leif Lindholm
2020-11-26 13:42       ` wenyi,xie
2020-11-25 13:12 ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201125125559.11631-4-leif@nuviainc.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox