mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/PiSmmCore: make type punning consistent
The SmiHandlerRegister() function explicitly casts "SmiHandler" (of type (SMI_HANDLER*)) to EFI_HANDLE, when outputting "DispatchHandle". Apply the same cast in the counterpart function SmiHandlerUnRegister(), which compares multiple "SmiHandler"s against the input "DispatchHandle". This is a semantic cleanup; there is no functional change. Cc: Eric Dong <eric.dong@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
This commit is contained in:
parent
9388c6b1c1
commit
f662f91cb2
|
@ -282,7 +282,7 @@ SmiHandlerUnRegister (
|
|||
//
|
||||
SmiHandler = NULL;
|
||||
for ( HandlerLink = GetFirstNode (&mRootSmiEntry.SmiHandlers)
|
||||
; !IsNull (&mRootSmiEntry.SmiHandlers, HandlerLink) && (SmiHandler != DispatchHandle)
|
||||
; !IsNull (&mRootSmiEntry.SmiHandlers, HandlerLink) && ((EFI_HANDLE) SmiHandler != DispatchHandle)
|
||||
; HandlerLink = GetNextNode (&mRootSmiEntry.SmiHandlers, HandlerLink)
|
||||
) {
|
||||
SmiHandler = CR (HandlerLink, SMI_HANDLER, Link, SMI_HANDLER_SIGNATURE);
|
||||
|
@ -292,19 +292,19 @@ SmiHandlerUnRegister (
|
|||
// Look for it in non-root SMI handlers
|
||||
//
|
||||
for ( EntryLink = GetFirstNode (&mSmiEntryList)
|
||||
; !IsNull (&mSmiEntryList, EntryLink) && (SmiHandler != DispatchHandle)
|
||||
; !IsNull (&mSmiEntryList, EntryLink) && ((EFI_HANDLE) SmiHandler != DispatchHandle)
|
||||
; EntryLink = GetNextNode (&mSmiEntryList, EntryLink)
|
||||
) {
|
||||
SmiEntry = CR (EntryLink, SMI_ENTRY, AllEntries, SMI_ENTRY_SIGNATURE);
|
||||
for ( HandlerLink = GetFirstNode (&SmiEntry->SmiHandlers)
|
||||
; !IsNull (&SmiEntry->SmiHandlers, HandlerLink) && (SmiHandler != DispatchHandle)
|
||||
; !IsNull (&SmiEntry->SmiHandlers, HandlerLink) && ((EFI_HANDLE) SmiHandler != DispatchHandle)
|
||||
; HandlerLink = GetNextNode (&SmiEntry->SmiHandlers, HandlerLink)
|
||||
) {
|
||||
SmiHandler = CR (HandlerLink, SMI_HANDLER, Link, SMI_HANDLER_SIGNATURE);
|
||||
}
|
||||
}
|
||||
|
||||
if (SmiHandler != DispatchHandle) {
|
||||
if ((EFI_HANDLE) SmiHandler != DispatchHandle) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue