public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 0/7] Make the event empty function in UefiLib public
@ 2017-01-17  7:08 Star Zeng
  2017-01-17  7:08 ` [PATCH 1/7] MdePkg UefiLib: Make the event empty function public Star Zeng
                   ` (7 more replies)
  0 siblings, 8 replies; 17+ messages in thread
From: Star Zeng @ 2017-01-17  7:08 UTC (permalink / raw)
  To: edk2-devel
  Cc: Star Zeng, Liming Gao, Michael Kinney, Jeff Fan, Feng Tian,
	Ruiyu Ni, Maurice Ma, Prince Agyeman, Kelly Steele, Leif Lindholm,
	Ard Biesheuvel, Laszlo Ersek

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=298

We found there are many event empty functions in EDK2 code base,
these patches are to make the event empty function in UefiLib public,
then this event empty function can be used to remove
the duplication in drivers and other libraries.

In CorebootPayloadPkg/QuarkPlatformPkg/ArmPlatformPkg, EfiEventGroupSignal
from UefiLib can be used to remove the duplication of event empty function.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Prince Agyeman <prince.agyeman@intel.com>
Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Laszlo Ersek <lersek@redhat.com>

Star Zeng (7):
  MdePkg UefiLib: Make the event empty function public
  IntelFrameworkPkg UefiLib: Make the event empty function public
  MdeModulePkg: Use EfiEventEmptyFunction from UefiLib
  IntelFrameworkModulePkg: Use EfiEventEmptyFunction from UefiLib
  CorebootPayloadPkg: Use EfiEventGroupSignal from UefiLib
  QuarkPlatformPkg: Use EfiEventGroupSignal from UefiLib
  ArmPlatformPkg: Use EfiEventGroupSignal from UefiLib

 .../Library/PlatformIntelBdsLib/IntelBdsPlatform.c | 36 ++-----------------
 .../Library/PlatformIntelBdsLib/IntelBdsPlatform.h |  3 +-
 .../PlatformIntelBdsLib/PlatformIntelBdsLib.inf    |  3 +-
 .../PlatformBootManagerLib/PlatformBootManager.c   | 25 ++-----------
 .../Universal/BdsDxe/BdsEntry.c                    | 20 +----------
 .../Library/FrameworkUefiLib/UefiLib.c             | 42 +++++++++++-----------
 .../Library/FrameworkUefiLib/UefiLibInternal.h     | 20 +----------
 .../Library/FrameworkUefiLib/UefiNotTiano.c        |  4 +--
 MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c      | 23 ++----------
 MdeModulePkg/Core/Dxe/DxeMain.h                    | 18 +---------
 MdeModulePkg/Core/Dxe/Event/Event.c                |  4 +--
 MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c | 19 ++--------
 .../Universal/Console/ConSplitterDxe/ConSplitter.c | 22 ++----------
 .../Universal/Console/ConSplitterDxe/ConSplitter.h | 18 +---------
 .../Universal/DriverSampleDxe/DriverSample.c       | 20 ++---------
 .../Universal/SetupBrowserDxe/Presentation.c       | 20 ++---------
 MdePkg/Include/Library/UefiLib.h                   | 18 +++++++++-
 MdePkg/Library/UefiLib/UefiLib.c                   | 42 +++++++++++-----------
 MdePkg/Library/UefiLib/UefiLibInternal.h           | 20 +----------
 MdePkg/Library/UefiLib/UefiNotTiano.c              | 10 +++---
 .../PlatformBootManagerLib/PlatformBootManager.c   | 25 ++-----------
 21 files changed, 91 insertions(+), 321 deletions(-)

-- 
2.7.0.windows.1



^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/7] MdePkg UefiLib: Make the event empty function public
  2017-01-17  7:08 [PATCH 0/7] Make the event empty function in UefiLib public Star Zeng
@ 2017-01-17  7:08 ` Star Zeng
  2017-01-18  7:19   ` Gao, Liming
  2017-01-17  7:08 ` [PATCH 2/7] IntelFrameworkPkg " Star Zeng
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Star Zeng @ 2017-01-17  7:08 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng, Liming Gao, Michael Kinney

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=298

Then this event empty function can be used to remove
the duplication in drivers and other libraries.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
 MdePkg/Include/Library/UefiLib.h         | 18 +++++++++++++-
 MdePkg/Library/UefiLib/UefiLib.c         | 42 +++++++++++++++-----------------
 MdePkg/Library/UefiLib/UefiLibInternal.h | 20 +--------------
 MdePkg/Library/UefiLib/UefiNotTiano.c    | 10 ++++----
 4 files changed, 43 insertions(+), 47 deletions(-)

diff --git a/MdePkg/Include/Library/UefiLib.h b/MdePkg/Include/Library/UefiLib.h
index e8a6b8498e65..0b14792a0a7f 100644
--- a/MdePkg/Include/Library/UefiLib.h
+++ b/MdePkg/Include/Library/UefiLib.h
@@ -12,7 +12,7 @@
   of size reduction when compiler optimization is disabled. If MDEPKG_NDEBUG is
   defined, then debug and assert related macros wrapped by it are the NULL implementations.
 
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2017, 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 that accompanies this distribution.  
 The full text of the license may be found at
@@ -241,6 +241,22 @@ EfiEventGroupSignal (
   IN CONST EFI_GUID *EventGroup
   );
 
+/**
+  An empty function that can be used as NotifyFunction parameter of
+  CreateEvent() or CreateEventEx().
+
+  @param Event              Event whose notification function is being invoked.
+  @param Context            The pointer to the notification function's context,
+                            which is implementation-dependent.
+
+**/
+VOID
+EFIAPI
+EfiEventEmptyFunction (
+  IN EFI_EVENT              Event,
+  IN VOID                   *Context
+  );
+
 /** 
   Returns the current TPL.
 
diff --git a/MdePkg/Library/UefiLib/UefiLib.c b/MdePkg/Library/UefiLib/UefiLib.c
index 96d375fb6f2e..a7eee01240c1 100644
--- a/MdePkg/Library/UefiLib/UefiLib.c
+++ b/MdePkg/Library/UefiLib/UefiLib.c
@@ -5,7 +5,7 @@
   EFI Driver Model related protocols, manage Unicode string tables for UEFI Drivers, 
   and print messages on the console output and standard error devices.
 
-  Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2017, 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
@@ -332,7 +332,7 @@ EfiEventGroupSignal (
   Status = gBS->CreateEventEx (
                   EVT_NOTIFY_SIGNAL,
                   TPL_CALLBACK,
-                  InternalEmptyFunction,
+                  EfiEventEmptyFunction,
                   NULL,
                   EventGroup,
                   &Event
@@ -347,6 +347,24 @@ EfiEventGroupSignal (
   return Status;
 }
 
+/**
+  An empty function that can be used as NotifyFunction parameter of
+  CreateEvent() or CreateEventEx().
+
+  @param Event              Event whose notification function is being invoked.
+  @param Context            The pointer to the notification function's context,
+                            which is implementation-dependent.
+
+**/
+VOID
+EFIAPI
+EfiEventEmptyFunction (
+  IN EFI_EVENT              Event,
+  IN VOID                   *Context
+  )
+{
+}
+
 /** 
   Returns the current TPL.
 
@@ -1587,23 +1605,3 @@ GetBestLanguage (
   //
   return NULL;
 }
-
-/**
-  An empty function to pass error checking of CreateEventEx ().
-
-  This empty function ensures that EVT_NOTIFY_SIGNAL_ALL is error
-  checked correctly since it is now mapped into CreateEventEx() in UEFI 2.0.
-
-  @param  Event                 Event whose notification function is being invoked.
-  @param  Context               The pointer to the notification function's context,
-                                which is implementation-dependent.
-
-**/
-VOID
-EFIAPI
-InternalEmptyFunction (
-  IN EFI_EVENT                Event,
-  IN VOID                     *Context
-  )
-{
-}
diff --git a/MdePkg/Library/UefiLib/UefiLibInternal.h b/MdePkg/Library/UefiLib/UefiLibInternal.h
index 2311f27f1e6d..412ad1b89c9d 100644
--- a/MdePkg/Library/UefiLib/UefiLibInternal.h
+++ b/MdePkg/Library/UefiLib/UefiLibInternal.h
@@ -1,7 +1,7 @@
 /** @file
   Internal include file for UefiLib.
 
-  Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2007 - 2017, 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
@@ -41,22 +41,4 @@
 #include <Library/PrintLib.h>
 #include <Library/DevicePathLib.h>
 
-/**
-  An empty function to pass error checking of CreateEventEx ().
-
-  This empty function ensures that EVT_NOTIFY_SIGNAL_ALL is error
-  checked correctly since it is now mapped into CreateEventEx() in UEFI 2.0.
-
-  @param  Event                 Event whose notification function is being invoked.
-  @param  Context               The pointer to the notification function's context,
-                                which is implementation-dependent.
-
-**/
-VOID
-EFIAPI
-InternalEmptyFunction (
-  IN EFI_EVENT                Event,
-  IN VOID                     *Context
-  );
-
 #endif
diff --git a/MdePkg/Library/UefiLib/UefiNotTiano.c b/MdePkg/Library/UefiLib/UefiNotTiano.c
index 46fa737c0fd3..fc3a6ea74a0e 100644
--- a/MdePkg/Library/UefiLib/UefiNotTiano.c
+++ b/MdePkg/Library/UefiLib/UefiNotTiano.c
@@ -6,7 +6,7 @@
   (EDK/EFI 1.10) and new (EDK II/UEFI 2.0) way. This module is a DXE driver as
   it contains DXE enum extensions for EFI event services.
 
-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2017, 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
@@ -46,7 +46,7 @@ EfiCreateEventLegacyBoot (
 {
   return EfiCreateEventLegacyBootEx (
            TPL_CALLBACK,
-           InternalEmptyFunction,
+           EfiEventEmptyFunction,
            NULL,
            LegacyBootEvent
            );
@@ -99,7 +99,7 @@ EfiCreateEventLegacyBootEx (
       // CreateEventEx will check NotifyFunction is NULL or not and return error.
       // Use dummy routine for the case NotifyFunction is NULL.
       //
-      WorkerNotifyFunction = InternalEmptyFunction;
+      WorkerNotifyFunction = EfiEventEmptyFunction;
     } else {
       WorkerNotifyFunction = NotifyFunction;
     }
@@ -141,7 +141,7 @@ EfiCreateEventReadyToBoot (
 {
   return EfiCreateEventReadyToBootEx (
            TPL_CALLBACK,
-           InternalEmptyFunction,
+           EfiEventEmptyFunction,
            NULL,
            ReadyToBootEvent
            );
@@ -194,7 +194,7 @@ EfiCreateEventReadyToBootEx (
       // CreateEventEx will check NotifyFunction is NULL or not and return error.
       // Use dummy routine for the case NotifyFunction is NULL.
       //
-      WorkerNotifyFunction = InternalEmptyFunction;
+      WorkerNotifyFunction = EfiEventEmptyFunction;
     } else {
       WorkerNotifyFunction = NotifyFunction;
     }
-- 
2.7.0.windows.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/7] IntelFrameworkPkg UefiLib: Make the event empty function public
  2017-01-17  7:08 [PATCH 0/7] Make the event empty function in UefiLib public Star Zeng
  2017-01-17  7:08 ` [PATCH 1/7] MdePkg UefiLib: Make the event empty function public Star Zeng
