[edk2-devel] [PATCH v1 01/16] ArmPlatformPkg: Fix Ecc error 3001 in NorFlashDxe

PierreGondois posted 16 patches 5 years, 2 months ago
[edk2-devel] [PATCH v1 01/16] ArmPlatformPkg: Fix Ecc error 3001 in NorFlashDxe
Posted by PierreGondois 5 years, 2 months ago
From: Pierre Gondois <Pierre.Gondois@arm.com>

This patch fixes the following Ecc reported error:
Boolean values and variable type BOOLEAN should not use
explicit comparisons to TRUE or FALSE

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
---
 The changes can be seen at: https://github.com/PierreARM/edk2-platforms/tree/1537_Ecc_ArmPlatformPkg_v1

 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c
index d9e196cbf18c32fe5306cc3c0674a7b5798a9191..b681c4b4668630de8a9585363a328b3e3f1bc324 100644
--- a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c
+++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c
@@ -1,6 +1,6 @@
 /** @file  NorFlashDxe.c

-  Copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.<BR>
+  Copyright (c) 2011 - 2020, Arm Limited. All rights reserved.<BR>

   SPDX-License-Identifier: BSD-2-Clause-Patent

@@ -259,7 +259,7 @@ NorFlashUnlockSingleBlockIfNecessary (

   Status = EFI_SUCCESS;

-  if (NorFlashBlockIsLocked (Instance, BlockAddress) == TRUE) {
+  if (NorFlashBlockIsLocked (Instance, BlockAddress)) {
     Status = NorFlashUnlockSingleBlock (Instance, BlockAddress);
   }

--
2.17.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#68264): https://edk2.groups.io/g/devel/message/68264
Mute This Topic: https://groups.io/mt/78690944/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-