MdeModulePkg: 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: 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>
Reviewed-by: Feng Tian <feng.tian@intel.com>
This commit is contained in:
Star Zeng 2017-01-17 13:50:17 +08:00
parent eb58a02390
commit ac72474d00
8 changed files with 14 additions and 130 deletions

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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
@ -220,21 +220,6 @@ BmGetKeyOptions (
return Param.KeyOptions;
}
/**
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.
@ -901,7 +886,7 @@ EfiBootManagerStartHotkeyService (
Status = gBS->CreateEvent (
EVT_NOTIFY_WAIT,
TPL_CALLBACK,
BmEmptyFunction,
EfiEventEmptyFunction,
NULL,
&mBmHotkeyTriggered
);

View File

@ -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
@ -4979,21 +4979,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
)
{
}

View File

@ -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

View File

@ -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
@ -110,22 +110,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.
@ -1972,7 +1956,7 @@ DriverSampleInit (
Status = gBS->CreateEventEx (
EVT_NOTIFY_SIGNAL,
TPL_NOTIFY,
DriverSampleInternalEmptyFunction,
EfiEventEmptyFunction,
NULL,
&gEfiIfrRefreshIdOpGuid,
&mEvent

View File

@ -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
@ -70,22 +70,6 @@ EvaluateFormExpressions (
return EFI_SUCCESS;
}
/**
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.
@ -718,7 +702,7 @@ InitializeDisplayFormData (
Status = gBS->CreateEvent (
EVT_NOTIFY_WAIT,
TPL_CALLBACK,
SetupBrowserEmptyFunction,
EfiEventEmptyFunction,
NULL,
&mValueChangedEvent
);