@ 2017-01-17  7:08 ` Star Zeng
  2017-01-20  4:42   ` Fan, Jeff
  2017-01-17  7:08 ` [PATCH 3/7] MdeModulePkg: Use EfiEventEmptyFunction from UefiLib Star Zeng
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Star Zeng @ 2017-01-17  7:08 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng, Liming Gao, Michael D Kinney, Jeff Fan

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=298

Then this event empty function can be used to remove
the duplication in drivers and other libraries.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
 .../Library/FrameworkUefiLib/UefiLib.c             | 42 +++++++++++-----------
 .../Library/FrameworkUefiLib/UefiLibInternal.h     | 20 +----------
 .../Library/FrameworkUefiLib/UefiNotTiano.c        |  4 +--
 3 files changed, 23 insertions(+), 43 deletions(-)

diff --git a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c
index e198b729a329..30b6dc921828 100644
--- a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c
+++ b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c
@@ -5,7 +5,7 @@
   EFI Driver Model related protocols, manage Unicode string tables for UEFI Drivers, 
   and print messages on the console output and standard error devices.
 
-  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2017, 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
@@ -310,7 +310,7 @@ EfiEventGroupSignal (
   Status = gBS->CreateEventEx (
                   EVT_NOTIFY_SIGNAL,
                   TPL_CALLBACK,
-                  InternalEmptyFunction,
+                  EfiEventEmptyFunction,
                   NULL,
                   EventGroup,
                   &Event
@@ -325,6 +325,24 @@ EfiEventGroupSignal (
   return Status;
 }
 
+/**
+  An empty function that can be used as NotifyFunction parameter of
+  CreateEvent() or CreateEventEx().
+
+  @param Event              Event whose notification function is being invoked.
+  @param Context            The pointer to the notification function's context,
+                            which is implementation-dependent.
+
+**/
+VOID
+EFIAPI
+EfiEventEmptyFunction (
+  IN EFI_EVENT              Event,
+  IN VOID                   *Context
+  )
+{
+}
+
 /** 
   Returns the current TPL.
 
@@ -1457,23 +1475,3 @@ GetBestLanguage (
   //
   return NULL;
 }
-
-/**
-  An empty function to pass error checking of CreateEventEx ().
-
-  This empty function ensures that EVT_NOTIFY_SIGNAL_ALL is error
-  checked correctly since it is now mapped into CreateEventEx() in UEFI 2.0.
-
-  @param  Event                 Event whose notification function is being invoked.
-  @param  Context               Pointer to the notification function's context,
-                                which is implementation-dependent.
-
-**/
-VOID
-EFIAPI
-InternalEmptyFunction (
-  IN EFI_EVENT                Event,
-  IN VOID                     *Context
-  )
-{
-}
diff --git a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibInternal.h b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibInternal.h
index 16c663626db2..51f58176defa 100644
--- a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibInternal.h
+++ b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibInternal.h
@@ -1,7 +1,7 @@
 /** @file
   Internal include file for UefiLib.
 
-  Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2007 - 2017, 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
@@ -41,22 +41,4 @@
 #include <Library/PrintLib.h>
 #include <Library/DevicePathLib.h>
 
-/**
-  An empty function to pass error checking of CreateEventEx ().
-
-  This empty function ensures that EVT_NOTIFY_SIGNAL_ALL is error
-  checked correctly since it is now mapped into CreateEventEx() in UEFI 2.0.
-
-  @param  Event                 Event whose notification function is being invoked.
-  @param  Context               Pointer to the notification function's context,
-                                which is implementation-dependent.
-
-**/
-VOID
-EFIAPI
-InternalEmptyFunction (
-  IN EFI_EVENT                Event,
-  IN VOID                     *Context
-  );
-
 #endif
diff --git a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiNotTiano.c b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiNotTiano.c
index 1221403672f9..e641aba647bb 100644
--- a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiNotTiano.c
+++ b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiNotTiano.c
@@ -45,7 +45,7 @@ EfiCreateEventLegacyBoot (
 {
   return EfiCreateEventLegacyBootEx (
            TPL_CALLBACK,
-           InternalEmptyFunction,
+           EfiEventEmptyFunction,
            NULL,
            LegacyBootEvent
            );
@@ -135,7 +135,7 @@ EfiCreateEventReadyToBoot (
 {
   return EfiCreateEventReadyToBootEx (
            TPL_CALLBACK,
-           InternalEmptyFunction,
+           EfiEventEmptyFunction,
            NULL,
            ReadyToBootEvent
            );
-- 
2.7.0.windows.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 3/7] MdeModulePkg: Use EfiEventEmptyFunction from UefiLib
  2017-01-17  7:08 [PATCH 0/7] Make the event empty function in UefiLib public Star Zeng
  2017-01-17  7:08 ` [PATCH 1/7] MdePkg UefiLib: Make the event empty function public Star Zeng
  2017-01-17  7:08 ` [PATCH 2/7] IntelFrameworkPkg " Star Zeng
@ 2017-01-17  7:08 ` Star Zeng
  2017-01-17  7:08 ` [PATCH 4/7] IntelFrameworkModulePkg: " Star Zeng
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 17+ messages in thread
From: Star Zeng @ 2017-01-17  7:08 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng, Feng Tian, Ruiyu Ni, Liming Gao, Michael Kinney

Use EfiEventEmptyFunction from UefiLib and remove the duplication
of event empty function.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=298

Cc: Feng Tian <feng.tian@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
 MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c      | 23 ++--------------------
 MdeModulePkg/Core/Dxe/DxeMain.h                    | 18 +----------------
 MdeModulePkg/Core/Dxe/Event/Event.c                |  4 ++--
 MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c | 19 ++----------------
 .../Universal/Console/ConSplitterDxe/ConSplitter.c | 22 ++-------------------
 .../Universal/Console/ConSplitterDxe/ConSplitter.h | 18 +----------------
 .../Universal/DriverSampleDxe/DriverSample.c       | 20 ++-----------------
 .../Universal/SetupBrowserDxe/Presentation.c       | 20 ++-----------------
 8 files changed, 14 insertions(+), 130 deletions(-)

diff --git a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
index 69c3b11c6afc..5686d94e6a72 100644
--- a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
+++ b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
@@ -26,7 +26,7 @@
   Depex - Dependency Expresion.
   SOR   - Schedule On Request - Don't schedule if this bit is set.
 
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2017, 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
@@ -392,25 +392,6 @@ CoreTrust (
   return EFI_NOT_FOUND;
 }
 
-
-/**
-  An empty function to pass error checking of CreateEventEx ().
-
-  @param  Event                 Event whose notification function is being invoked.
-  @param  Context               Pointer to the notification function's context,
-                                which is implementation-dependent.
-
-**/
-VOID
-EFIAPI
-CoreEmptyCallbackFunction (
-  IN EFI_EVENT                Event,
-  IN VOID                     *Context
-  )
-{
-  return;
-}
-
 /**
   This is the main Dispatcher for DXE and it exits when there are no more
   drivers to run. Drain the mScheduledQueue and load and start a PE
@@ -451,7 +432,7 @@ CoreDispatcher (
   Status = CoreCreateEventEx (
              EVT_NOTIFY_SIGNAL,
              TPL_NOTIFY,
-             CoreEmptyCallbackFunction,
+             EfiEventEmptyFunction,
              NULL,
              &gEfiEventDxeDispatchGuid,
              &DxeDispatchEvent
diff --git a/MdeModulePkg/Core/Dxe/DxeMain.h b/MdeModulePkg/Core/Dxe/DxeMain.h
index 327d23a95234..ae35fbb5664e 100644
--- a/MdeModulePkg/Core/Dxe/DxeMain.h
+++ b/MdeModulePkg/Core/Dxe/DxeMain.h
@@ -2,7 +2,7 @@
   The internal header file includes the common header files, defines
   internal structure and functions used by DxeCore module.
 
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2017, 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
@@ -2675,22 +2675,6 @@ CoreReleaseLock (
   IN EFI_LOCK  *Lock
   );
 
-
-/**
-  An empty function to pass error checking of CreateEventEx ().
-
-  @param  Event                 Event whose notification function is being invoked.
-  @param  Context               Pointer to the notification function's context,
-                                which is implementation-dependent.
-
-**/
-VOID
-EFIAPI
-CoreEmptyCallbackFunction (
-  IN EFI_EVENT                Event,
-  IN VOID                     *Context
-  );
-
 /**
   Read data from Firmware Block by FVB protocol Read. 
   The data may cross the multi block ranges.
diff --git a/MdeModulePkg/Core/Dxe/Event/Event.c b/MdeModulePkg/Core/Dxe/Event/Event.c
index 01715ec3ca7d..86ca369d56ff 100644
--- a/MdeModulePkg/Core/Dxe/Event/Event.c
+++ b/MdeModulePkg/Core/Dxe/Event/Event.c
@@ -1,7 +1,7 @@
 /** @file
   UEFI Event support functions implemented in this file.
 
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
 (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
 This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD License
@@ -143,7 +143,7 @@ CoreInitializeEventServices (
   CoreCreateEventEx (
     EVT_NOTIFY_SIGNAL,
     TPL_NOTIFY,
-    CoreEmptyCallbackFunction,
+    EfiEventEmptyFunction,
     NULL,
     &gIdleLoopEventGuid,
     &gIdleLoopEvent
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c b/MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c
index 35131a94f61d..0f2e677c8a6b 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c
@@ -1,7 +1,7 @@
 /** @file
   Hotkey library functions.
 
-Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
 This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD License
@@ -221,21 +221,6 @@ BmGetKeyOptions (
 }
 
 /**
-  Callback function for event.
-  
-  @param    Event          Event for this callback function.
-  @param    Context        Context pass to this function.
-**/
-VOID
-EFIAPI
-BmEmptyFunction (
-  IN EFI_EVENT                Event,
-  IN VOID                     *Context
-  )
-{
-}
-
-/**
   Check whether the bit is set in the value.
 
   @param   Value            The value need to be check.
@@ -901,7 +886,7 @@ EfiBootManagerStartHotkeyService (
   Status = gBS->CreateEvent (
                   EVT_NOTIFY_WAIT,
                   TPL_CALLBACK,
-                  BmEmptyFunction,
+                  EfiEventEmptyFunction,
                   NULL,
                   &mBmHotkeyTriggered
                   );
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
index 7ef141facf36..1ecc8accc76c 100644
--- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
+++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
@@ -16,7 +16,7 @@
   never removed. Such design ensures sytem function well during none console
   device situation.
 
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
 This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD License
@@ -711,7 +711,7 @@ ConSplitterTextInConstructor (
   Status = gBS->CreateEventEx (
                   EVT_NOTIFY_SIGNAL,
                   TPL_CALLBACK,
-                  ConSplitterEmptyCallbackFunction,
+                  EfiEventEmptyFunction,
                   NULL,
                   &gConnectConInEventGuid,
                   &ConInPrivate->ConnectConInEvent
@@ -4982,21 +4982,3 @@ ConSplitterTextOutEnableCursor (
 
   return ReturnStatus;
 }
-
-
-/**
-  An empty function to pass error checking of CreateEventEx ().
-
-  @param  Event                 Event whose notification function is being invoked.
-  @param  Context               Pointer to the notification function's context,
-                                which is implementation-dependent.
-
-**/
-VOID
-EFIAPI
-ConSplitterEmptyCallbackFunction (
-  IN EFI_EVENT                Event,
-  IN VOID                     *Context
-  )
-{
-}
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h
index e6ef40d00c23..eeea06186ffb 100644
--- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h
+++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h
@@ -1,7 +1,7 @@
 /** @file
   Private data structures for the Console Splitter driver
 
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2017, 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
@@ -1996,20 +1996,4 @@ TextOutSetMode (
   IN  UINTN                           ModeNumber
   );
 
-/**
-  An empty function to pass error checking of CreateEventEx ().
-
-  @param  Event                 Event whose notification function is being invoked.
-  @param  Context               Pointer to the notification function's context,
-                                which is implementation-dependent.
-
-**/
-VOID
-EFIAPI
-ConSplitterEmptyCallbackFunction (
-  IN EFI_EVENT                Event,
-  IN VOID                     *Context
-  );
-
-
 #endif
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
index 1b58a8d71864..67a40b7d636c 100644
--- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
+++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
@@ -2,7 +2,7 @@
 This is an example of how a driver might export data to the HII protocol to be
 later utilized by the Setup Protocol
 
-Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2017, 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
@@ -111,22 +111,6 @@ SetArrayData (
 }
 
 /**
-  Add empty function for event process function.
-
-  @param Event    The Event need to be process
-  @param Context  The context of the event.
-
-**/
-VOID
-EFIAPI
-DriverSampleInternalEmptyFunction (
-  IN  EFI_EVENT Event,
-  IN  VOID      *Context
-  )
-{
-}
-
-/**
   Notification function for keystrokes.
 
   @param[in] KeyData    The key that was pressed.
@@ -1972,7 +1956,7 @@ DriverSampleInit (
   Status = gBS->CreateEventEx (
         EVT_NOTIFY_SIGNAL, 
         TPL_NOTIFY,
-        DriverSampleInternalEmptyFunction,
+        EfiEventEmptyFunction,
         NULL,
         &gEfiIfrRefreshIdOpGuid,
         &mEvent
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
index aa0bd229cebd..08d46cf55423 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
@@ -1,7 +1,7 @@
 /** @file
 Utility functions for UI presentation.
 
-Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
 (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
 This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD License
@@ -71,22 +71,6 @@ EvaluateFormExpressions (
 }
 
 /**
-  Add empty function for event process function.
-
-  @param Event    The Event need to be process
-  @param Context  The context of the event.
-
-**/
-VOID
-EFIAPI
-SetupBrowserEmptyFunction (
-  IN  EFI_EVENT    Event,
-  IN  VOID         *Context
-  )
-{
-}
-
-/**
   Base on the opcode buffer info to get the display statement.
 
   @param OpCode    The input opcode buffer for this statement.
@@ -718,7 +702,7 @@ InitializeDisplayFormData (
   Status = gBS->CreateEvent (
         EVT_NOTIFY_WAIT, 
         TPL_CALLBACK,
-        SetupBrowserEmptyFunction,
+        EfiEventEmptyFunction,
         NULL,
         &mValueChangedEvent
         );
-- 
2.7.0.windows.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 4/7] IntelFrameworkModulePkg: Use EfiEventEmptyFunction from UefiLib
  2017-01-17  7:08 [PATCH 0/7] Make the event empty function in UefiLib public Star Zeng
                   ` (2 preceding siblings ...)
  2017-01-17  7:08 ` [PATCH 3/7] MdeModulePkg: Use EfiEventEmptyFunction from UefiLib Star Zeng
@ 2017-01-17  7:08 ` Star Zeng
  2017-01-20  4:42   ` Fan, Jeff
  2017-01-17  7:08 ` [PATCH 5/7] CorebootPayloadPkg: Use EfiEventGroupSignal " Star Zeng
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Star Zeng @ 2017-01-17  7:08 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng, Jeff Fan, Ruiyu Ni, Liming Gao, Michael Kinney

