public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Star Zeng <star.zeng@intel.com>
To: edk2-devel@lists.01.org
Cc: Star Zeng <star.zeng@intel.com>, Feng Tian <feng.tian@intel.com>,
	Ruiyu Ni <ruiyu.ni@intel.com>, Liming Gao <liming.gao@intel.com>,
	Michael Kinney <michael.d.kinney@intel.com>
Subject: [PATCH 3/7] MdeModulePkg: Use EfiEventEmptyFunction from UefiLib
Date: Tue, 17 Jan 2017 15:08:36 +0800	[thread overview]
Message-ID: <1484636920-180432-4-git-send-email-star.zeng@intel.com> (raw)
In-Reply-To: <1484636920-180432-1-git-send-email-star.zeng@intel.com>

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



  parent reply	other threads:[~2017-01-17  7:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Star Zeng [this message]
2017-01-17  7:08 ` [PATCH 4/7] IntelFrameworkModulePkg: Use EfiEventEmptyFunction from UefiLib 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

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=1484636920-180432-4-git-send-email-star.zeng@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