public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Hao Wu <hao.a.wu@intel.com>
To: edk2-devel@lists.01.org, liming.gao@intel.com
Cc: Hao Wu <hao.a.wu@intel.com>, Jeff Fan <jeff.fan@intel.com>
Subject: [PATCH 1/3] IntelFrameworkModulePkg: Use IsZeroGuid API for zero GUID checking
Date: Tue, 30 Aug 2016 10:36:12 +0800	[thread overview]
Message-ID: <1472524574-17732-2-git-send-email-hao.a.wu@intel.com> (raw)
In-Reply-To: <1472524574-17732-1-git-send-email-hao.a.wu@intel.com>

Instead of comparing a GUID with gZeroGuid via the CompareGuid API, the
commit uses the IsZeroGuid API to check if the given GUID is a zero GUID.

Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
 IntelFrameworkModulePkg/Universal/DataHubDxe/DataHub.c      | 4 ++--
 IntelFrameworkModulePkg/Universal/DataHubDxe/DataHub.h      | 4 +---
 IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf | 6 +-----
 3 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/IntelFrameworkModulePkg/Universal/DataHubDxe/DataHub.c b/IntelFrameworkModulePkg/Universal/DataHubDxe/DataHub.c
index 91f7c7e..916586f 100644
--- a/IntelFrameworkModulePkg/Universal/DataHubDxe/DataHub.c
+++ b/IntelFrameworkModulePkg/Universal/DataHubDxe/DataHub.c
@@ -2,7 +2,7 @@
   This code produces the Data Hub protocol. It preloads the data hub
   with status information copied in from PEI HOBs.
   
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
 This program and the accompanying materials                          
 are licensed and made available under the terms and conditions of the BSD License         
 which accompanies this distribution.  The full text of the license may be found at        
@@ -139,7 +139,7 @@ DataHubLogData (
   for (Link = GetFirstNode(Head); Link != Head; Link = GetNextNode(Head, Link)) {
     FilterEntry = FILTER_ENTRY_FROM_LINK (Link);
     if (((FilterEntry->ClassFilter & DataRecordClass) != 0) &&
-        (CompareGuid (&FilterEntry->FilterDataRecordGuid, &gZeroGuid) || 
+        (IsZeroGuid (&FilterEntry->FilterDataRecordGuid) ||
          CompareGuid (&FilterEntry->FilterDataRecordGuid, DataRecordGuid))) {
       gBS->SignalEvent (FilterEntry->Event);
     }
diff --git a/IntelFrameworkModulePkg/Universal/DataHubDxe/DataHub.h b/IntelFrameworkModulePkg/Universal/DataHubDxe/DataHub.h
index de2e3f3..7770c43 100644
--- a/IntelFrameworkModulePkg/Universal/DataHubDxe/DataHub.h
+++ b/IntelFrameworkModulePkg/Universal/DataHubDxe/DataHub.h
@@ -2,7 +2,7 @@
   This code supports a the private implementation 
   of the Data Hub protocol
   
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
 This program and the accompanying materials                          
 are licensed and made available under the terms and conditions of the BSD License         
 which accompanies this distribution.  The full text of the license may be found at        
@@ -21,8 +21,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
 #include <Protocol/DataHub.h>
 
-#include <Guid/ZeroGuid.h>
-
 #include <Library/DebugLib.h>
 #include <Library/UefiDriverEntryPoint.h>
 #include <Library/UefiLib.h>
diff --git a/IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf b/IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf
index 834c3b3..0b93f71 100644
--- a/IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf
+++ b/IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf
@@ -21,7 +21,7 @@
 #  drivers to be aware of all reporting formats.
 #  For more information, please ref http://www.intel.com/technology/framework/
 #  
-#  Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+#  Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
 #
 #  This program and the accompanying materials
 #  are licensed and made available under the terms and conditions of the BSD License
@@ -70,10 +70,6 @@
   DebugLib
 
 
-[Guids]
-  gZeroGuid                                     ## SOMETIMES_CONSUMES   ## GUID
-
-
 [Protocols]
   gEfiDataHubProtocolGuid                       ## PRODUCES
 
-- 
1.9.5.msysgit.0



  reply	other threads:[~2016-08-30  2:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-30  2:36 [PATCH 0/3] Use IsZeroGuid API for zero GUID checking Hao Wu
2016-08-30  2:36 ` Hao Wu [this message]
2016-08-30  5:54   ` [PATCH 1/3] IntelFrameworkModulePkg: " Fan, Jeff
2016-08-30  2:36 ` [PATCH 2/3] MdeModulePkg: " Hao Wu
2016-08-30  2:43   ` Tian, Feng
2016-08-30  2:36 ` [PATCH 3/3] SecurityPkg: " Hao Wu
2016-08-30  3:21   ` Zhang, Chao B

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=1472524574-17732-2-git-send-email-hao.a.wu@intel.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