Use EfiEventEmptyFunction from UefiLib and remove the duplication
of event empty function.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=298

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
 IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c
index bf81de40a31d..8a64f041426a 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c
@@ -83,24 +83,6 @@ BdsInitialize (
   return Status;
 }
 
-
-/**
-  An empty function to pass error checking of CreateEventEx ().
-
-  @param  Event                 Event whose notification function is being invoked.
-  @param  Context               Pointer to the notification function's context,
-                                which is implementation-dependent.
-
-**/
-VOID
-EFIAPI
-BdsEmptyCallbackFunction (
-  IN EFI_EVENT                Event,
-  IN VOID                     *Context
-  )
-{
-}
-
 /**
 
   This function attempts to boot for the boot order specified
@@ -144,7 +126,7 @@ BdsBootDeviceSelect (
     Status = gBS->CreateEventEx (
                     EVT_NOTIFY_SIGNAL,
                     TPL_CALLBACK,
-                    BdsEmptyCallbackFunction,
+                    EfiEventEmptyFunction,
                     NULL,
                     &gConnectConInEventGuid,
                     &ConnectConInEvent
-- 
2.7.0.windows.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 5/7] CorebootPayloadPkg: Use EfiEventGroupSignal from UefiLib
  2017-01-17  7:08 [PATCH 0/7] Make the event empty function in UefiLib public Star Zeng
                   ` (3 preceding siblings ...)
  2017-01-17  7:08 ` [PATCH 4/7] IntelFrameworkModulePkg: " Star Zeng
@ 2017-01-17  7:08 ` Star Zeng
  2017-01-20  4:12   ` Ma, Maurice
  2017-01-17  7:08 ` [PATCH 6/7] QuarkPlatformPkg: " Star Zeng
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Star Zeng @ 2017-01-17  7:08 UTC (permalink / raw)
  To: edk2-devel
  Cc: Star Zeng, Maurice Ma, Prince Agyeman, Liming Gao, Michael Kinney

Use EfiEventGroupSignal from UefiLib and remove
InternalBdsEmptyCallbackFuntion.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=298

Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Prince Agyeman <prince.agyeman@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
 .../PlatformBootManagerLib/PlatformBootManager.c   | 25 ++--------------------
 1 file changed, 2 insertions(+), 23 deletions(-)

diff --git a/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c b/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
index 56be30f7a041..7e92441da11f 100644
--- a/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
+++ b/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
@@ -2,7 +2,7 @@
   This file include all platform action which can be customized
   by IBV/OEM.
 
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2017, 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
@@ -17,16 +17,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include "PlatformConsole.h"
 
 VOID
-EFIAPI
-InternalBdsEmptyCallbackFuntion (
-  IN EFI_EVENT                Event,
-  IN VOID                     *Context
-  )
-{
-  return;
-}
-
-VOID
 InstallReadyToLock (
   VOID
   )
@@ -34,24 +24,13 @@ InstallReadyToLock (
   EFI_STATUS                            Status;
   EFI_HANDLE                            Handle;
   EFI_SMM_ACCESS2_PROTOCOL              *SmmAccess;
-  EFI_EVENT                             EndOfDxeEvent;
 
   DEBUG((DEBUG_INFO,"InstallReadyToLock  entering......\n"));
   //
   // Inform the SMM infrastructure that we're entering BDS and may run 3rd party code hereafter
   // Since PI1.2.1, we need signal EndOfDxe as ExitPmAuth
   //
-  Status = gBS->CreateEventEx (
-                  EVT_NOTIFY_SIGNAL,
-                  TPL_CALLBACK,
-                  InternalBdsEmptyCallbackFuntion,
-                  NULL,
-                  &gEfiEndOfDxeEventGroupGuid,
-                  &EndOfDxeEvent
-                  );
-  ASSERT_EFI_ERROR (Status);
-  gBS->SignalEvent (EndOfDxeEvent);
-  gBS->CloseEvent (EndOfDxeEvent);
+  EfiEventGroupSignal (&gEfiEndOfDxeEventGroupGuid);
   DEBUG((DEBUG_INFO,"All EndOfDxe callbacks have returned successfully\n"));
 
   //
-- 
2.7.0.windows.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 6/7] QuarkPlatformPkg: Use EfiEventGroupSignal from UefiLib
  2017-01-17  7:08 [PATCH 0/7] Make the event empty function in UefiLib public Star Zeng
                   ` (4 preceding siblings ...)
  2017-01-17  7:08 ` [PATCH 5/7] CorebootPayloadPkg: Use EfiEventGroupSignal " Star Zeng
@ 2017-01-17  7:08 ` Star Zeng
  2017-01-17  7:08 ` [PATCH 7/7] ArmPlatformPkg: " Star Zeng
  2017-01-19 10:27 ` [PATCH 0/7] Make the event empty function in UefiLib public Zeng, Star
  7 siblings, 0 replies; 17+ messages in thread
From: Star Zeng @ 2017-01-17  7:08 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng, Kelly Steele, Liming Gao, Michael Kinney

Use EfiEventGroupSignal from UefiLib and remove
InternalBdsEmptyCallbackFuntion.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=298

Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
 .../PlatformBootManagerLib/PlatformBootManager.c   | 25 ++--------------------
 1 file changed, 2 insertions(+), 23 deletions(-)

diff --git a/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c b/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
index b61eb03360a2..49aa15c11f15 100644
--- a/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
+++ b/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
@@ -2,7 +2,7 @@
 This file include all platform action which can be customized
 by IBV/OEM.
 
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2017, 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
@@ -176,16 +176,6 @@ PlatformRegisterFvBootOption (
   }
 }
 
-VOID
-EFIAPI
-InternalBdsEmptyCallbackFuntion (
-  IN EFI_EVENT  Event,
-  IN VOID       *Context
-  )
-{
-  return;
-}
-
 /**
   Do the platform specific action before the console is connected.
 
@@ -209,7 +199,6 @@ PlatformBootManagerBeforeConsole (
   EFI_BOOT_MODE                 BootMode;
   EFI_ACPI_S3_SAVE_PROTOCOL     *AcpiS3Save;
   EFI_HANDLE                    Handle;
-  EFI_EVENT                     EndOfDxeEvent;
 
   //
   // Update the console variables.
@@ -294,17 +283,7 @@ PlatformBootManagerBeforeConsole (
   // Inform PI SMM drivers that BDS may run 3rd party code
   // Create and signal End of DXE event group
   //
-  Status = gBS->CreateEventEx (
-                  EVT_NOTIFY_SIGNAL,
-                  TPL_CALLBACK,
-                  InternalBdsEmptyCallbackFuntion,
-                  NULL,
-                  &gEfiEndOfDxeEventGroupGuid,
-                  &EndOfDxeEvent
-                  );
-  ASSERT_EFI_ERROR (Status);
-  gBS->SignalEvent (EndOfDxeEvent);
-  gBS->CloseEvent (EndOfDxeEvent);
+  EfiEventGroupSignal (&gEfiEndOfDxeEventGroupGuid);
 
   DEBUG((EFI_D_INFO,"All EndOfDxe callbacks have returned successfully\n"));
 
-- 
2.7.0.windows.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 7/7] ArmPlatformPkg: Use EfiEventGroupSignal from UefiLib
  2017-01-17  7:08 [PATCH 0/7] Make the event empty function in UefiLib public Star Zeng
                   ` (5 preceding siblings ...)
  2017-01-17  7:08 ` [PATCH 6/7] QuarkPlatformPkg: " Star Zeng
@ 2017-01-17  7:08 ` Star Zeng
  2017-01-17  9:33   ` Ard Biesheuvel
  2017-01-19 10:27 ` [PATCH 0/7] Make the event empty function in UefiLib public Zeng, Star
  7 siblings, 1 reply; 17+ messages in thread
From: Star Zeng @ 2017-01-17  7:08 UTC (permalink / raw)
  To: edk2-devel
  Cc: Star Zeng, Leif Lindholm, Ard Biesheuvel, Liming Gao,
	Michael Kinney

Use EfiEventGroupSignal from UefiLib and remove
EmptyCallbackFunction.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=298

Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
 .../Library/PlatformIntelBdsLib/IntelBdsPlatform.c | 36 ++--------------------
 .../Library/PlatformIntelBdsLib/IntelBdsPlatform.h |  3 +-
 .../PlatformIntelBdsLib/PlatformIntelBdsLib.inf    |  3 +-
 3 files changed, 6 insertions(+), 36 deletions(-)

diff --git a/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c b/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
index ceb4f076e2a6..885866854329 100644
--- a/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
+++ b/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
@@ -1,6 +1,6 @@
 /** @file
 
-Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
 Copyright (c) 2014, ARM Ltd. All rights reserved.<BR>
 
 This program and the accompanying materials
@@ -31,24 +31,6 @@ PlatformIntelBdsConstructor (
   return EFI_SUCCESS;
 }
 
-/**
-  An empty function to pass error checking of CreateEventEx ().
-
-  @param  Event                 Event whose notification function is being invoked.
-  @param  Context               Pointer to the notification function's context,
-                                which is implementation-dependent.
-
-**/
-STATIC
-VOID
-EFIAPI
-EmptyCallbackFunction (
-  IN EFI_EVENT                Event,
-  IN VOID                     *Context
-  )
-{
-}
-
 //
 // BDS Platform Functions
 //
@@ -63,24 +45,10 @@ PlatformBdsInit (
   VOID
   )
 {
-  EFI_EVENT           EndOfDxeEvent;
-  EFI_STATUS          Status;
-
   //
   // Signal EndOfDxe PI Event
   //
-  Status = gBS->CreateEventEx (
-                  EVT_NOTIFY_SIGNAL,
-                  TPL_CALLBACK,
-                  EmptyCallbackFunction,
-                  NULL,
-                  &gEfiEndOfDxeEventGroupGuid,
-                  &EndOfDxeEvent
-                  );
-  if (!EFI_ERROR (Status)) {
-    gBS->SignalEvent (EndOfDxeEvent);
-    gBS->CloseEvent (EndOfDxeEvent);
-  }
+  EfiEventGroupSignal (&gEfiEndOfDxeEventGroupGuid);
 }
 
 STATIC
diff --git a/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h b/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h
index da428288fb9f..1329c54a1c3a 100644
--- a/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h
+++ b/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h
@@ -1,7 +1,7 @@
 /** @file
   Head file for BDS Platform specific code
 
-Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2017, 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
@@ -28,6 +28,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/PcdLib.h>
 #include <Library/GenericBdsLib.h>
 #include <Library/PlatformBdsLib.h>
+#include <Library/UefiLib.h>
 
 #include <Guid/GlobalVariable.h>
 #include <Guid/EventGroup.h>
diff --git a/ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf b/ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf
index daa0d91a2f76..a27adacbc1c2 100644
--- a/ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf
+++ b/ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf
@@ -2,7 +2,7 @@
 #  Implementation for PlatformBdsLib library class interfaces.
 #  using ARM Platform framework.
 #
-#  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
+#  Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
 #  Copyright (c) 2014, ARM Ltd. All rights reserved.<BR>
 #
 #  This program and the accompanying materials
@@ -50,6 +50,7 @@ [LibraryClasses]
   UefiBootServicesTableLib
   PcdLib
   GenericBdsLib
+  UefiLib
 
 [Guids]
   gEfiEndOfDxeEventGroupGuid
-- 
2.7.0.windows.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 7/7] ArmPlatformPkg: Use EfiEventGroupSignal from UefiLib
  2017-01-17  7:08 ` [PATCH 7/7] ArmPlatformPkg: " Star Zeng
@ 2017-01-17  9:33   ` Ard Biesheuvel
  0 siblings, 0 replies; 17+ messages in thread
From: Ard Biesheuvel @ 2017-01-17  9:33 UTC (permalink / raw)
  To: Star Zeng
  Cc: edk2-devel@lists.01.org, Leif Lindholm, Liming Gao,
	Michael Kinney

On 17 January 2017 at 07:08, Star Zeng <star.zeng@intel.com> wrote:
> Use EfiEventGroupSignal from UefiLib and remove
> EmptyCallbackFunction.
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=298
>
> Cc: Leif Lindholm <leif.lindholm@linaro.org>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Michael Kinney <michael.d.kinney@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Star Zeng <star.zeng@intel.com>

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---
>  .../Library/PlatformIntelBdsLib/IntelBdsPlatform.c | 36 ++--------------------
>  .../Library/PlatformIntelBdsLib/IntelBdsPlatform.h |  3 +-
>  .../PlatformIntelBdsLib/PlatformIntelBdsLib.inf    |  3 +-
>  3 files changed, 6 insertions(+), 36 deletions(-)
>
> diff --git a/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c b/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
> index ceb4f076e2a6..885866854329 100644
> --- a/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
> +++ b/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
> @@ -1,6 +1,6 @@
>  /** @file
>
> -Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
>  Copyright (c) 2014, ARM Ltd. All rights reserved.<BR>
>
>  This program and the accompanying materials
> @@ -31,24 +31,6 @@ PlatformIntelBdsConstructor (
>    return EFI_SUCCESS;
>  }
>
> -/**
> -  An empty function to pass error checking of CreateEventEx ().
> -
> -  @param  Event                 Event whose notification function is being invoked.
> -  @param  Context               Pointer to the notification function's context,
> -                                which is implementation-dependent.
> -
> -**/
> -STATIC
> -VOID
> -EFIAPI
> -EmptyCallbackFunction (
> -  IN EFI_EVENT                Event,
> -  IN VOID                     *Context
> -  )
> -{
> -}
> -
>  //
>  // BDS Platform Functions
>  //
> @@ -63,24 +45,10 @@ PlatformBdsInit (
>    VOID
>    )
>  {
> -  EFI_EVENT           EndOfDxeEvent;
> -  EFI_STATUS          Status;
> -
>    //
>    // Signal EndOfDxe PI Event
>    //
> -  Status = gBS->CreateEventEx (
> -                  EVT_NOTIFY_SIGNAL,
> -                  TPL_CALLBACK,
> -                  EmptyCallbackFunction,
> -                  NULL,
> -                  &gEfiEndOfDxeEventGroupGuid,
> -                  &EndOfDxeEvent
> -                  );
> -  if (!EFI_ERROR (Status)) {
> -    gBS->SignalEvent (EndOfDxeEvent);
> -    gBS->CloseEvent (EndOfDxeEvent);
> -  }
> +  EfiEventGroupSignal (&gEfiEndOfDxeEventGroupGuid);
>  }
>
>  STATIC
> diff --git a/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h b/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h
> index da428288fb9f..1329c54a1c3a 100644
> --- a/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h
> +++ b/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h
> @@ -1,7 +1,7 @@
>  /** @file
>    Head file for BDS Platform specific code
>
> -Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2004 - 2017, 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
> @@ -28,6 +28,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
>  #include <Library/PcdLib.h>
>  #include <Library/GenericBdsLib.h>
>  #include <Library/PlatformBdsLib.h>
> +#include <Library/UefiLib.h>
>
>  #include <Guid/GlobalVariable.h>
>  #include <Guid/EventGroup.h>
> diff --git a/ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf b/ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf
> index daa0d91a2f76..a27adacbc1c2 100644
> --- a/ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf
> +++ b/ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf
> @@ -2,7 +2,7 @@
>  #  Implementation for PlatformBdsLib library class interfaces.
>  #  using ARM Platform framework.
>  #
> -#  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
> +#  Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
>  #  Copyright (c) 2014, ARM Ltd. All rights reserved.<BR>
>  #
>  #  This program and the accompanying materials
> @@ -50,6 +50,7 @@ [LibraryClasses]
>    UefiBootServicesTableLib
>    PcdLib
>    GenericBdsLib
> +  UefiLib
>
>  [Guids]
>    gEfiEndOfDxeEventGroupGuid
> --
> 2.7.0.windows.1
>


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/7] MdePkg UefiLib: Make the event empty function public
  2017-01-17  7:08 ` [PATCH 1/7] MdePkg UefiLib: Make the event empty function public Star Zeng
@ 2017-01-18  7:19   ` Gao, Liming
  0 siblings, 0 replies; 17+ messages in thread
From: Gao, Liming @ 2017-01-18  7:19 UTC (permalink / raw)
  To: Zeng, Star, edk2-devel@lists.01.org; +Cc: Kinney, Michael D

Reviewed-by: Liming Gao <liming.gao@intel.com>

-----Original Message-----
From: Zeng, Star 
Sent: Tuesday, January 17, 2017 3:09 PM
To: edk2-devel@lists.01.org
Cc: Zeng, Star <star.zeng@intel.com>; Gao, Liming <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>
Subject: [PATCH 1/7] MdePkg UefiLib: Make the event empty function public

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=298

Then this event empty function can be used to remove
the duplication in drivers and other libraries.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
 MdePkg/Include/Library/UefiLib.h         | 18 +++++++++++++-
 MdePkg/Library/UefiLib/UefiLib.c         | 42 +++++++++++++++-----------------
 MdePkg/Library/UefiLib/UefiLibInternal.h | 20 +--------------
 MdePkg/Library/UefiLib/UefiNotTiano.c    | 10 ++++----
 4 files changed, 43 insertions(+), 47 deletions(-)

diff --git a/MdePkg/Include/Library/UefiLib.h b/MdePkg/Include/Library/UefiLib.h
index e8a6b8498e65..0b14792a0a7f 100644
--- a/MdePkg/Include/Library/UefiLib.h
+++ b/MdePkg/Include/Library/UefiLib.h
@@ -12,7 +12,7 @@
   of size reduction when compiler optimization is disabled. If MDEPKG_NDEBUG is
   defined, then debug and assert related macros wrapped by it are the NULL implementations.
 
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2017, 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 that accompanies this distribution.  
 The full text of the license may be found at
@@ -241,6 +241,22 @@ EfiEventGroupSignal (
   IN CONST EFI_GUID *EventGroup
   );
 
+/**
+  An empty function that can be used as NotifyFunction parameter of
+  CreateEvent() or CreateEventEx().
+
+  @param Event              Event whose notification function is being invoked.
+  @param Context            The pointer to the notification function's context,
+                            which is implementation-dependent.
+
+**/
+VOID
+EFIAPI
+EfiEventEmptyFunction (
+  IN EFI_EVENT              Event,
+  IN VOID                   *Context
+  );
+
 /** 
   Returns the current TPL.
 
diff --git a/MdePkg/Library/UefiLib/UefiLib.c b/MdePkg/Library/UefiLib/UefiLib.c
index 96d375fb6f2e..a7eee01240c1 100644
--- a/MdePkg/Library/UefiLib/UefiLib.c
+++ b/MdePkg/Library/UefiLib/UefiLib.c
@@ -5,7 +5,7 @@
   EFI Driver Model related protocols, manage Unicode string tables for UEFI Drivers, 
   and print messages on the console output and standard error devices.
 
-  Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2017, 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
@@ -332,7 +332,7 @@ EfiEventGroupSignal (
   Status = gBS->CreateEventEx (
                   EVT_NOTIFY_SIGNAL,
                   TPL_CALLBACK,
-                  InternalEmptyFunction,
+                  EfiEventEmptyFunction,
                   NULL,
                   EventGroup,
                   &Event
@@ -347,6 +347,24 @@ EfiEventGroupSignal (
   return Status;
 }
 
+/**
+  An empty function that can be used as NotifyFunction parameter of
+  CreateEvent() or CreateEventEx().
+
+  @param Event              Event whose notification function is being invoked.
+  @param Context            The pointer to the notification function's context,
+                            which is implementation-dependent.
+
+**/
+VOID
+EFIAPI
+EfiEventEmptyFunction (
+  IN EFI_EVENT              Event,
+  IN VOID                   *Context
+  )
+{
+}
+
 /** 
   Returns the current TPL.
 
@@ -1587,23 +1605,3 @@ GetBestLanguage (
   //
   return NULL;
 }
-
-/**
-  An empty function to pass error checking of CreateEventEx ().
-
-  This empty function ensures that EVT_NOTIFY_SIGNAL_ALL is error
-  checked correctly since it is now mapped into CreateEventEx() in UEFI 2.0.
-
-  @param  Event                 Event whose notification function is being invoked.
-  @param  Context               The pointer to the notification function's context,
-                                which is implementation-dependent.
-
-**/
-VOID
-EFIAPI
-InternalEmptyFunction (
-  IN EFI_EVENT                Event,
-  IN VOID                     *Context
-  )
-{
-}
diff --git a/MdePkg/Library/UefiLib/UefiLibInternal.h b/MdePkg/Library/UefiLib/UefiLibInternal.h
index 2311f27f1e6d..412ad1b89c9d 100644
--- a/MdePkg/Library/UefiLib/UefiLibInternal.h
+++ b/MdePkg/Library/UefiLib/UefiLibInternal.h
@@ -1,7 +1,7 @@
 /** @file
   Internal include file for UefiLib.
 
-  Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2007 - 2017, 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
@@ -41,22 +41,4 @@
 #include <Library/PrintLib.h>
 #include <Library/DevicePathLib.h>
 
-/**
-  An empty function to pass error checking of CreateEventEx ().
-
-  This empty function ensures that EVT_NOTIFY_SIGNAL_ALL is error
-  checked correctly since it is now mapped into CreateEventEx() in UEFI 2.0.
-
-  @param  Event                 Event whose notification function is being invoked.
-  @param  Context               The pointer to the notification function's context,
-                                which is implementation-dependent.
-
-**/
-VOID
-EFIAPI
-InternalEmptyFunction (
-  IN EFI_EVENT                Event,
-  IN VOID                     *Context
-  );
-
 #endif
diff --git a/MdePkg/Library/UefiLib/UefiNotTiano.c b/MdePkg/Library/UefiLib/UefiNotTiano.c
index 46fa737c0fd3..fc3a6ea74a0e 100644
--- a/MdePkg/Library/UefiLib/UefiNotTiano.c
+++ b/MdePkg/Library/UefiLib/UefiNotTiano.c
@@ -6,7 +6,7 @@
   (EDK/EFI 1.10) and new (EDK II/UEFI 2.0) way. This module is a DXE driver as
   it contains DXE enum extensions for EFI event services.
 
-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2017, 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
@@ -46,7 +46,7 @@ EfiCreateEventLegacyBoot (
 {
   return EfiCreateEventLegacyBootEx (
            TPL_CALLBACK,
-           InternalEmptyFunction,
+           EfiEventEmptyFunction,
            NULL,
            LegacyBootEvent
            );
@@ -99,7 +99,7 @@ EfiCreateEventLegacyBootEx (
       // CreateEventEx will check NotifyFunction is NULL or not and return error.
       // Use dummy routine for the case NotifyFunction is NULL.
       //
-      WorkerNotifyFunction = InternalEmptyFunction;
+      WorkerNotifyFunction = EfiEventEmptyFunction;
     } else {
       WorkerNotifyFunction = NotifyFunction;
     }
@@ -141,7 +141,7 @@ EfiCreateEventReadyToBoot (
 {
   return EfiCreateEventReadyToBootEx (
            TPL_CALLBACK,
-           InternalEmptyFunction,
+           EfiEventEmptyFunction,
            NULL,
            ReadyToBootEvent
            );
@@ -194,7 +194,7 @@ EfiCreateEventReadyToBootEx (
       // CreateEventEx will check NotifyFunction is NULL or not and return error.
       // Use dummy routine for the case NotifyFunction is NULL.
       //
-      WorkerNotifyFunction = InternalEmptyFunction;
+      WorkerNotifyFunction = EfiEventEmptyFunction;
     } else {
       WorkerNotifyFunction = NotifyFunction;
     }
-- 
2.7.0.windows.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/7] Make the event empty function in UefiLib public
  2017-01-17  7:08 [PATCH 0/7] Make the event empty function in UefiLib public Star Zeng
                   ` (6 preceding siblings ...)
  2017-01-17  7:08 ` [PATCH 7/7] ArmPlatformPkg: " Star Zeng
@ 2017-01-19 10:27 ` Zeng, Star
  2017-01-19 10:30   ` Laszlo Ersek
  7 siblings, 1 reply; 17+ messages in thread
From: Zeng, Star @ 2017-01-19 10:27 UTC (permalink / raw)
  To: edk2-devel@lists.01.org, Kinney, Michael D, Fan, Jeff, Tian, Feng,
	Ni, Ruiyu, Ma, Maurice, Agyeman, Prince, Steele, Kelly,
	Leif Lindholm
  Cc: Gao, Liming, Ard Biesheuvel, Laszlo Ersek, Zeng, Star

Hi,

Please kindly help take a review to the patches. :)

So far, I have got the RB from Liming and Ard to MdePkg and ArmPlatformPkg.

Thanks,
Star
-----Original Message-----
From: Zeng, Star 
Sent: Tuesday, January 17, 2017 3:09 PM
To: edk2-devel@lists.01.org
Cc: Zeng, Star <star.zeng@intel.com>; Gao, Liming <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Fan, Jeff <jeff.fan@intel.com>; Tian, Feng <feng.tian@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com>; Ma, Maurice <maurice.ma@intel.com>; Agyeman, Prince <prince.agyeman@intel.com>; Steele, Kelly <kelly.steele@intel.com>; Leif Lindholm <leif.lindholm@linaro.org>; Ard Biesheuvel <ard.biesheuvel@linaro.org>; Laszlo Ersek <lersek@redhat.com>
Subject: [PATCH 0/7] Make the event empty function in UefiLib public

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=298

We found there are many event empty functions in EDK2 code base, these patches are to make the event empty function in UefiLib public, then this event empty function can be used to remove the duplication in drivers and other libraries.

In CorebootPayloadPkg/QuarkPlatformPkg/ArmPlatformPkg, EfiEventGroupSignal from UefiLib can be used to remove the duplication of event empty function.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Prince Agyeman <prince.agyeman@intel.com>
Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Laszlo Ersek <lersek@redhat.com>

Star Zeng (7):
  MdePkg UefiLib: Make the event empty function public
  IntelFrameworkPkg UefiLib: Make the event empty function public
  MdeModulePkg: Use EfiEventEmptyFunction from UefiLib
  IntelFrameworkModulePkg: Use EfiEventEmptyFunction from UefiLib
  CorebootPayloadPkg: Use EfiEventGroupSignal from UefiLib
  QuarkPlatformPkg: Use EfiEventGroupSignal from UefiLib
  ArmPlatformPkg: Use EfiEventGroupSignal from UefiLib

 .../Library/PlatformIntelBdsLib/IntelBdsPlatform.c | 36 ++-----------------  .../Library/PlatformIntelBdsLib/IntelBdsPlatform.h |  3 +-
 .../PlatformIntelBdsLib/PlatformIntelBdsLib.inf    |  3 +-
 .../PlatformBootManagerLib/PlatformBootManager.c   | 25 ++-----------
 .../Universal/BdsDxe/BdsEntry.c                    | 20 +----------
 .../Library/FrameworkUefiLib/UefiLib.c             | 42 +++++++++++-----------
 .../Library/FrameworkUefiLib/UefiLibInternal.h     | 20 +----------
 .../Library/FrameworkUefiLib/UefiNotTiano.c        |  4 +--
 MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c      | 23 ++----------
 MdeModulePkg/Core/Dxe/DxeMain.h                    | 18 +---------
 MdeModulePkg/Core/Dxe/Event/Event.c                |  4 +--
 MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c | 19 ++--------  .../Universal/Console/ConSplitterDxe/ConSplitter.c | 22 ++----------  .../Universal/Console/ConSplitterDxe/ConSplitter.h | 18 +---------
 .../Universal/DriverSampleDxe/DriverSample.c       | 20 ++---------
 .../Universal/SetupBrowserDxe/Presentation.c       | 20 ++---------
 MdePkg/Include/Library/UefiLib.h                   | 18 +++++++++-
 MdePkg/Library/UefiLib/UefiLib.c                   | 42 +++++++++++-----------
 MdePkg/Library/UefiLib/UefiLibInternal.h           | 20 +----------
 MdePkg/Library/UefiLib/UefiNotTiano.c              | 10 +++---
 .../PlatformBootManagerLib/PlatformBootManager.c   | 25 ++-----------
 21 files changed, 91 insertions(+), 321 deletions(-)

--
2.7.0.windows.1



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/7] Make the event empty function in UefiLib public
  2017-01-19 10:27 ` [PATCH 0/7] Make the event empty function in UefiLib public Zeng, Star
@ 2017-01-19 10:30   ` Laszlo Ersek
  2017-01-20  0:42     ` Tian, Feng
  2017-01-20  8:04     ` Zeng, Star
  0 siblings, 2 replies; 17+ messages in thread
From: Laszlo Ersek @ 2017-01-19 10:30 UTC (permalink / raw)
  To: Zeng, Star, edk2-devel@lists.01.org, Kinney, Michael D, Fan, Jeff,
	Tian, Feng, Ni, Ruiyu, Ma, Maurice, Agyeman, Prince,
	Steele, Kelly, Leif Lindholm
  Cc: Gao, Liming, Ard Biesheuvel

Hi Star,

On 01/19/17 11:27, Zeng, Star wrote:
> Hi,
> 
> Please kindly help take a review to the patches. :)
> 
> So far, I have got the RB from Liming and Ard to MdePkg and ArmPlatformPkg.

I didn't ignore the series, it's just that I don't co-maintain any of
the packages being modified.

Thanks
Laszlo

> -----Original Message-----
> From: Zeng, Star 
> Sent: Tuesday, January 17, 2017 3:09 PM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star <star.zeng@intel.com>; Gao, Liming <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Fan, Jeff <jeff.fan@intel.com>; Tian, Feng <feng.tian@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com>; Ma, Maurice <maurice.ma@intel.com>; Agyeman, Prince <prince.agyeman@intel.com>; Steele, Kelly <kelly.steele@intel.com>; Leif Lindholm <leif.lindholm@linaro.org>; Ard Biesheuvel <ard.biesheuvel@linaro.org>; Laszlo Ersek <lersek@redhat.com>
> Subject: [PATCH 0/7] Make the event empty function in UefiLib public
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=298
> 
> We found there are many event empty functions in EDK2 code base, these patches are to make the event empty function in UefiLib public, then this event empty function can be used to remove the duplication in drivers and other libraries.
> 
> In CorebootPayloadPkg/QuarkPlatformPkg/ArmPlatformPkg, EfiEventGroupSignal from UefiLib can be used to remove the duplication of event empty function.
> 
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Michael Kinney <michael.d.kinney@intel.com>
> Cc: Jeff Fan <jeff.fan@intel.com>
> Cc: Feng Tian <feng.tian@intel.com>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Maurice Ma <maurice.ma@intel.com>
> Cc: Prince Agyeman <prince.agyeman@intel.com>
> Cc: Kelly Steele <kelly.steele@intel.com>
> Cc: Leif Lindholm <leif.lindholm@linaro.org>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Laszlo Ersek <lersek@redhat.com>
> 
> Star Zeng (7):
>   MdePkg UefiLib: Make the event empty function public
>   IntelFrameworkPkg UefiLib: Make the event empty function public
>   MdeModulePkg: Use EfiEventEmptyFunction from UefiLib
>   IntelFrameworkModulePkg: Use EfiEventEmptyFunction from UefiLib
>   CorebootPayloadPkg: Use EfiEventGroupSignal from UefiLib
>   QuarkPlatformPkg: Use EfiEventGroupSignal from UefiLib
>   ArmPlatformPkg: Use EfiEventGroupSignal from UefiLib
> 
>  .../Library/PlatformIntelBdsLib/IntelBdsPlatform.c | 36 ++-----------------  .../Library/PlatformIntelBdsLib/IntelBdsPlatform.h |  3 +-
>  .../PlatformIntelBdsLib/PlatformIntelBdsLib.inf    |  3 +-
>  .../PlatformBootManagerLib/PlatformBootManager.c   | 25 ++-----------
>  .../Universal/BdsDxe/BdsEntry.c                    | 20 +----------
>  .../Library/FrameworkUefiLib/UefiLib.c             | 42 +++++++++++-----------
>  .../Library/FrameworkUefiLib/UefiLibInternal.h     | 20 +----------
>  .../Library/FrameworkUefiLib/UefiNotTiano.c        |  4 +--
>  MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c      | 23 ++----------
>  MdeModulePkg/Core/Dxe/DxeMain.h                    | 18 +---------
>  MdeModulePkg/Core/Dxe/Event/Event.c                |  4 +--
>  MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c | 19 ++--------  .../Universal/Console/ConSplitterDxe/ConSplitter.c | 22 ++----------  .../Universal/Console/ConSplitterDxe/ConSplitter.h | 18 +---------
>  .../Universal/DriverSampleDxe/DriverSample.c       | 20 ++---------
>  .../Universal/SetupBrowserDxe/Presentation.c       | 20 ++---------
>  MdePkg/Include/Library/UefiLib.h                   | 18 +++++++++-
>  MdePkg/Library/UefiLib/UefiLib.c                   | 42 +++++++++++-----------
>  MdePkg/Library/UefiLib/UefiLibInternal.h           | 20 +----------
>  MdePkg/Library/UefiLib/UefiNotTiano.c              | 10 +++---
>  .../PlatformBootManagerLib/PlatformBootManager.c   | 25 ++-----------
>  21 files changed, 91 insertions(+), 321 deletions(-)
> 
> --
> 2.7.0.windows.1
> 



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/7] Make the event empty function in UefiLib public
  2017-01-19 10:30   ` Laszlo Ersek
@ 2017-01-20  0:42     ` Tian, Feng
  2017-01-20  8:04     ` Zeng, Star
  1 sibling, 0 replies; 17+ messages in thread
From: Tian, Feng @ 2017-01-20  0:42 UTC (permalink / raw)
  To: Laszlo Ersek, Zeng, Star, edk2-devel@lists.01.org,
	Kinney, Michael D, Fan, Jeff, Ni, Ruiyu, Ma, Maurice,
	Agyeman, Prince, Steele, Kelly, Leif Lindholm
  Cc: Gao, Liming, Ard Biesheuvel, Tian, Feng

MdeModulePkg reviewed-by: Feng Tian <feng.tian@intel.com> 

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Laszlo Ersek
Sent: Thursday, January 19, 2017 6:30 PM
To: Zeng, Star <star.zeng@intel.com>; edk2-devel@lists.01.org <edk2-devel@ml01.01.org>; Kinney, Michael D <michael.d.kinney@intel.com>; Fan, Jeff <jeff.fan@intel.com>; Tian, Feng <feng.tian@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com>; Ma, Maurice <maurice.ma@intel.com>; Agyeman, Prince <prince.agyeman@intel.com>; Steele, Kelly <kelly.steele@intel.com>; Leif Lindholm <leif.lindholm@linaro.org>
Cc: Gao, Liming <liming.gao@intel.com>; Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: Re: [edk2] [PATCH 0/7] Make the event empty function in UefiLib public

Hi Star,

On 01/19/17 11:27, Zeng, Star wrote:
> Hi,
> 
> Please kindly help take a review to the patches. :)
> 
> So far, I have got the RB from Liming and Ard to MdePkg and ArmPlatformPkg.

I didn't ignore the series, it's just that I don't co-maintain any of the packages being modified.

Thanks
Laszlo

> -----Original Message-----
> From: Zeng, Star
> Sent: Tuesday, January 17, 2017 3:09 PM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star <star.zeng@intel.com>; Gao, Liming 
> <liming.gao@intel.com>; Kinney, Michael D 
> <michael.d.kinney@intel.com>; Fan, Jeff <jeff.fan@intel.com>; Tian, 
> Feng <feng.tian@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com>; Ma, 
> Maurice <maurice.ma@intel.com>; Agyeman, Prince 
> <prince.agyeman@intel.com>; Steele, Kelly <kelly.steele@intel.com>; 
> Leif Lindholm <leif.lindholm@linaro.org>; Ard Biesheuvel 
> <ard.biesheuvel@linaro.org>; Laszlo Ersek <lersek@redhat.com>
> Subject: [PATCH 0/7] Make the event empty function in UefiLib public
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=298
> 
> We found there are many event empty functions in EDK2 code base, these patches are to make the event empty function in UefiLib public, then this event empty function can be used to remove the duplication in drivers and other libraries.
> 
> In CorebootPayloadPkg/QuarkPlatformPkg/ArmPlatformPkg, EfiEventGroupSignal from UefiLib can be used to remove the duplication of event empty function.
> 
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Michael Kinney <michael.d.kinney@intel.com>
> Cc: Jeff Fan <jeff.fan@intel.com>
> Cc: Feng Tian <feng.tian@intel.com>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Maurice Ma <maurice.ma@intel.com>
> Cc: Prince Agyeman <prince.agyeman@intel.com>
> Cc: Kelly Steele <kelly.steele@intel.com>
> Cc: Leif Lindholm <leif.lindholm@linaro.org>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Laszlo Ersek <lersek@redhat.com>
> 
> Star Zeng (7):
>   MdePkg UefiLib: Make the event empty function public
>   IntelFrameworkPkg UefiLib: Make the event empty function public
>   MdeModulePkg: Use EfiEventEmptyFunction from UefiLib
>   IntelFrameworkModulePkg: Use EfiEventEmptyFunction from UefiLib
>   CorebootPayloadPkg: Use EfiEventGroupSignal from UefiLib
>   QuarkPlatformPkg: Use EfiEventGroupSignal from UefiLib
>   ArmPlatformPkg: Use EfiEventGroupSignal from UefiLib
> 
>  .../Library/PlatformIntelBdsLib/IntelBdsPlatform.c | 36 ++-----------------  .../Library/PlatformIntelBdsLib/IntelBdsPlatform.h |  3 +-
>  .../PlatformIntelBdsLib/PlatformIntelBdsLib.inf    |  3 +-
>  .../PlatformBootManagerLib/PlatformBootManager.c   | 25 ++-----------
>  .../Universal/BdsDxe/BdsEntry.c                    | 20 +----------
>  .../Library/FrameworkUefiLib/UefiLib.c             | 42 +++++++++++-----------
>  .../Library/FrameworkUefiLib/UefiLibInternal.h     | 20 +----------
>  .../Library/FrameworkUefiLib/UefiNotTiano.c        |  4 +--
>  MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c      | 23 ++----------
>  MdeModulePkg/Core/Dxe/DxeMain.h                    | 18 +---------
>  MdeModulePkg/Core/Dxe/Event/Event.c                |  4 +--
>  MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c | 19 ++--------  .../Universal/Console/ConSplitterDxe/ConSplitter.c | 22 ++----------  .../Universal/Console/ConSplitterDxe/ConSplitter.h | 18 +---------
>  .../Universal/DriverSampleDxe/DriverSample.c       | 20 ++---------
>  .../Universal/SetupBrowserDxe/Presentation.c       | 20 ++---------
>  MdePkg/Include/Library/UefiLib.h                   | 18 +++++++++-
>  MdePkg/Library/UefiLib/UefiLib.c                   | 42 +++++++++++-----------
>  MdePkg/Library/UefiLib/UefiLibInternal.h           | 20 +----------
>  MdePkg/Library/UefiLib/UefiNotTiano.c              | 10 +++---
>  .../PlatformBootManagerLib/PlatformBootManager.c   | 25 ++-----------
>  21 files changed, 91 insertions(+), 321 deletions(-)
> 
> --
> 2.7.0.windows.1
> 

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 5/7] CorebootPayloadPkg: Use EfiEventGroupSignal from UefiLib
  2017-01-17  7:08 ` [PATCH 5/7] CorebootPayloadPkg: Use EfiEventGroupSignal " Star Zeng
@ 2017-01-20  4:12   ` Ma, Maurice
  0 siblings, 0 replies; 17+ messages in thread
From: Ma, Maurice @ 2017-01-20  4:12 UTC (permalink / raw)
  To: Zeng, Star, edk2-devel@lists.01.org
  Cc: Agyeman, Prince, Gao, Liming, Kinney, Michael D

Looks good. 
Reviewed-by: Maurice Ma <maurice.ma@intel.com>

Regards,
Maurice

-----Original Message-----
From: Zeng, Star 
Sent: Monday, January 16, 2017 11:09 PM
To: edk2-devel@lists.01.org
Cc: Zeng, Star <star.zeng@intel.com>; Ma, Maurice <maurice.ma@intel.com>; Agyeman, Prince <prince.agyeman@intel.com>; Gao, Liming <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>
Subject: [PATCH 5/7] CorebootPayloadPkg: Use EfiEventGroupSignal from UefiLib

Use EfiEventGroupSignal from UefiLib and remove InternalBdsEmptyCallbackFuntion.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=298

Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Prince Agyeman <prince.agyeman@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
 .../PlatformBootManagerLib/PlatformBootManager.c   | 25 ++--------------------
 1 file changed, 2 insertions(+), 23 deletions(-)

diff --git a/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c b/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
index 56be30f7a041..7e92441da11f 100644
--- a/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
+++ b/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootMana
+++ ger.c
@@ -2,7 +2,7 @@
   This file include all platform action which can be customized
   by IBV/OEM.
 
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2017, 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 @@ -17,16 +17,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include "PlatformConsole.h"
 
 VOID
-EFIAPI
-InternalBdsEmptyCallbackFuntion (
-  IN EFI_EVENT                Event,
-  IN VOID                     *Context
-  )
-{
-  return;
-}
-
-VOID
 InstallReadyToLock (
   VOID
   )
@@ -34,24 +24,13 @@ InstallReadyToLock (
   EFI_STATUS                            Status;
   EFI_HANDLE                            Handle;
   EFI_SMM_ACCESS2_PROTOCOL              *SmmAccess;
-  EFI_EVENT                             EndOfDxeEvent;
 
   DEBUG((DEBUG_INFO,"InstallReadyToLock  entering......\n"));
   //
   // Inform the SMM infrastructure that we're entering BDS and may run 3rd party code hereafter
   // Since PI1.2.1, we need signal EndOfDxe as ExitPmAuth
   //
-  Status = gBS->CreateEventEx (
-                  EVT_NOTIFY_SIGNAL,
-                  TPL_CALLBACK,
-                  InternalBdsEmptyCallbackFuntion,
-                  NULL,
-                  &gEfiEndOfDxeEventGroupGuid,
-                  &EndOfDxeEvent
-                  );
-  ASSERT_EFI_ERROR (Status);
-  gBS->SignalEvent (EndOfDxeEvent);
-  gBS->CloseEvent (EndOfDxeEvent);
+  EfiEventGroupSignal (&gEfiEndOfDxeEventGroupGuid);
   DEBUG((DEBUG_INFO,"All EndOfDxe callbacks have returned successfully\n"));
 
   //
--
2.7.0.windows.1



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 4/7] IntelFrameworkModulePkg: Use EfiEventEmptyFunction from UefiLib
  2017-01-17  7:08 ` [PATCH 4/7] IntelFrameworkModulePkg: " Star Zeng
@ 2017-01-20  4:42   ` Fan, Jeff
  0 siblings, 0 replies; 17+ messages in thread
From: Fan, Jeff @ 2017-01-20  4:42 UTC (permalink / raw)
  To: Zeng, Star, edk2-devel@lists.01.org
  Cc: Ni, Ruiyu, Gao, Liming, Kinney, Michael D

Reviewed-by: Jeff Fan <jeff.fan@intel.com>

-----Original Message-----
From: Zeng, Star 
Sent: Tuesday, January 17, 2017 3:09 PM
To: edk2-devel@lists.01.org
Cc: Zeng, Star; Fan, Jeff; Ni, Ruiyu; Gao, Liming; Kinney, Michael D
Subject: [PATCH 4/7] IntelFrameworkModulePkg: Use EfiEventEmptyFunction from UefiLib

Use EfiEventEmptyFunction from UefiLib and remove the duplication of event empty function.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=298

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
 IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c
index bf81de40a31d..8a64f041426a 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c
@@ -83,24 +83,6 @@ BdsInitialize (
   return Status;
 }
 
-
-/**
-  An empty function to pass error checking of CreateEventEx ().
-
-  @param  Event                 Event whose notification function is being invoked.
-  @param  Context               Pointer to the notification function's context,
-                                which is implementation-dependent.
-
-**/
-VOID
-EFIAPI
-BdsEmptyCallbackFunction (
-  IN EFI_EVENT                Event,
-  IN VOID                     *Context
-  )
-{
-}
-
 /**
 
   This function attempts to boot for the boot order specified @@ -144,7 +126,7 @@ BdsBootDeviceSelect (
     Status = gBS->CreateEventEx (
                     EVT_NOTIFY_SIGNAL,
                     TPL_CALLBACK,
-                    BdsEmptyCallbackFunction,
+                    EfiEventEmptyFunction,
                     NULL,
                     &gConnectConInEventGuid,
                     &ConnectConInEvent
--
2.7.0.windows.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/7] IntelFrameworkPkg UefiLib: Make the event empty function public
  2017-01-17  7:08 ` [PATCH 2/7] IntelFrameworkPkg " Star Zeng
@ 2017-01-20  4:42   ` Fan, Jeff
  0 siblings, 0 replies; 17+ messages in thread
From: Fan, Jeff @ 2017-01-20  4:42 UTC (permalink / raw)
  To: Zeng, Star, edk2-devel@lists.01.org; +Cc: Gao, Liming, Kinney, Michael D

Reviewed-by: Jeff Fan <jeff.fan@intel.com>

-----Original Message-----
From: Zeng, Star 
Sent: Tuesday, January 17, 2017 3:09 PM
To: edk2-devel@lists.01.org
Cc: Zeng, Star; Gao, Liming; Kinney, Michael D; Fan, Jeff
Subject: [PATCH 2/7] IntelFrameworkPkg UefiLib: Make the event empty function public

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=298

Then this event empty function can be used to remove the duplication in drivers and other libraries.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
 .../Library/FrameworkUefiLib/UefiLib.c             | 42 +++++++++++-----------
 .../Library/FrameworkUefiLib/UefiLibInternal.h     | 20 +----------
 .../Library/FrameworkUefiLib/UefiNotTiano.c        |  4 +--
 3 files changed, 23 insertions(+), 43 deletions(-)

diff --git a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c
index e198b729a329..30b6dc921828 100644
--- a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c
+++ b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c
@@ -5,7 +5,7 @@
   EFI Driver Model related protocols, manage Unicode string tables for UEFI Drivers, 
   and print messages on the console output and standard error devices.
 
-  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2017, 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 @@ -310,7 +310,7 @@ EfiEventGroupSignal (
   Status = gBS->CreateEventEx (
                   EVT_NOTIFY_SIGNAL,
                   TPL_CALLBACK,
-                  InternalEmptyFunction,
+                  EfiEventEmptyFunction,
                   NULL,
                   EventGroup,
                   &Event
@@ -325,6 +325,24 @@ EfiEventGroupSignal (
   return Status;
 }
 
+/**
+  An empty function that can be used as NotifyFunction parameter of
+  CreateEvent() or CreateEventEx().
+
+  @param Event              Event whose notification function is being invoked.
+  @param Context            The pointer to the notification function's context,
+                            which is implementation-dependent.
+
+**/
+VOID
+EFIAPI
+EfiEventEmptyFunction (
+  IN EFI_EVENT              Event,
+  IN VOID                   *Context
+  )
+{
+}
+
 /** 
   Returns the current TPL.
 
@@ -1457,23 +1475,3 @@ GetBestLanguage (
   //
   return NULL;
 }
-
-/**
-  An empty function to pass error checking of CreateEventEx ().
-
-  This empty function ensures that EVT_NOTIFY_SIGNAL_ALL is error
-  checked correctly since it is now mapped into CreateEventEx() in UEFI 2.0.
-
-  @param  Event                 Event whose notification function is being invoked.
-  @param  Context               Pointer to the notification function's context,
-                                which is implementation-dependent.
-
-**/
-VOID
-EFIAPI
-InternalEmptyFunction (
-  IN EFI_EVENT                Event,
-  IN VOID                     *Context
-  )
-{
-}
diff --git a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibInternal.h b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibInternal.h
index 16c663626db2..51f58176defa 100644
--- a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibInternal.h
+++ b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibInternal.h
@@ -1,7 +1,7 @@
 /** @file
   Internal include file for UefiLib.
 
-  Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2007 - 2017, 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 @@ -41,22 +41,4 @@  #include <Library/PrintLib.h>  #include <Library/DevicePathLib.h>
 
-/**
-  An empty function to pass error checking of CreateEventEx ().
-
-  This empty function ensures that EVT_NOTIFY_SIGNAL_ALL is error
-  checked correctly since it is now mapped into CreateEventEx() in UEFI 2.0.
-
-  @param  Event                 Event whose notification function is being invoked.
-  @param  Context               Pointer to the notification function's context,
-                                which is implementation-dependent.
-
-**/
-VOID
-EFIAPI
-InternalEmptyFunction (
-  IN EFI_EVENT                Event,
-  IN VOID                     *Context
-  );
-
 #endif
diff --git a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiNotTiano.c b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiNotTiano.c
index 1221403672f9..e641aba647bb 100644
--- a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiNotTiano.c
+++ b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiNotTiano.c
@@ -45,7 +45,7 @@ EfiCreateEventLegacyBoot (  {
   return EfiCreateEventLegacyBootEx (
            TPL_CALLBACK,
-           InternalEmptyFunction,
+           EfiEventEmptyFunction,
            NULL,
            LegacyBootEvent
            );
@@ -135,7 +135,7 @@ EfiCreateEventReadyToBoot (  {
   return EfiCreateEventReadyToBootEx (
            TPL_CALLBACK,
-           InternalEmptyFunction,
+           EfiEventEmptyFunction,
            NULL,
            ReadyToBootEvent
            );
--
2.7.0.windows.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/7] Make the event empty function in UefiLib public
  2017-01-19 10:30   ` Laszlo Ersek
  2017-01-20  0:42     ` Tian, Feng
@ 2017-01-20  8:04     ` Zeng, Star
  1 sibling, 0 replies; 17+ messages in thread
From: Zeng, Star @ 2017-01-20  8:04 UTC (permalink / raw)
  To: Laszlo Ersek, edk2-devel@lists.01.org, Kinney, Michael D,
	Steele, Kelly
  Cc: Gao, Liming, Ard Biesheuvel, Fan, Jeff, Tian, Feng, Ni, Ruiyu,
	Ma, Maurice, Agyeman, Prince, Leif Lindholm, Zeng, Star

Hi Laszlo,

Np, just Cc you in case you have interest to it since you created the useful EfiEventGroupSignal(). :)

Hi All,

I have pushed the patches at https://github.com/tianocore/edk2/compare/058cd03b5857...9c8fe63c15d6 for MdePkg, IntelFrameworkPkg, MdeModulePkg, IntelFrameworkModulePkg, CorebootPayloadPkg and ArmPlatformPkg with RB received.
And I will keep QuarkPlatformPkg as is before I get any RB.

Thanks,
Star
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Laszlo Ersek
Sent: Thursday, January 19, 2017 6:30 PM
To: Zeng, Star <star.zeng@intel.com>; edk2-devel@lists.01.org <edk2-devel@ml01.01.org>; Kinney, Michael D <michael.d.kinney@intel.com>; Fan, Jeff <jeff.fan@intel.com>; Tian, Feng <feng.tian@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com>; Ma, Maurice <maurice.ma@intel.com>; Agyeman, Prince <prince.agyeman@intel.com>; Steele, Kelly <kelly.steele@intel.com>; Leif Lindholm <leif.lindholm@linaro.org>
Cc: Gao, Liming <liming.gao@intel.com>; Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: Re: [edk2] [PATCH 0/7] Make the event empty function in UefiLib public

Hi Star,

On 01/19/17 11:27, Zeng, Star wrote:
> Hi,
> 
> Please kindly help take a review to the patches. :)
> 
> So far, I have got the RB from Liming and Ard to MdePkg and ArmPlatformPkg.

I didn't ignore the series, it's just that I don't co-maintain any of the packages being modified.

Thanks
Laszlo

> -----Original Message-----
> From: Zeng, Star
> Sent: Tuesday, January 17, 2017 3:09 PM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star <star.zeng@intel.com>; Gao, Liming 
> <liming.gao@intel.com>; Kinney, Michael D 
> <michael.d.kinney@intel.com>; Fan, Jeff <jeff.fan@intel.com>; Tian, 
> Feng <feng.tian@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com>; Ma, 
> Maurice <maurice.ma@intel.com>; Agyeman, Prince 
> <prince.agyeman@intel.com>; Steele, Kelly <kelly.steele@intel.com>; 
> Leif Lindholm <leif.lindholm@linaro.org>; Ard Biesheuvel 
> <ard.biesheuvel@linaro.org>; Laszlo Ersek <lersek@redhat.com>
> Subject: [PATCH 0/7] Make the event empty function in UefiLib public
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=298
> 
> We found there are many event empty functions in EDK2 code base, these patches are to make the event empty function in UefiLib public, then this event empty function can be used to remove the duplication in drivers and other libraries.
> 
> In CorebootPayloadPkg/QuarkPlatformPkg/ArmPlatformPkg, EfiEventGroupSignal from UefiLib can be used to remove the duplication of event empty function.
> 
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Michael Kinney <michael.d.kinney@intel.com>
> Cc: Jeff Fan <jeff.fan@intel.com>
> Cc: Feng Tian <feng.tian@intel.com>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Maurice Ma <maurice.ma@intel.com>
> Cc: Prince Agyeman <prince.agyeman@intel.com>
> Cc: Kelly Steele <kelly.steele@intel.com>
> Cc: Leif Lindholm <leif.lindholm@linaro.org>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Laszlo Ersek <lersek@redhat.com>
> 
> Star Zeng (7):
>   MdePkg UefiLib: Make the event empty function public
>   IntelFrameworkPkg UefiLib: Make the event empty function public
>   MdeModulePkg: Use EfiEventEmptyFunction from UefiLib
>   IntelFrameworkModulePkg: Use EfiEventEmptyFunction from UefiLib
>   CorebootPayloadPkg: Use EfiEventGroupSignal from UefiLib
>   QuarkPlatformPkg: Use EfiEventGroupSignal from UefiLib
>   ArmPlatformPkg: Use EfiEventGroupSignal from UefiLib
> 
>  .../Library/PlatformIntelBdsLib/IntelBdsPlatform.c | 36 ++-----------------  .../Library/PlatformIntelBdsLib/IntelBdsPlatform.h |  3 +-
>  .../PlatformIntelBdsLib/PlatformIntelBdsLib.inf    |  3 +-
>  .../PlatformBootManagerLib/PlatformBootManager.c   | 25 ++-----------
>  .../Universal/BdsDxe/BdsEntry.c                    | 20 +----------
>  .../Library/FrameworkUefiLib/UefiLib.c             | 42 +++++++++++-----------
>  .../Library/FrameworkUefiLib/UefiLibInternal.h     | 20 +----------
>  .../Library/FrameworkUefiLib/UefiNotTiano.c        |  4 +--
>  MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c      | 23 ++----------
>  MdeModulePkg/Core/Dxe/DxeMain.h                    | 18 +---------
>  MdeModulePkg/Core/Dxe/Event/Event.c                |  4 +--
>  MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c | 19 ++--------  .../Universal/Console/ConSplitterDxe/ConSplitter.c | 22 ++----------  .../Universal/Console/ConSplitterDxe/ConSplitter.h | 18 +---------
>  .../Universal/DriverSampleDxe/DriverSample.c       | 20 ++---------
>  .../Universal/SetupBrowserDxe/Presentation.c       | 20 ++---------
>  MdePkg/Include/Library/UefiLib.h                   | 18 +++++++++-
>  MdePkg/Library/UefiLib/UefiLib.c                   | 42 +++++++++++-----------
>  MdePkg/Library/UefiLib/UefiLibInternal.h           | 20 +----------
>  MdePkg/Library/UefiLib/UefiNotTiano.c              | 10 +++---
>  .../PlatformBootManagerLib/PlatformBootManager.c   | 25 ++-----------
>  21 files changed, 91 insertions(+), 321 deletions(-)
> 
> --
> 2.7.0.windows.1
> 

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2017-01-20  8:04 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-17  7:08 [PATCH 0/7] Make the event empty function in UefiLib public Star Zeng
2017-01-17  7:08 ` [PATCH 1/7] MdePkg UefiLib: Make the event empty function public Star Zeng
2017-01-18  7:19   ` Gao, Liming
2017-01-17  7:08 ` [PATCH 2/7] IntelFrameworkPkg " Star Zeng
2017-01-20  4:42   ` Fan, Jeff
2017-01-17  7:08 ` [PATCH 3/7] MdeModulePkg: Use EfiEventEmptyFunction from UefiLib Star Zeng
2017-01-17  7:08 ` [PATCH 4/7] IntelFrameworkModulePkg: " Star Zeng
2017-01-20  4:42   ` Fan, Jeff
2017-01-17  7:08 ` [PATCH 5/7] CorebootPayloadPkg: Use EfiEventGroupSignal " Star Zeng
2017-01-20  4:12   ` Ma, Maurice
2017-01-17  7:08 ` [PATCH 6/7] QuarkPlatformPkg: " Star Zeng
2017-01-17  7:08 ` [PATCH 7/7] ArmPlatformPkg: " Star Zeng
2017-01-17  9:33   ` Ard Biesheuvel
2017-01-19 10:27 ` [PATCH 0/7] Make the event empty function in UefiLib public Zeng, Star
2017-01-19 10:30   ` Laszlo Ersek
2017-01-20  0:42     ` Tian, Feng
2017-01-20  8:04     ` Zeng, Star

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox